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 1136091 - hammer content-host errata apply is only async operation
Summary: hammer content-host errata apply is only async operation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: Unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: sthirugn@redhat.com
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On: 1303570
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-01 16:41 UTC by Pavel Studeník
Modified: 2019-09-26 18:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 09:11:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 11750 0 None None None 2016-04-22 14:56:37 UTC
Red Hat Bugzilla 1303570 0 unspecified CLOSED All package/package-groups commands along with host-name raises failed with error: found more than one host 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1329751 0 unspecified CLOSED hammer host errata apply async - always displays success 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2016:1501 0 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 12:28:58 UTC

Internal Links: 1303570 1329751

Description Pavel Studeník 2014-09-01 16:41:26 UTC
Description of problem:
When I used remote package install/update/remove, the operation is synchronized by default. But When I try to use errata apply, the operation is asynchronous - hammer doesn't wait for pending status is changed.

This behaviour is inconsistent.

>>  hammer --server <SERVER> --username <USER> --password <PASS> content-host errata apply -h

Usage:
    hammer content-host package install [OPTIONS]

Options:
    --async                       Do not wait for the task
    --content-host CONTENT_HOST_NAME Name to search by
    --content-host-id CONTENT_HOST_ID UUID of the content host
    --organization ORGANIZATION_NAME Organization name to search by
    --organization-id ORGANIZATION_ID  
    --organization-label ORGANIZATION_LABEL Organization label to search by
    --packages PACKAGES           List of package names
                                  Comma separated list of values.
    -h, --help                    print help


>> hammer --server <SERVER> --username <USER> --password <PASS> content-host errata apply -h

Usage:
    hammer content-host errata apply [OPTIONS]

Options:
    --content-host CONTENT_HOST_NAME Name to search by
    --content-host-id CONTENT_HOST_ID UUID of the content host
    --errata-ids ERRATA_IDS       List of Errata ids to install
                                  Comma separated list of values.
    --organization ORGANIZATION_NAME Organization name to search by
    --organization-id ORGANIZATION_ID  
    --organization-label ORGANIZATION_LABEL Organization label to search by
    -h, --help                    print help

Version-Release number of selected component (if applicable):
rubygem-hammer_cli_foreman_tasks-0.0.3-3.el6sat.noarch
rubygem-hammer_cli-0.1.1-12.el6sat.noarch
rubygem-hammer_cli_katello-0.0.4-14.el6sat.noarch
rubygem-hammer_cli_foreman-0.1.1-16.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. register system
2. try to remote apply errata
3. check installed package from errata on system

Actual results:
1) operation is asynchronous by default
2) lost synchronize operation 

Expected results:
1) operation is synchronize by default
2) I can use --async flag for asynchronous operation

Comment 1 RHEL Program Management 2014-09-01 16:52:52 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Brad Buckingham 2015-09-09 15:42:18 UTC
Created redmine issue http://projects.theforeman.org/issues/11750 from this bug

Comment 4 Brad Buckingham 2015-09-09 15:47:37 UTC
Upstream hammer-cli-katello PR: 
  https://bugzilla.redhat.com/show_bug.cgi?id=1136091

Comment 5 Bryan Kearney 2015-09-09 16:02:10 UTC
Upstream bug component is Content Management

Comment 6 Bryan Kearney 2015-09-09 18:01:54 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/11750 has been closed
-------------
Brad Buckingham
Applied in changeset commit:hammer-cli-katello|fa017a14a31ebf603e628ac4e7b711af4a9f5902.

Comment 7 Jitendra Yejare 2015-12-18 10:02:03 UTC
Currently, the Content Host registration is failing on Nightly most probably due to Host Unification feature. And hence blocked on verifying this bug.

Comment 10 Jitendra Yejare 2016-04-04 10:02:57 UTC
I was verifying this in Sat 6.2 snap 6.1.

I see --async option is added for errata apply but due to bug 1303570 I cant verify the operation is actually sync by default.

So marking this bug as dependent of 1303570.

Comment 11 sthirugn@redhat.com 2016-04-22 20:36:03 UTC
Verified in Satellite-6.2-Beta-Snap9

Synchronous:
hammer> host errata apply --host-id=4 --errata-ids=RHBA-2016:0545
[...........................................................................................................................................] [100%]
tuned-2.5.1-4.el7_2.3.noarch


Asynchronous:
hammer> host errata apply --host-id=4 --errata-ids=RHBA-2016:0546 --async
Errata applied successfully

But the success message is always displayed while the task was still running which is being tracked in https://bugzilla.redhat.com/show_bug.cgi?id=1329751

Comment 13 errata-xmlrpc 2016-07-27 09:11:01 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-2016:1501


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