Bug 975437 - Headpin Nightly : System Group info command in cli failing in jenkins automated job
Headpin Nightly : System Group info command in cli failing in jenkins automat...
Status: CLOSED WORKSFORME
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.3
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Katello Bug Bin
Tazim Kolhar
:
Depends On:
Blocks: sam20-tracker
  Show dependency treegraph
 
Reported: 2013-06-18 09:11 EDT by Tazim Kolhar
Modified: 2016-04-25 20:55 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-27 17:10:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tazim Kolhar 2013-06-18 09:11:41 EDT
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:
Comment 1 Tazim Kolhar 2013-09-10 00:25:50 EDT
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
Comment 2 sthirugn@redhat.com 2014-06-27 17:10:33 EDT
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

Note You need to log in before you can comment on or make changes to this bug.