Running list with -d gives me:
[root@foreman ~]# hammer -d content-view puppet-module list --content-view-id 3
[ INFO 2016-04-24 22:51:12 Init] Initialization of Hammer CLI (0.5.1) has started…
[DEBUG 2016-04-24 22:51:12 Init] Running at ruby 1.9.3-p484
[ INFO 2016-04-24 22:51:12 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2016-04-24 22:51:12 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2016-04-24 22:51:12 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_bootdisk.yml has been loaded
[ INFO 2016-04-24 22:51:12 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_docker.yml has been loaded
[ INFO 2016-04-24 22:51:12 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_tasks.yml has been loaded
[ INFO 2016-04-24 22:51:12 Init] Configuration from the file /etc/hammer/cli.modules.d/gutterball.yml has been loaded
[ INFO 2016-04-24 22:51:12 Init] Configuration from the file /etc/hammer/cli.modules.d/import.yml has been loaded
[ INFO 2016-04-24 22:51:12 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded
[DEBUG 2016-04-24 22:51:13 Connection] Registered: foreman
[DEBUG 2016-04-24 22:51:13 API] Global headers: {
:content_type => "application/json",
:accept => "application/json;version=2",
"Accept-Language" => "en"
}
[ INFO 2016-04-24 22:51:13 Modules] Extension module hammer_cli_foreman (0.5.1) loaded
[ INFO 2016-04-24 22:51:13 Modules] Extension module hammer_cli_foreman_bootdisk (0.1.3) loaded
[ INFO 2016-04-24 22:51:13 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
[ INFO 2016-04-24 22:51:13 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
[ INFO 2016-04-24 22:51:13 Modules] Extension module hammer_cli_gutterball (1.0.1) loaded
[ INFO 2016-04-24 22:51:13 Modules] Extension module hammer_cli_import (0.10.22) loaded
[ INFO 2016-04-24 22:51:13 Modules] Extension module hammer_cli_katello (0.0.19) loaded
[DEBUG 2016-04-24 22:51:13 Init] Using locale 'en'
[DEBUG 2016-04-24 22:51:13 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/locale'
[DEBUG 2016-04-24 22:51:13 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/locale'
[DEBUG 2016-04-24 22:51:13 Init] 'mo' files for locale domain 'hammer_cli_foreman_docker' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman_docker-0.0.3/locale'
[DEBUG 2016-04-24 22:51:13 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.0.19/locale'
[ INFO 2016-04-24 22:51:13 HammerCLI::MainCommand] Called with options: {"option_debug"=>true}
Warning: Option --id is deprecated. This option will be removed in Katello 2.5, Use --uuid
[ INFO 2016-04-24 22:51:13 HammerCLIKatello::ContentView] Called with options: {}
[ INFO 2016-04-24 22:51:13 HammerCLIKatello::ContentViewPuppetModule] Called with options: {}
[ INFO 2016-04-24 22:51:13 HammerCLIKatello::ContentViewPuppetModule::ListCommand] Called with options: {"option_content_view_id"=>3}
[ INFO 2016-04-24 22:51:13 API] GET /katello/api/content_views/3/content_view_puppet_modules
[DEBUG 2016-04-24 22:51:13 API] Params: {
"page" => 1,
"per_page" => 1000,
"sort" => {}
}
[DEBUG 2016-04-24 22:51:13 API] Headers: {
:params => {
"page" => 1,
"per_page" => 1000,
"sort" => {}
}
}
[Foreman] Password for admin:
[DEBUG 2016-04-24 22:51:21 API] 500 Internal Server Error
{
"displayMessage" => "undefined method version' for nil:NilClass", "errors" => [ [0] "undefined method
version' for nil:NilClass"
]
}
[ERROR 2016-04-24 22:51:21 Exception] undefined method version' for nil:NilClass undefined method
version' for nil:NilClass
[ERROR 2016-04-24 22:51:21 Exception]
RestClient::InternalServerError (500 Internal Server Error):
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in return!' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in
process_result'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in block in transmit' /opt/rh/ruby193/root/usr/share/ruby/net/http.rb:746:in
start'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in transmit' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in
execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in execute' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:51:in
get'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.14/lib/apipie_bindings/api.rb:286:in call_client' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.14/lib/apipie_bindings/api.rb:217:in
http_call'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.14/lib/apipie_bindings/api.rb:163:in call' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.14/lib/apipie_bindings/resource.rb:14:in
call'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/apipie/command.rb:43:in send_request' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/commands.rb:189:in
send_request'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/commands.rb:279:in send_request' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/commands.rb:314:in
retrieve_all'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/commands.rb:298:in execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in
run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:22:in run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in
execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:22:in
run'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in
run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:22:in run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in
execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:22:in
run'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/bin/hammer:125:in
<top (required)>'
/bin/hammer:23:in load' /bin/hammer:23:in
<main>'
Hope some dev can help me fix that.
Piotr Baranowski
CTO/VP - OSEC
mob://+48504242337
Od: "Piotr Baranowski" <piotr.baranowski@osec.pl>
Do: "foreman-users" <foreman-users@googlegroups.com>
Wysłane: niedziela, 24 kwiecień 2016 22:49:48
Temat: [foreman-users] Unable to list/remove puppet module from Content View
Hello list,
I created a product, added repo (forge.puppet…) synced it succesfully.
Now i try to add puppet modules to a CV.
As of today WebUI method is broken so i tried hammer.
hammer content-view puppet-module add --id 549 --content-view-id 3
It DID something.
Now when i navigate to content_views/3/puppet_modules
I get spinning thobber after 10+ minutes on inactivity i see no active/busy tasks.
The log however tell me there was 500:
==> /var/log/foreman/production.log <==
2016-04-24 22:43:02 [app] [I]
>
> Started GET "/katello/api/v2/content_views/3/content_view_puppet_modules?organization_id=1&page=1&search=" for A.B.C.D at 2016-04-24 22:43:02 +0200
2016-04-24 22:43:02 [app] [I] Processing by Katello::Api::V2::ContentViewPuppetModulesController#index as JSON
2016-04-24 22:43:02 [app] [I] Parameters: {"organization_id"=>"1", "page"=>"1", "search"=>"", "api_version"=>"v2", "content_view_id"=>"3"}
2016-04-24 22:43:02 [app] [I] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-2.4.1/app/views/katello/api/v2/content_view_puppet_modules/index.json.rabl within katello/api/v2/layouts/collection (5.8ms)
2016-04-24 22:43:02 [app] [E] NoMethodError: undefined method `version' for nil:NilClass
···
> /opt/theforeman/tfm/root/usr/share/gems/gems/katello-2.4.1/app/models/katello/content_view_puppet_module.rb:34:in `computed_version'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/helpers.rb:20:in `data_object_attribute'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:140:in `attribute'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:114:in `block in compile_settings'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:113:in `each'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:113:in `compile_settings'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:53:in `block in to_hash'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:248:in `cache_results'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:49:in `to_hash'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/engine.rb:86:in `to_hash'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/engine.rb:48:in `block in render'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/engine.rb:382:in `cache_results'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/engine.rb:47:in `render'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:127:in `block in merge_engines_into_result'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:119:in `each'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:119:in `merge_engines_into_result'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:55:in `block in to_hash'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:248:in `cache_results'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:49:in `to_hash'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/multi_builder.rb:27:in `map'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/multi_builder.rb:27:in `to_a'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/engine.rb:88:in `to_hash'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/engine.rb:48:in `block in render'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/engine.rb:382:in `cache_results'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/engine.rb:47:in `render'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:124:in `block (2 levels) in merge_engines_into_result'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:123:in `each'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:123:in `block in merge_engines_into_result'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:119:in `each'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:119:in `merge_engines_into_result'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:55:in `block in to_hash'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:248:in `cache_results'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:49:in `to_hash'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/engine.rb:86:in `to_hash'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/engine.rb:101:in `to_dumpable'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/engine.rb:110:in `to_json'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/engine.rb:48:in `block in render'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/engine.rb:382:in `cache_results'
> /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/engine.rb:47:in `render'
> /opt/theforeman/tfm/root/usr/share/gems/gems/katello-2.4.1/app/views/katello/api/v2/content_view_puppet_modules/index.json.rabl:1:in `_0636437cb5dd3deb5aa69ffd05ad8204'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:145:in `block in render'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:125:in `instrument'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:143:in `render'
> /opt/theforeman/tfm/root/usr/share/gems/gems/deface-1.0.1/lib/deface/action_view_extensions.rb:41:in `render'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:46:in `block in render_template'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:18:in `render'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:36:in `render_template'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:17:in `render'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:110:in `_render_template'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/streaming.rb:225:in `_render_template'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:103:in `render_to_body'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_co