Bug 1311885

Summary: hammer reports "Errata applied successfully" even on unapplicable errata "applied"
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: Errata ManagementAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.6CC: tstrachota
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-04 13:18:59 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:

Description Pavel Moravec 2016-02-25 09:41:06 UTC
Description of problem:
Attempting to apply an un-applicable errata to some content host (i.e. errata from some repository disabled on the content host) via hammer, Satellite's task finishes with warning, but hammer responds "Errata applied successfully". That makes wrong assumption the errata was applied.


Version-Release number of selected component (if applicable):
Sat 6.1.7
rubygem-hammer_cli_foreman_tasks-0.0.3.5-1.el7sat.noarch
rubygem-hammer_cli_foreman_docker-0.0.3.10-1.el7sat.noarch
rubygem-hammer_cli_katello-0.0.7.21-1.el7sat.noarch
rubygem-hammer_cli_foreman-0.1.4.15-1.el7sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el7sat.noarch
rubygem-hammer_cli-0.1.4.13-1.el7sat.noarch
rubygem-hammer_cli_gutterball-0.0.1.3-1.el7sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el7sat.noarch
rubygem-hammer_cli_import-0.10.20-1.el7sat.noarch


How reproducible:
100%


Steps to Reproduce:
1. Have a content host (not capsule) and try to apply capsule-related errata:
hammer> content-host errata apply --errata-ids RHBA-2016:0076 --organization-id 1 --content-host-id 4b88921f-ff1b-474b-a657-90bd9b022638


Actual results:
Errata applied successfully


Expected results:
Ideally, provide equivalent information what pulp logs to /var/log/messages:

Feb 25 10:32:17 pmoravec-sat61-rhel7 pulp: pulp.server.webservices.middleware.exception:INFO: Unable to find errata with unit_key [{'id': 'RHBA-2016:0076'}] in bound repos [[u'Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Satellite_Tools_6_1_for_RHEL_7_Server_RPMs_x86_64', u'Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7Server']] to consumer [4b88921f-ff1b-474b-a657-90bd9b022638]

or at least the warning details from WebUI (here:

 Error:
RestClient::BadRequest
400 Bad Request

though I do think this error should have the pulp error detail as well)


Additional info:

Comment 2 Bryan Kearney 2016-07-26 15:25:24 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 3 Bryan Kearney 2016-07-26 15:35:06 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 5 Bryan Kearney 2017-08-04 13:18:59 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in product in the forseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.