Bug 969365

Summary: provider refresh_manifest does not work
Product: Red Hat Satellite Reporter: Ales Dujicek <adujicek>
Component: APIAssignee: Petr Chalupa <pchalupa>
Status: CLOSED CURRENTRELEASE QA Contact: Tazim Kolhar <tkolhar>
Severity: high Docs Contact:
Priority: unspecified    
Version: NightlyCC: cwelton, jmontleo, mmccune, omaciel, tkolhar, tsanders
Target Milestone: UnspecifiedKeywords: Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-02 14:14:27 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:

Description Ales Dujicek 2013-05-31 10:01:25 UTC
Description of problem:

When refreshing manifest you get undefined method exception:

provider refresh_manifest --org org --name "Red Hat"

undefined method `queue_refresh_manifest' for #<Provider id: 67, name: "Red Hat", description: nil, repository_url: "https://cdn.redhat.com", provider_type: "Red Hat", organization_id: 30, created_at: "2013-05-31 08:35:04", updated_at: "2013-05-31 08:58:22", task_status_id: 102, discovery_url: nil, discovered_repos: [], discovery_task_id: nil>

it does not matter whether you import any manifest before or not, error is still the same


Version-Release number of selected component (if applicable):
katello-glue-candlepin-1.4.2-1.git.478.8271f2c.el6.noarch
katello-glue-pulp-1.4.2-1.git.478.8271f2c.el6.noarch
signo-katello-0.0.9-1.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-1.4.2-1.git.71.2a2d883.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-repos-1.4.2-1.el6.noarch
katello-cli-common-1.4.2-1.git.71.2a2d883.el6.noarch
katello-certs-tools-1.4.2-1.el6.noarch
katello-configure-1.4.3-1.git.41.e1043b5.el6.noarch
katello-common-1.4.2-1.git.478.8271f2c.el6.noarch
katello-all-1.4.2-1.git.478.8271f2c.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-glue-elasticsearch-1.4.2-1.git.478.8271f2c.el6.noarch
katello-selinux-1.4.3-1.git.3.ce8227b.el6.noarch
katello-1.4.2-1.git.478.8271f2c.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. provider refresh_manifest --org org --name "Red Hat"

Comment 2 Petr Chalupa 2013-10-15 06:35:50 UTC
Looks like it's already fixed.

Comment 4 Mike McCune 2013-10-17 21:00:06 UTC
Moving this to be tested during MDP3, not critical for MDP2 success story

Comment 5 Corey Welton 2014-04-14 19:03:16 UTC
The new command in latest builds is

hammer subscription refresh-manifest  --organization-id "ACME_Corporation"

Comment 6 Corey Welton 2014-04-14 19:08:57 UTC
I think this fails.  If I modify the command per above and try it twice, it errors and then gives a different error when I try again.  


[root@ibm-x3250m4-02 ~]#  hammer subscription refresh-manifest  --organization-id "ACME_Corporation"
Task 3d4bdaa0-c7ee-4251-b77f-b46297d7b8e4: error
[root@ibm-x3250m4-02 ~]#  hammer subscription refresh-manifest  --organization-id "ACME_Corporation"
Manifest refresh failed:
  required lock: #<ForemanTasks::Lock:0x007fa954beedd0> conflicts wiht [#<ForemanTasks::Lock id: 11, task_id: "3d4bdaa0-c7ee-4251-b77f-b46297d7b8e4", name: "read", resource_type: "Katello::Provider", resource_id: 1, exclusive: true>]

I don't get any errors of interest in candlepin.log or candlepin/error.log

Comment 7 Petr Chalupa 2014-04-22 07:49:43 UTC
This is not necessary a bug. The `required lock` error means that the resource is still locked by the other task '3d4bdaa0-c7ee-4251-b77f-b46297d7b8e4' please try refresh-manifest later or investigate status of the task locking the resource. Corey, ping me if you need more information.

Comment 8 Mike McCune 2014-06-16 21:09:16 UTC
Just tested this with SNAP9, works fine.

1) Imported manifest
2) Went to customer portal
3) Added 2 new subscriptions
4) refreshed manifest via hammer CLI
5) new subs showed up in Sat6 Subscription UI

Comment 9 Tazim Kolhar 2014-06-17 09:55:40 UTC
VERIFIED

# hammer subscription refresh-manifest --organization ACME_Corporation
[......................................................................] [100%]
Task a31d4382-7d11-4353-bc38-62fc28bde3b8: success

Comment 10 Bryan Kearney 2014-07-02 14:09:00 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.

Comment 11 Bryan Kearney 2014-07-02 14:09:00 UTC
This was delivered in 6.0.3, the Beta version of Satellite 6.0

Comment 12 Bryan Kearney 2014-07-02 14:14:27 UTC
This was delivered in the Satellite 6 Beta (6.0.3)