Bug 842271 - CLI: list the "bugfix" errata for system group shows empty result
CLI: list the "bugfix" errata for system group shows empty result
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: Martin Bacovsky
Hayk Hovsepyan
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-23 06:01 EDT by Hayk Hovsepyan
Modified: 2014-09-18 12:42 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The command line did not return any errata, even if "bugfix" errata existed. This is due to an incorrect filtering value. This fix corrects the filtering value. The command line now displays "bugfix" errata.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 14:47:59 EST
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 Hayk Hovsepyan 2012-07-23 06:01:51 EDT
Description of problem:
CLI command: "errata system_group --name $systemgroupname --org $orgname --type bugfix" does not return any errata, but "bugfix" errata exists.
For example running:
"errata system_group --name $systemgroupname --org $orgname"
command returns "bugfix", "enhancement" and "security" errata.

But it works for security errata:
"errata system_group --name $systemgroupname --org $orgname --type security"
this command returns errata list correctly.

Version-Release number of selected component (if applicable):
python-qpid-0.14-7.el6_2.noarch
qpid-cpp-server-0.14-14.el6_2.x86_64
katello-glue-candlepin-0.2.47-1.git.225.b3aa579.el6.noarch
pulp-1.1.11-1.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-repos-0.2.6-1.el6.noarch
m2crypto-0.21.1.pulp-7.el6.x86_64
candlepin-0.5.32-1.el6.noarch
qpid-cpp-client-0.14-14.el6_2.x86_64
katello-common-0.2.47-1.git.225.b3aa579.el6.noarch
pulp-selinux-server-1.1.11-1.el6.noarch
katello-agent-1.0.4-1.git.11.1606589.el6.noarch
python-oauth2-1.5.170-2.pulp.el6.noarch
pulp-common-1.1.11-1.el6.noarch
katello-certs-tools-1.1.6-1.git.572.1606589.el6.noarch
qpid-cpp-server-ssl-0.14-14.el6_2.x86_64
katello-glue-pulp-0.2.47-1.git.225.b3aa579.el6.noarch
katello-0.2.47-1.git.225.b3aa579.el6.noarch
katello-configure-0.2.30-1.git.16.0e273d4.el6.noarch
candlepin-tomcat6-0.5.32-1.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-cli-0.2.43-1.git.16.350a9f2.el6.noarch
mod_wsgi-3.3-3.pulp.el6.x86_64
qpid-cpp-client-ssl-0.14-14.el6_2.x86_64
katello-glue-foreman-0.2.47-1.git.225.b3aa579.el6.noarch
katello-selinux-0.2.6-1.git.9.1606589.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-common-0.2.43-1.git.16.350a9f2.el6.noarch

How reproducible:
always

Steps to Reproduce:
1.Import some manifest which repos contain errata.
For example standart ACME_Corporation manifest with RHEL6. Activate the repo " Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server" and sync it.
Add repo, erratas to template.
Add the product and template to changeset and promote it.

2. Make sure you have katello-agent installed on a system and "goferd" service running on that system.
Subscribe that system.
On that client system execute:
sed -i -e "s/certFrequency.*/certFrequency = 4/" /etc/rhsm/rhsm.conf
service rhsmcertd restart
This is for updating certificate refresh frequency.

3. Create system group and add subscribed client system to it.

4. Execut CLI command: "errata system_group --name $systemgroupname --org $orgname --type bugfix" and you will see that it returns empty result.
  
Actual results:
Empty errata list is returned. 

Expected results:
"bugfix" errata list should be returned, like it returns for "security".


Additional info:
"errata system_group --name $systemgroupname --org $orgname --type security" returns correct list.
"errata system_group --name $systemgroupname --org $orgname" returns all list which contains "bugfix" errata.
Comment 1 Martin Bacovsky 2012-09-07 09:59:07 EDT
Here is reproducer with custom testing repo:
# Setup org and test env with promoted data
kk org create --name AAA
kk provider create --name MB --org AAA
kk product create --name Zoo --provider MB --org AAA
kk gpg_key create --name Zoo --file RPM-GPG-KEY-dummy-packages-generator --org AAA
kk repo create --name Zoo8 --url "http://mbacovsk.fedorapeople.org/Zoo8/" --product Zoo --org AAA --gpgkey Zoo
kk repo synchronize --name Zoo8 --product Zoo --org AAA
kk environment create --name Test --prior Library --org AAA
kk changeset create --name ChS1 --environment Test --org AAA
kk changeset update --name ChS1 --environment Test --org AAA --add_product Zoo
kk changeset update --name ChS1 --environment Test --org AAA --from_product Zoo --add_repo Zoo8
kk changeset promote --name ChS1 --org=AAA --environment Test

# Create old gorilla and install it on the consumer
create_dummy_package.sh gorilla 0.60 1 '' .
yum localinstall gorilla-0.60-1.noarch.rpm

# subscribe system 
subscription-manager register --username admin --password admin --org AAA --environment Test
subscription-manager list --available
subscription-manager subscribe --pool ff808081399b729f0139a06ecd160023
service rhsmcertd restart

# ad it to system group
kk system_group create --name Test --org AAA
kk system_group add_systems --name Test --org AAA --system_uuids a3eadfcb-fba4-4e88-a00c-59fbd944496e

# Check pulp knows about the old gorilla
pulp-admin consumer info --id a3eadfcb-fba4-4e88-a00c-59fbd944496e --show-profile|grep gorilla
# -> gorilla-0.60-1.noarch

# Check errata was promoted and is applicable (according to Pulp)
pulp-admin errata list --consumerid=a3eadfcb-fba4-4e88-a00c-59fbd944496e
# --> RHEA-2012:0013          bugfix          Gorilla_Erratum

kk errata system --name katest --org AAA
# --> RHEA-2012:0013   Gorilla_Erratum   bugfix 

kk errata system_group --name Test --org AAA
# Id               Title             Type     # Systems  
#-----------------------------------------------------------
# RHEA-2012:0013   Gorilla_Erratum   bugfix   1          

kk errata system_group --name Test --org AAA --type bugfix
# --> none --> THE BUG
Comment 2 Ivan Necas 2012-09-12 14:16:22 EDT
Fixed in commits 0189852 and 5c51a5e in https://github.com/Katello/katello/pull/618
Comment 4 Hayk Hovsepyan 2012-09-18 07:31:16 EDT
Verified on revision:
katello-cli-1.1.8-4.el6cf.noarch
katello-certs-tools-1.1.8-1.el6cf.noarch
candlepin-selinux-0.7.8-1.el6cf.noarch
qpid-cpp-server-ssl-0.14-14.el6_2.x86_64
pulp-selinux-server-1.1.12-1.el6cf.noarch
katello-glue-pulp-1.1.12-7.el6cf.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-common-1.1.8-4.el6cf.noarch
candlepin-0.7.8-1.el6cf.noarch
qpid-cpp-client-ssl-0.14-14.el6_2.x86_64
katello-configure-1.1.9-3.el6cf.noarch
katello-glue-candlepin-1.1.12-7.el6cf.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
candlepin-tomcat6-0.7.8-1.el6cf.noarch
pulp-common-1.1.12-1.el6cf.noarch
qpid-cpp-server-0.14-14.el6_2.x86_64
katello-selinux-1.1.1-1.el6cf.noarch
katello-all-1.1.12-7.el6cf.noarch
python-qpid-0.14-7.el6_2.noarch
python-isodate-0.4.4-4.pulp.el6.noarch
qpid-cpp-client-0.14-14.el6_2.x86_64
pulp-1.1.12-1.el6cf.noarch
katello-common-1.1.12-7.el6cf.noarch
katello-1.1.12-7.el6cf.noarch
katello-qpid-client-key-pair-1.0-1.noarch
m2crypto-0.21.1.pulp-7.el6.x86_64
python-oauth2-1.5.170-2.pulp.el6.noarch
mod_wsgi-3.3-3.pulp.el6.x86_64

By the steps described in bug description. Now it shows errata by each type correctly.
Comment 6 errata-xmlrpc 2012-12-04 14:47:59 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-1543.html

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