Description of problem: Headpin Nightly : System Group info command in cli failing in jenkins automated job Version-Release number of selected component (if applicable): # rpm -qa | grep katello katello-selinux-1.4.3-1.git.4.99dc194.el6.noarch katello-cli-1.4.2-1.git.93.702d2fb.el6.noarch katello-repos-1.4.2-1.el6.noarch signo-katello-0.0.9-1.el6.noarch katello-glue-elasticsearch-1.4.2-1.git.665.3adc4eb.el6.noarch katello-candlepin-cert-key-pair-1.0-1.noarch katello-common-1.4.2-1.git.665.3adc4eb.el6.noarch katello-headpin-1.4.2-1.git.665.3adc4eb.el6.noarch katello-certs-tools-1.4.2-1.el6.noarch katello-headpin-all-1.4.2-1.git.665.3adc4eb.el6.noarch katello-configure-1.4.3-1.git.62.f050662.el6.noarch katello-glue-candlepin-1.4.2-1.git.665.3adc4eb.el6.noarch katello-cli-common-1.4.2-1.git.93.702d2fb.el6.noarch How reproducible: # yum install -y katello-headpin-all # katello-configure --user-pass=**** --deployment=headpin Steps to Reproduce: Please refer the latest TestNG reports 1.http://hudson.rhq.lab.eng.bos.redhat.com:8080/hudson/view/qe-headpin/job/official-headpin-cli/152/ReportNG_Report/ 2.Also, on same system if we try the command manually it runs correctly [root@hp-sl2x170zg6-02 ~]# headpin --username **** --password "admin" system_group info --org "org-1371548973" --name "system_group1371549699"-------------------------------------------------------------------------------- System Group Information For Org [ org-1371548973 ] -------------------------------------------------------------------------------- ID : 46 Name : system_group1371549699 Description: None Max Systems : -1 [root@hp-sl2x170zg6-02 ~]# headpin --username **** --password "admin" system_group info --org "org-1371548973" --name "system_group1371549677new"-------------------------------------------------------------------------------- System Group Information For Org [ org-1371548973 ] -------------------------------------------------------------------------------- ID : 42 Name : system_group1371549677new Description: new description Max Systems : 1 Execpt this one which is failing in both : [root@hp-sl2x170zg6-02 ~]# headpin --username *** --password "admin" system_group info --org "org-1371548973" --name "system_group1371549643copy"Could not find system group [ system_group1371549643copy ] within organization [ org-1371548973 ] Actual results: Expected results: Additional info:
Please. refer to this explanation 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 there was a similar BZ filed but the cli command is different (same feature) https://bugzilla.redhat.com/show_bug.cgi?id=974115#c2 I hope this is information makes sense Thanks
This works fine in SAM 1.4. Please reopen if this fails again. # system_group info --org "ACME_Corporation" --name "sg1" ------------------------------------------------------------------------------------- System Group Information For Org [ ACME_Corporation ] ------------------------------------------------------------------------------------- ID : 1 Name : sg1 Description: None Max Systems : -1