Created attachment 1027392 [details] Sat 6.0 options Description of problem: In Satellite 6.1 some CLI parameters were renamed which can break customer scripts. How reproducible: Always Steps to Reproduce: I patched hammer-cli-console and produced diff of hammer options between Satellite 6.0 and 6.1. Steps to get the list: - Clean Sat6.x install - gem install hammer-cli-console (with https://github.com/komidore64/hammer-cli-console/pull/4 merged) - cat > /etc/hammer/cli.commands.d/console.yml <<EOF :console: :enable_module: true EOF - hammer -u admin -p <password> command-tree --with-options > hammer_sat6.0.txt The resulting files are attached. The main differences are caused partly by aliased options e.g. puppetclass -> puppet-class, ptable->partition-table, etc and partly by various changes in content-view options. Actual results: e.g. hammer os add-ptable --id 1 --ptable-id 1 Fails with unrecognised option Expected results: e.g. hammer os add-ptable --id 1 --ptable-id 1 Os updated Additional info: Patch for aliased options is ready. For Katello stuff the changes need review as some are intentional.
Created attachment 1027393 [details] Sat 6.1 options
Created attachment 1027394 [details] Options diff
Created attachment 1027395 [details] Proposed patch The proposed patch needs some more testing
The fix requires https://github.com/theforeman/hammer-cli/pull/169 to work! Merge request [1] covers issues in hammer-cli-foreman. Issues related to Katello commands needs to be addressed in separate MR. The changes covered in the MR: d = deleted, r = renamed Options left removed: d hammer > host > create | --sp-subnet-id [never worked] d hammer > host > update | --sp-subnet-id [never worked] Options added with deprecation warning: d hammer > host > puppet-classes | --environment d hammer > host > puppet-classes | --environment-id d hammer > host > puppet-classes | --hostgroup d hammer > host > puppet-classes | --hostgroup-id r hammer > host > puppet-classes | --id => --host-id r hammer > host > puppet-classes | --name => --host d hammer > hostgroup > puppet-classes | --environment d hammer > hostgroup > puppet-classes | --environment-id d hammer > hostgroup > puppet-classes | --host d hammer > hostgroup > puppet-classes | --host-id r hammer > sc-param > list | --puppetclass => --puppet-class r hammer > sc-param > list | --puppetclass-id => --puppet-class-id r hammer > puppet-class > sc-params | --puppetclass => --puppet-class r hammer > puppet-class > sc-params | --puppetclass-id => --puppet-class-id r hammer > os > update | --ptable-ids => --partition-table-ids r hammer > os > remove-ptable | --ptable => --partition-table r hammer > os > remove-ptable | --ptable-id => --partition-table-id r hammer > os > create | --ptable-ids => --partition-table-ids r hammer > os > add-ptable | --ptable => --partition-table r hammer > os > add-ptable | --ptable-id => --partition-table-id r hammer > hostgroup > update | --puppetclass-ids => --puppet-class-ids r hammer > hostgroup > update | --ptable-id => --partition-table-id r hammer > hostgroup > update | --ptable => --partition-table r hammer > hostgroup > create | --puppetclass-ids => --puppet-class-ids r hammer > hostgroup > create | --ptable-id => --partition-table-id r hammer > hostgroup > create | --ptable => --partition-table r hammer > hostgroup > sc-params | --puppetclass => --puppet-class r hammer > hostgroup > sc-params | --puppetclass-id => --puppet-class-id r hammer > host > update | --puppetclass-ids => --puppet-class-ids r hammer > host > update | --ptable-id => --partition-table-id r hammer > host > update | --ptable => --partition-table r hammer > host > create | --puppetclass-ids => --puppet-class-ids r hammer > host > create | --ptable-id => --partition-table-id r hammer > host > create | --ptable => --partition-table r hammer > host > sc-params | --puppetclass => --puppet-class r hammer > host > sc-params | --puppetclass-id => --puppet-class-id r hammer > environment > sc-params | --puppetclass => --puppet-class r hammer > environment > sc-params | --puppetclass-id => --puppet-class-id DOCS: Should the deprecated options be part of upgrade documentation? [1] https://gitlab.sat.lab.tlv.redhat.com/satellite6/hammer-cli-foreman/merge_requests/5
commit d74d6ff3fcc0f543be9542e6c02c57032dc5db44 Author: Martin Bačovský <martin.bacovsky> Date: Wed May 20 18:03:56 2015 +0200 Fixes #10564 - Added support for deprecated options (cherry picked from commit 407cafe6376175602509e44f9c4c3f75004c50dd) [1] https://gitlab.sat.lab.tlv.redhat.com/satellite6/hammer-cli-foreman/merge_requests/5
Created redmine issue http://projects.theforeman.org/issues/10628 from this bug
VERIFIED: # rpm -qa | grep foreman foreman-1.7.2.25-1.el7sat.noarch ruby193-rubygem-foreman-tasks-0.6.12.5-1.el7sat.noarch ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el7sat.noarch hp-ml150g6-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch ruby193-rubygem-foreman_docker-1.2.0.14-1.el7sat.noarch foreman-debug-1.7.2.25-1.el7sat.noarch foreman-ovirt-1.7.2.25-1.el7sat.noarch ruby193-rubygem-foreman-redhat_access-0.1.0-1.el7sat.noarch rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el7sat.noarch rubygem-hammer_cli_foreman_docker-0.0.3.6-1.el7sat.noarch foreman-selinux-1.7.2.13-1.el7sat.noarch ruby193-rubygem-foreman_bootdisk-4.0.2.13-1.el7sat.noarch foreman-vmware-1.7.2.25-1.el7sat.noarch ruby193-rubygem-foreman_hooks-0.3.7-2.el7sat.noarch rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el7sat.noarch foreman-proxy-1.7.2.4-1.el7sat.noarch hp-ml150g6-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch hp-ml150g6-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-2.noarch foreman-gce-1.7.2.25-1.el7sat.noarch rubygem-hammer_cli_foreman-0.1.4.12-1.el7sat.noarch foreman-compute-1.7.2.25-1.el7sat.noarch ruby193-rubygem-foreman_discovery-2.0.0.14-1.el7sat.noarch rubygem-hammer_cli_foreman_tasks-0.0.3.4-1.el7sat.noarch foreman-libvirt-1.7.2.25-1.el7sat.noarch foreman-postgresql-1.7.2.25-1.el7sat.noarch steps: # hammer os add-ptable --id 1 --ptable-id 1 [Foreman] Username: admin [Foreman] Password for admin: Partition table has been associated
I found there is a typo in host update (underscore in --puppetclass_ids): --puppet-class-ids, --puppetclass_ids PUPPET_CLASS_IDS Comma separated list of values. And Katello part is not fixed at all. Two more PRs will follow. Moving back to ASSIGNED.
First part of Katello related issues that were bugs was fixed upstream with this PR: https://github.com/Katello/hammer-cli-katello/pull/297 U = fixed upstream Ud hammer > content-view > version > delete | --content-view Ud hammer > content-view > version > delete | --content-view-id Ud hammer > content-view > version > info | --content-view Ud hammer > content-view > version > info | --content-view-id Ud hammer > puppet-module > info | --organization Ud hammer > puppet-module > info | --organization-id Ud hammer > puppet-module > info | --organization-label Ud hammer > puppet-module > list | --content-view Ud hammer > puppet-module > list | --content-view-id Ud hammer > puppet-module > list | --organization Ud hammer > puppet-module > list | --organization-id Ud hammer > puppet-module > list | --organization-label Ud hammer > content-view > version > delete | --organization Ud hammer > content-view > version > delete | --organization-id Ud hammer > content-view > version > delete | --organization-label Ud hammer > content-view > version > info | --organization Ud hammer > content-view > version > info | --organization-id Ud hammer > content-view > version > info | --organization-label Ud hammer > content-view > version > list | --organization Ud hammer > content-view > version > list | --organization-id Ud hammer > content-view > version > list | --organization-label
Rest of the Katello related issues were fixed with MR https://gitlab.sat.lab.tlv.redhat.com/satellite6/hammer-cli-katello/merge_requests/5 Kind of change: d = deleted, r = renamed Options agged with deprecation warning r hammer > content-view > add-version | --content-view => --name r hammer > content-view > add-version | --content-view-id => --id r hammer > content-view > remove-version | --content-view => --name r hammer > content-view > remove-version | --content-view-id => --id r hammer > content-view > version > delete | --name => --version r hammer > content-view > version > info | --name => --version r hammer > content-view > version > promote | --name => --version r hammer > content-view > version > promote | --lifecycle-environment => --to-lifecycle-environment r hammer > content-view > version > promote | --lifecycle-environment-id => --to-lifecycle-environment-id r hammer > content-view > puppet-module > add | --uuid => --id r hammer > product > set-sync-plan | --sync_plan_id => --sync-plan-id d hammer > product > remove-sync-plan | --sync-plan d hammer > product > remove-sync-plan | --sync-plan-id
Fix for the typo in 'host update' (see comment#10 for details) is in https://gitlab.sat.lab.tlv.redhat.com/satellite6/hammer-cli-foreman/merge_requests/6
Now all the necessary PRs have been submited and linked in this BZ.
Upstream PR on hammer-cli-katello was merged. Moving to POST. To fix this downstream: Cherry-pick: https://github.com/Katello/hammer-cli-katello/pull/297 Review and Merge: https://gitlab.sat.lab.tlv.redhat.com/satellite6/hammer-cli-katello/merge_requests/5 Review and Merge: https://gitlab.sat.lab.tlv.redhat.com/satellite6/hammer-cli-foreman/merge_requests/6
VERIFIED: # rpm -qa | grep foreman foreman-compute-1.7.2.26-1.el6_6sat.noarch ruby193-rubygem-foreman-redhat_access-0.1.0-1.el6_6sat.noarch rubygem-hammer_cli_foreman-0.1.4.13-1.el6_6sat.noarch foreman-vmware-1.7.2.26-1.el6_6sat.noarch ruby193-rubygem-foreman_bootdisk-4.0.2.13-1.el6_6sat.noarch ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el6_6sat.noarch foreman-postgresql-1.7.2.26-1.el6_6sat.noarch foreman-libvirt-1.7.2.26-1.el6_6sat.noarch ruby193-rubygem-foreman-tasks-0.6.12.7-1.el6_6sat.noarch rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el6_6sat.noarch rubygem-hammer_cli_foreman_docker-0.0.3.6-1.el6_6sat.noarch foreman-selinux-1.7.2.13-1.el6_6sat.noarch foreman-debug-1.7.2.26-1.el6_6sat.noarch foreman-ovirt-1.7.2.26-1.el6_6sat.noarch foreman-gce-1.7.2.26-1.el6_6sat.noarch ruby193-rubygem-foreman_discovery-2.0.0.15-1.el6_6sat.noarch foreman-proxy-1.7.2.5-1.el6_6sat.noarch rubygem-hammer_cli_foreman_tasks-0.0.3.4-1.el6_6sat.noarch intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch ruby193-rubygem-foreman_docker-1.2.0.14-1.el6_6sat.noarch intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch foreman-1.7.2.26-1.el6_6sat.noarch ruby193-rubygem-foreman_hooks-0.3.7-2.el6_6sat.noarch rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el6_6sat.noarch steps: # hammer content-view add-version --help --id, --name # hammer content-view remove-version --help --id, --name # hammer content-view version info --help --version, --name VERSION # hammer content-view version delete --help --version, --name VERSION # hammer > content-view > version > promote ,--to-lifecycle-environment --to-lifecycle-environment-id --version # hammer content-view puppet-module add --help --id # hammer product set-sync-plan --help --sync-plan-id
This bug is slated to be released with Satellite 6.1.
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.