Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1481779

Summary: Applying an Errata from WebUI does not work and wrongly indicates a Success result.
Product: Red Hat Satellite Reporter: Christian Marineau <cmarinea>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: urgent Docs Contact:
Priority: high    
Version: 6.2.11CC: aruzicka, bbuckingham, bkearney, cdonnell, egolov, inecas, jcallaha, jsherril, mhrivnak, mmccune, nkim, rjerrido, ttereshc
Target Milestone: UnspecifiedKeywords: PrioBumpGSS, Regression, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-17 02:38:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
before fix
none
after fix rhel7
none
after fix rhel6
none
rhel6 sat logs
none
rhel7 sat logs none

Description Christian Marineau 2017-08-15 16:58:20 UTC
Description of problem:
When trying to apply an errata to a Content Host from the Satellite WebUI, the task is processed quickly and indicates a result of success, however no packages are updated on the client.


Version-Release number of selected component (if applicable):
6.2.11

How reproducible:
100% so far

Steps to Reproduce:
1. Navigate to a Content Host to its Errata tab 

2. Click on a Errata to see the related packages version.
     i.e.: RHSA-2017:2459 
          libsoup-2.56.0-4.el7_4.x86_64 

3. Connect to your client an list the info about this package
     i.e.:
     # yum info libsoup
      Installed Packages
       Name        : libsoup
       Arch        : x86_64
       Version     : 2.48.1
       Release     : 6.el7
       Size        : 1.2 M
       Repo        : installed
       [...]
     Available Packages
       Name        : libsoup
       Arch        : x86_64
       Version     : 2.56.0
       Release     : 4.el7_4
       Size        : 398 k
       [...]

4. From the WebUI, select the Errata and apply it (Apply Selected)

5. If the katello-agent is working correctly on the client, the Task will complete quickly with "success"

6. From the client, run the same yum info command for the same package:
     i.e.:
     # yum info libsoup
      Installed Packages
       Name        : libsoup
       Arch        : x86_64
       Version     : 2.48.1
       Release     : 6.el7
       Size        : 1.2 M
       Repo        : installed
       [...]
     Available Packages
       Name        : libsoup
       Arch        : x86_64
       Version     : 2.56.0
       Release     : 4.el7_4
       Size        : 398 k
       [...]
   
   The package was not updated, and the Task is misleading about the current state.
     
    
Actual results:
Packages are not updated
Tasks are wrongfully indicating a Success result which is misleading.

Expected results:
Have the package updated, and have the task reporting the accurate information.

Additional info:
The issue was seen on older and on the latest katello-agent version.

These goferd logs are seen in /var/log/messages
Aug 15 07:54:31 testclient goferd: [INFO][worker-0] gofer.messaging.adapter.connect:28 - connecting: proton+amqps://satellite.test.com:5647
Aug 15 07:54:31 testclient goferd: [INFO][worker-0] gofer.messaging.adapter.proton.connection:87 - open: URL: amqps://satellite.test.com:5647|SSL: ca: /etc/rhsm/ca/katello-default-ca.pem|key: None|certificate: /etc/pki/consumer/bundle.pem|host-validation: None
Aug 15 07:54:31 testclient goferd: [INFO][worker-0] root:490 - connecting to satellite.test.com:5647...
Aug 15 07:54:31 testclient goferd: [INFO][worker-0] gofer.messaging.adapter.proton.connection:92 - opened: proton+amqps://satellite.test.com:5647
Aug 15 07:54:31 testclient goferd: [INFO][worker-0] gofer.messaging.adapter.connect:30 - connected: proton+amqps://satellite.test.com:5647
Aug 15 07:54:31 testclient goferd: [INFO][worker-0] root:512 - connected to satellite.test.com:5647
Aug 15 07:54:32 testclient goferd: [INFO][worker-0] gofer.rmi.dispatcher:603 - call: Content.install() sn=eb47bcee-ea88-48de-b5e8-7912ac84ed43 data={'task_id': 'd27fb210-06c7-4664-9267-27ba51b4ce77', 'consumer_id': '919a06a2-7ffc-4017-917f-06d4943a9639'}
Aug 15 07:54:32 testclient goferd: [INFO][worker-0] gofer.agent.rmi:193 - Request: eb47bcee-ea88-48de-b5e8-7912ac84ed43, committed
Aug 15 07:54:32 testclient goferd: [INFO][worker-0] gofer.agent.rmi:147 - Request: eb47bcee-ea88-48de-b5e8-7912ac84ed43 processed in: 2.012 (seconds)
Aug 15 07:54:33 testclient goferd: [INFO][worker-0] gofer.messaging.adapter.proton.connection:131 - closed: proton+amqps://satellite.test.com:5647

Comment 6 Michael Hrivnak 2017-08-15 21:37:07 UTC
** Explanation:

jsherril suspected that a backport changing how errata package lists are stored in Pulp did not take into account that the older code base used a different (and since-removed) code path for calculating which RPMs should be installed for a given erratum.

ttereshc and I chased down that theory, confirmed it to be true, and found the responsible code. Following the cited backport, errata have their package lists stored in a separate database collection. Any code that wants to use the "pkglist" attribute of an erratum depends on the fact that the package list data has been loaded from the DB. A code path only present in the older code base did not proactively facilitate loading the package list data, and thus the errata appeared to have empty package lists when they got used.

