Project

General

Profile

Actions

Bug #4130

closed

Puppet class import command fails silently

Added by Dominic Cleal about 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Foreman commands (obsolete)
Target version:
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Description of problem:
Hammer cli command to import classes fails

Version-Release number of selected component (if applicable):
  1. rpm -qa | grep foreman
    rubygem-hammer_cli_foreman-0.0.15-1.el6.noarch
    foreman-compute-1.4.0-0.develop.201401011454git1245d23.el6.noarch
    foreman-installer-1.4.0-0.develop.201312272053gitbc2acd9.el6.noarch
    foreman-release-1.4.0-0.develop.201401011454git1245d23.el6.noarch
    foreman-1.4.0-0.develop.201401011454git1245d23.el6.noarch
    foreman-ovirt-1.4.0-0.develop.201401011454git1245d23.el6.noarch
    foreman-proxy-1.4.0-0.develop.201312091021git42bab91.el6.noarch
    foreman-postgresql-1.4.0-0.develop.201401011454git1245d23.el6.noarch
    rubygem-foreman_api-0.1.9-1.el6.noarch
    foreman-libvirt-1.4.0-0.develop.201401011454git1245d23.el6.noarch
    foreman-selinux-1.4.0-0.develop.201311220906gite342a0b.el6.noarch

How reproducible:
everytime

Steps to Reproduce:
1.# hammer proxy import_classes --id 1
Puppet classes were imported

2.# hammer -v sc_param list
[ INFO 2014-01-03 07:57:09 Init] Initialization of Hammer CLI (0.0.14) has started...
[ INFO 2014-01-03 07:57:09 Init] Configuration from the file /etc/foreman/cli_config.yml has been loaded
[ INFO 2014-01-03 07:57:09 Modules] Extension module hammer_cli_foreman (0.0.15) loaded
[ INFO 2014-01-03 07:57:09 HammerCLI::MainCommand] Called with options: {"verbose"=>true}
[ INFO 2014-01-03 07:57:09 HammerCLIForeman::SmartClassParameter] Called with options: {}
[ INFO 2014-01-03 07:57:09 HammerCLIForeman::SmartClassParameter::ListCommand] Called with options: {}
[DEBUG 2014-01-03 07:57:09 HammerCLIForeman::SmartClassParameter::ListCommand] Retrieved data:
[]
No data.

3.# hammer environment sc_params --id 1
No data.

Actual results:
Unable to view the list

Expected results:
List displayed

(https://bugzilla.redhat.com/show_bug.cgi?id=1048232)


Related issues 1 (0 open1 closed)

Related to Hammer CLI - Bug #4609: Better message when importing classes doesn't find any new onesClosedTomáš Strachota03/10/2014Actions
Actions #1

Updated by Dominic Cleal about 10 years ago

Started POST "/api/smart_proxies/1/import_puppetclasses" for ::1 at 2014-01-20 13:41:54 +0000
Processing by Api::V2::SmartProxiesController#import_puppetclasses as JSON
  Parameters: {"dryrun"=>nil, "apiv"=>"v2", "id"=>"1", "smart_proxy"=>{}}
Authorized user admin(Admin User)
  Rendered api/v1/import_puppetclasses/index.json.rabl within api/layouts/import_puppetclasses_layout (1.7ms)
Completed 200 OK in 300ms (Views: 3.9ms | ActiveRecord: 12.6ms)

I think the dryrun parameter needs explicitly setting to false (boolean) or "false" (string), else the API controller assumes it's true.

Actions #3

Updated by Dominic Cleal about 10 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Stephan Dollberg
  • Target version set to 1.9.0
Actions #4

Updated by Stephan Dollberg about 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Applied in changeset foreman:hammer-cli-foreman|commit:5f7746a12dc4f8fb3a8c10159109e4bf52ec7192.

Actions #5

Updated by Tomáš Strachota about 10 years ago

  • Related to Bug #4609: Better message when importing classes doesn't find any new ones added
Actions #6

Updated by Tomáš Strachota about 10 years ago

  • Status changed from Closed to Ready For Testing

This fix covers the problem only partially. I created a new issue for the second part:
http://projects.theforeman.org/issues/4609

Actions #7

Updated by Tomáš Strachota about 10 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF