Description of problem: System Group copy command in cli failed Version-Release number of selected component (if applicable): # rpm -qa | grep katello signo-katello-0.0.9-1.el6.noarch katello-headpin-1.4.2-1.git.638.2148be1.el6.noarch katello-certs-tools-1.4.2-1.el6.noarch katello-cli-1.4.2-1.git.90.6c7a175.el6.noarch katello-cli-common-1.4.2-1.git.90.6c7a175.el6.noarch katello-glue-candlepin-1.4.2-1.git.638.2148be1.el6.noarch katello-configure-1.4.3-1.git.62.f050662.el6.noarch katello-candlepin-cert-key-pair-1.0-1.noarch katello-glue-elasticsearch-1.4.2-1.git.638.2148be1.el6.noarch katello-selinux-1.4.3-1.git.4.99dc194.el6.noarch katello-common-1.4.2-1.git.638.2148be1.el6.noarch katello-headpin-all-1.4.2-1.git.638.2148be1.el6.noarch katello-repos-1.4.2-1.el6.noarch How reproducible: # yum install -y katello-headpin-all # katello-configure --user-pass=**** Steps to Reproduce: 1.ssh root.eng.bos.redhat.com export LANG=en_US && headpin --username "admin" --password "admin" system_group copy --new_name "system_group1371126808copy" --org "org-1371126131" --name "system_group1371126808" --description "new description" --max_systems "1" Stdout: Stderr: Could not find system group [ system_group1371126808 ] within organization [ org-1371126131 ] ExitCode: 65 Please refer the test report http://hudson.rhq.lab.eng.bos.redhat.com:8080/hudson/job/official-headpin-cli/137/ReportNG_Report/ Actual results: Stderr: Could not find system group [ system_group1371126808 ] within organization [ org-1371126131 ] Expected results: System Group copy command is successful Additional info:
Changes to api/v1/system_groups_controller#index have introduced a race condition: 1) Creating a system group adds it to elasticsearch (an async operation) 2) Immediately calling index() w/ search by name will fail if elasticsearch not finished Potential solutions: 1) Make elasticsearch indexing an orchestration event such that the call to create does not return until elasticsearch has finished. 2) When calling index() w/ name param, use ActiveRecord search instead of elasticsearch
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release.
Testing on latest upstream, I am no longer seeing this problem. This could be due to the fact that a general reindex after save was added. Moving to POST for official testing.
Moving this to be tested during MDP3, not critical for MDP2 success story
# hammer system-group copy --help Usage: hammer system-group copy [OPTIONS] Options: -h, --help print help [root@qetello02 ~]# System-Group copy does not contain help page Cannot determine what exact comments to be passed
Unfortunately, when this command was ported to hammer, it was not functional. That said, a change did go in this week that should address it. The changes were merged with the following PR: https://github.com/Katello/hammer-cli-katello/pull/161 Also, be aware that system-group was renamed to host-collection as part of the Satellite6 integration work; therefore, the new command will be: 'host-collection copy'
# hammer --help Usage: hammer [OPTIONS] SUBCOMMAND [ARG] ... Parameters: SUBCOMMAND subcommand [ARG] ... subcommand arguments Subcommands: activation-key Manipulate activation keys. architecture Manipulate architectures. compute-resource Manipulate compute resources. content-host manipulate content hosts on the server content-view Manipulate content views. domain Manipulate domains. environment Manipulate environments. fact Search facts. global-parameter Manipulate global parameters. gpg manipulate GPG Key actions on the server host Manipulate hosts. host-collection Manipulate host collections hostgroup Manipulate hostgroups. lifecycle-environment manipulate lifecycle_environments on the server location Manipulate locations. medium Manipulate installation media. model Manipulate hardware models. organization Manipulate organizations os Manipulate operating system. partition-table Manipulate partition tables. ping get the status of the server product Manipulate products. proxy Manipulate smart proxies. puppet-class Search puppet modules. puppet-module View Puppet Module details. report Browse and read reports. repository Manipulate repositories repository-set manipulate repository sets on the server sc-param Manipulate smart class parameters. shell Interactive shell subnet Manipulate subnets. subscription Manipulate subscriptions. sync-plan Manipulate sync plans task Tasks related actions. template Manipulate config templates. user Manipulate users. Options: --autocomplete LINE Get list of possible endings --csv Output as CSV (same as --output=csv) --csv-separator SEPARATOR Character to separate the values --interactive INTERACTIVE Explicitly turn interactive mode on/off One of true/false, yes/no, 1/0. --output ADAPTER Set output format. One of [table, base, silent, csv] --show-ids Show ids of associated resources --version show version -c, --config CFG_FILE path to custom config file -d, --debug show debugging output -h, --help print help -p, --password PASSWORD password to access the remote system -u, --username USERNAME username to access the remote system -v, --verbose be verbose There is no sub command system-copy
This was delivered with 6.0.3, which is the Satellite 6 Beta.