** Next Steps:

ttereshc is planning to create a patch that causes each of the errata to have its package list populated before it is used for determining which RPMs to install. We will test that patch on an internal reproducer and report back.

Comment 9 Evgeni Golov 2017-08-16 13:09:15 UTC
*** Bug 1482017 has been marked as a duplicate of this bug. ***

Comment 13 jcallaha 2017-08-16 20:42:22 UTC
Verified in Satellite 6.2.11 Async 2.

Before the fix, I was able to reproduce the issue on both RHEL6 and RHEL7 systems. See attached for before errata install task completion. Also see the yum info below. After the fix, both RHEL6 and RHEL7 correctly applied the errata. See attached verification screenshots. I'm also including the relevant logs for both satellites while they were applying the errata.

-bash-4.2# yum info curl
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager
Installed Packages
Name        : curl
Arch        : x86_64
Version     : 7.29.0
Release     : 35.el7
Size        : 527 k
Repo        : installed
From repo   : beaker-Server
Summary     : A utility for getting files from remote servers (FTP, HTTP, and others)
URL         : http://curl.haxx.se/
License     : MIT
Description : curl is a command line tool for transferring data with URL syntax, supporting
            : FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP,
            : SMTP, POP3 and RTSP.  curl supports SSL certificates, HTTP POST, HTTP PUT, FTP
            : uploading, HTTP form based upload, proxies, cookies, user+password
            : authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer
            : resume, proxy tunneling and a busload of other useful tricks.

Available Packages
Name        : curl
Arch        : x86_64
Version     : 7.29.0
Release     : 42.el7
Size        : 267 k
Repo        : rhel-7-server-rpms/7Server/x86_64
Summary     : A utility for getting files from remote servers (FTP, HTTP, and others)
URL         : http://curl.haxx.se/
License     : MIT
Description : curl is a command line tool for transferring data with URL syntax, supporting
            : FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP,
            : SMTP, POP3 and RTSP.  curl supports SSL certificates, HTTP POST, HTTP PUT, FTP
            : uploading, HTTP form based upload, proxies, cookies, user+password
            : authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer
            : resume, proxy tunneling and a busload of other useful tricks.

Uploading Enabled Reposistories Report
Loaded plugins: product-id

----- attempted to install errata -----

-bash-4.2# yum info curl
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager
Installed Packages
Name        : curl
Arch        : x86_64
Version     : 7.29.0
Release     : 35.el7
Size        : 527 k
Repo        : installed
From repo   : beaker-Server
Summary     : A utility for getting files from remote servers (FTP, HTTP, and others)
URL         : http://curl.haxx.se/
License     : MIT
Description : curl is a command line tool for transferring data with URL syntax, supporting
            : FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP,
            : SMTP, POP3 and RTSP.  curl supports SSL certificates, HTTP POST, HTTP PUT, FTP
            : uploading, HTTP form based upload, proxies, cookies, user+password
            : authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer
            : resume, proxy tunneling and a busload of other useful tricks.

Available Packages
Name        : curl
Arch        : x86_64
Version     : 7.29.0
Release     : 42.el7
Size        : 267 k
Repo        : rhel-7-server-rpms/7Server/x86_64
Summary     : A utility for getting files from remote servers (FTP, HTTP, and others)
URL         : http://curl.haxx.se/
License     : MIT
Description : curl is a command line tool for transferring data with URL syntax, supporting
            : FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP,
            : SMTP, POP3 and RTSP.  curl supports SSL certificates, HTTP POST, HTTP PUT, FTP
            : uploading, HTTP form based upload, proxies, cookies, user+password
            : authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer
            : resume, proxy tunneling and a busload of other useful tricks.

Uploading Enabled Reposistories Report
Loaded plugins: product-id

----- installed errata after fix -----

-bash-4.2# yum info curl
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager
Installed Packages
Name        : curl
Arch        : x86_64
Version     : 7.29.0
Release     : 42.el7
Size        : 527 k
Repo        : installed
From repo   : rhel-7-server-rpms
Summary     : A utility for getting files from remote servers (FTP, HTTP, and others)
URL         : http://curl.haxx.se/
License     : MIT
Description : curl is a command line tool for transferring data with URL syntax, supporting
            : FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP,
            : SMTP, POP3 and RTSP.  curl supports SSL certificates, HTTP POST, HTTP PUT, FTP
            : uploading, HTTP form based upload, proxies, cookies, user+password
            : authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer
            : resume, proxy tunneling and a busload of other useful tricks.

Uploading Enabled Reposistories Report
Loaded plugins: product-id

Comment 14 jcallaha 2017-08-16 20:43:26 UTC
Created attachment 1314383 [details]
before fix

Comment 15 jcallaha 2017-08-16 20:44:02 UTC
Created attachment 1314384 [details]
after fix rhel7

Comment 16 jcallaha 2017-08-16 20:44:28 UTC
Created attachment 1314385 [details]
after fix rhel6

Comment 17 jcallaha 2017-08-16 20:44:53 UTC
Created attachment 1314386 [details]
rhel6 sat logs

Comment 18 jcallaha 2017-08-16 20:45:15 UTC
Created attachment 1314387 [details]
rhel7 sat logs

Comment 20 errata-xmlrpc 2017-08-17 02:38:42 UTC
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.

https://access.redhat.com/errata/RHBA-2017:2487