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 1133245 - content-host errata apply gives success message for an invalid errata id
Summary: content-host errata apply gives success message for an invalid errata id
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Stephen Benjamin
QA Contact: sthirugn@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-23 18:29 UTC by sthirugn@redhat.com
Modified: 2017-02-23 21:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 05:12:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1592 0 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC

Description sthirugn@redhat.com 2014-08-23 18:29:18 UTC
Description of problem:
content-host errata apply gives success message for an invalid errata id

Version-Release number of selected component (if applicable):
GA Snap 6 - Satellite-6.0.4-RHEL-6-20140820.1

* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.9.23-1.el6_5.noarch
* candlepin-common-1.0.1-1.el6_5.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.9.23-1.el6_5.noarch
* candlepin-tomcat6-0.9.23-1.el6_5.noarch
* elasticsearch-0.90.10-6.el6sat.noarch
* foreman-1.6.0.41-1.el6sat.noarch
* foreman-compute-1.6.0.41-1.el6sat.noarch
* foreman-gce-1.6.0.41-1.el6sat.noarch
* foreman-libvirt-1.6.0.41-1.el6sat.noarch
* foreman-ovirt-1.6.0.41-1.el6sat.noarch
* foreman-postgresql-1.6.0.41-1.el6sat.noarch
* foreman-proxy-1.6.0.29-1.el6sat.noarch
* foreman-selinux-1.6.0.7-1.el6sat.noarch
* foreman-vmware-1.6.0.41-1.el6sat.noarch
* katello-1.5.0-29.el6sat.noarch
* katello-ca-1.0-1.noarch
* katello-certs-tools-1.5.6-1.el6sat.noarch
* katello-installer-0.0.60-1.el6sat.noarch
* openldap-2.4.23-34.el6_5.1.x86_64
* openldap-devel-2.4.23-34.el6_5.1.x86_64
* pulp-katello-0.3-3.el6sat.noarch
* pulp-nodes-common-2.4.0-0.30.beta.el6sat.noarch
* pulp-nodes-parent-2.4.0-0.30.beta.el6sat.noarch
* pulp-puppet-plugins-2.4.0-0.30.beta.el6sat.noarch
* pulp-puppet-tools-2.4.0-0.30.beta.el6sat.noarch
* pulp-rpm-plugins-2.4.0-0.30.beta.el6sat.noarch
* pulp-selinux-2.4.0-0.30.beta.el6sat.noarch
* pulp-server-2.4.0-0.30.beta.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
* ruby193-rubygem-runcible-1.1.0-2.el6sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Try to install an invalid errata id on a content host

hammer> content-host errata apply --errata-ids RHSA-2014:0981111111 --content-host-id 87c7c1cd-b01f-479f-a3e2-558455272b7c
Errata applied successfully


Actual results:
Errata applied successfully

Expected results:
Errata id is not found

Additional info:

Comment 2 Pavel Studeník 2014-08-26 14:00:02 UTC
If you fill empty errata id, then you get correct result without effect.

>> hammer --server <HOST> --username <USER> --password <PASS> content-host errata apply --content-host-id 6cd64fd6-a2fb-4d33-a181-aa626cc4d4df

         "input" => "undefined method `join' for nil:NilClass (NoMethodError)\n/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/katello/system/erratum/install.rb:36:in 
`humanized_input'\n/opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.9/app/models/foreman_tasks/task/dynflow_task.rb:72:in `get_humanized'\n/opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.9/app/models/foreman_tasks/task/dynflow_task.rb:52:in `humanized'\n/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/helpers.rb:18:in 
... cut ...
`respond_with_template'\n/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/api/v2/rendering.rb:50:in `respond_with_template_resource'\n    ... skipped 106 lines",
        "output" => "",
        "errors" => []
    },
    "cli_example" => nil
}
Errata applied successfully

>> echo $?
0

Comment 3 Pavel Studeník 2014-09-02 16:03:16 UTC
Comment 2 - The problem is on server side, too. I created new bug for server bz1136467. On client (hammer) fix doesn't suffice. Problem is on REST API.

Comment 4 Stephen Benjamin 2015-03-06 12:30:11 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9503 has been closed
-------------
Anonymous
Applied in changeset commit:katello|33112a4e0713904dbe40a755a94474c352b42a5f.

Comment 7 sthirugn@redhat.com 2015-03-17 20:31:54 UTC
Verified.
Version Tested:
Satellite-6.1.0-RHEL-6-20150311.1

Valid errata id:
hammer> content-host errata apply --errata-ids RHSA-2015:0672  --content-host-id beb3deab-0449-4c1d-8a14-c7a74bf5143e
Errata applied successfully

Invalid errata id:
hammer> content-host errata apply --errata-ids RHSA-2015:06721111  --content-host-id beb3deab-0449-4c1d-8a14-c7a74bf5143e
Could not apply errata:
  Couldn't find errata ids 'RHSA-2015:06721111'

Comment 8 Bryan Kearney 2015-08-11 13:28:27 UTC
This bug is slated to be released with Satellite 6.1.

Comment 9 errata-xmlrpc 2015-08-12 05:12:59 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/RHSA-2015:1592


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