Bug 1164233
Summary: | Provide better error string when attempting to synchronize internal capsule | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Pavel Moravec <pmoravec> |
Component: | Hammer | Assignee: | Brad Buckingham <bbuckingham> |
Status: | CLOSED ERRATA | QA Contact: | Kedar Bidarkar <kbidarka> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 6.0.4 | CC: | bbuckingham, bkearney, ehelms, kbidarka, sghai, sthirugn, tcarlin |
Target Milestone: | Unspecified | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | rubygem-hammer_cli_katello-0.0.22.10-1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-07-27 11:13:25 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
Pavel Moravec
2014-11-14 12:05:17 UTC
Btw expected workaround in using --name instead of --id does _not_ work: # hammer -u admin -p <password> capsule content synchronize --name pmoravec-sat6.example.com Could not synchronize capsule content: Error: undefined method `[]' for nil:NilClass # 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. Running hammer in debug mode, it apparently makes proper REST API method: [ INFO 2014-11-14 13:13:54 API] POST /katello/api/capsules/1/content/sync [DEBUG 2014-11-14 13:13:54 API] Params: {} [DEBUG 2014-11-14 13:13:54 API] Headers: {} [ERROR 2014-11-14 13:13:54 API] 404 Resource Not Found That corresponds to API guide, Section "12.5. Synchronize Content to Capsule". After discussing with akrzos, this is "almost" expected behaviour. Capsule sync can be done only for _external_ capsules while id 1 has the internal one (that can by synced via "hammer repository synchronize" command). But the error when invoking: POST /katello/api/capsules/1/content/sync is confusing, as capsule with id 1 exists. Please provide some better error string in this case. *** Bug 1296843 has been marked as a duplicate of this bug. *** As mentioned in comment 5, performing a 'capsule content synchronize' is not supported for the 'default'/'internal' capsule that is part of the Satellite server. It looks like a better error is being displayed to the user with Satellite 6.2 Beta Snap 9: hammer> capsule content synchronize --id 1 Could not synchronize capsule content: This request may only be performed on a Capsule that has the Pulp Node feature. however, there is still an issue with the support for --name: hammer> capsule content synchronize --name sat-test-rhel7.example.com Could not synchronize capsule content: Error: undefined method `[]' for nil:NilClass For this BZ, I will address the second the above nil:NilClass error. Upstream hammer-cli-katello PR: https://github.com/Katello/hammer-cli-katello/pull/389 Upstream bug component is Hammer ~]# hammer -u admin -p changeme capsule content synchronize --environment DEV --name abc.redhat.com --organization "Default Organization"Could not synchronize capsule content: This request may only be performed on a Capsule that has the Pulp Node feature. hammer -u admin -p changeme capsule content synchronize --id 1 Could not synchronize capsule content: This request may only be performed on a Capsule that has the Pulp Node feature. VERIFIED with sat62-snap12.1 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 |