| Summary: | Create repos in a way that pulp-admin can also manage them | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Pavel Moravec <pmoravec> |
| Component: | Content Management | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | CLOSED WONTFIX | QA Contact: | Katello QA List <katello-qa-list> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.2.0 | CC: | bbuckingham, bmbouter, chrobert, daviddavis, dkliban, ggainey, ipanova, jsherril, ktordeur, mhrivnak, mmccune, pcreech, pmoravec, rchan, ttereshc |
| Target Milestone: | Unspecified | Keywords: | 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-01-04 18:48:14 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: | |
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug. The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug. The Pulp upstream bug status is at CLOSED - WORKSFORME. Updating the external tracker on this bug. To have pulp-admin be able to manage Katello created repos, Katello would need to change the naming of its importers and distributors and likely other fields inside of those objects and repos. Those would be significant changes. Since those are all Katello changes, I'm setting the component to Content Management which was the component suggested in IRC. I'm also retitling it to make it more clear that the required change is how the repo is created. If that is something Katello wants to do, the easiest way to align with pulp-admin is to see what it does using the -vv flag when you have pulp-admin create a repository. +1 to everything Brian said. I suspect katello will not want to do this, in which case this issue can probably be closed as wontfix. FWIW we are happy to track pulp-admin RFEs upstream in our redmine. Since pulp-admin isn't part of the product, we're recommending that any pulp-admin RFE be tracked only upstream, even if it would be valuable to Satellite developers or support. I'm fine updating the importers and distributors to use the new ids for new repos, but converting all the existing repos for an upgrade scenario would be too risky IMHO. And without that its likely of limited value. I think we should get this for free with pulp 3.0, would you agree Michael? I think with Pulp 3.0 it will take similar effort to align how pulp-admin and Katello use the API. The main difference I see with Pulp3 is the opportunity for the Pulp CLI to make backwards incompatible changes with its naming conventions. It's still going to take work, because even if the naming conventions of Katello were adopted by Pulp's CLI, the API is also changing, so Katello is going to have updates to make anyway. To realize this use case with Pulp3, I see work similar to what is described in Comment 12 as unavoidable. Out of curiosity, does Katello publish it's naming conventions for importers, distributors, and repos anywhere? What would be good for Pulp3 is for the naming conventions of Pulp's CLI to be consistent with itself and covered under semantic versioning. If Pulp published these conventions, Katello could adopt them as Katello ports to Pulp 3.0. This would involve an uber migration similar to what is described in Comment 12. Maybe I'm thinking about this wrong, so I'm leaving the needsinfo for @mhrivnak. Thanks for the reply brian! To me its not about the naming conventions. Katello doesn't really care what we name the ids. We do name them a certain way but don't expect they will be named that way at all. It could be randomly generated for all katello cares. Katello looks up all distributors/importers by their type and I think an argument could be made that pulp-admin should do the same. After some discussion on IRC, this may or may not come with pulp 3.0. I'm going to go ahead and close this as WONTFIX as'upgrading' customers to a new format would be too risky and not doing so would be of limited use |
Description of problem: An attempt to call: pulp-admin rpm repo publish run --repo-id whateverRepoID fails with: Missing resource(s): repo_id=whateverRepoID, distributor_id=yum_distributor That blocks fixing various pulp issues by managing repo content and re-publishing the repo again - that fails. Interestingly, if I manage Satellite to call pulp.server.managers.repo.publish.publish, it succeeds. Just pulp-admin calling that fails. More interestingly, inspecting repo_distributors mongo collection, it _has_ that distributor, but under different attribute: "distributor_type_id" : "yum_distributor" while pulp publish.py queries mongo: repo_distributor = distributor_coll.find_one({'repo_id' : repo_id, 'id' : distributor_id}) So either mongo attribute has wrong name, or pulp publish.py queries wrong attribute (anyway changing the find_one accordingly does not help itself). Version-Release number of selected component (if applicable): Sat 6.1.8 (pulp 2.6.0.20-1) Sat 6.2 Beta (pulp 2.8.1.3-1) How reproducible: 100% Steps to Reproduce: 1. Have synced some repos, optionally some CVs. 2. pulp-admin repo list # just to have proper repo-id 3. pulp-admin rpm repo publish run --repo-id whateverRepoID Actual results: 3. fails while logging to /var/log/messages: May 3 17:16:25 pmoravec-sat61-rhel7 pulp: celery.worker.job:ERROR: (1740-74400) Traceback (most recent call last): May 3 17:16:25 pmoravec-sat61-rhel7 pulp: celery.worker.job:ERROR: (1740-74400) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task May 3 17:16:25 pmoravec-sat61-rhel7 pulp: celery.worker.job:ERROR: (1740-74400) R = retval = fun(*args, **kwargs) May 3 17:16:25 pmoravec-sat61-rhel7 pulp: celery.worker.job:ERROR: (1740-74400) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 328, in __call__ May 3 17:16:25 pmoravec-sat61-rhel7 pulp: celery.worker.job:ERROR: (1740-74400) return super(Task, self).__call__(*args, **kwargs) May 3 17:16:25 pmoravec-sat61-rhel7 pulp: celery.worker.job:ERROR: (1740-74400) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__ May 3 17:16:25 pmoravec-sat61-rhel7 pulp: celery.worker.job:ERROR: (1740-74400) return self.run(*args, **kwargs) May 3 17:16:25 pmoravec-sat61-rhel7 pulp: celery.worker.job:ERROR: (1740-74400) File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/publish.py", line 83, in publish May 3 17:16:25 pmoravec-sat61-rhel7 pulp: celery.worker.job:ERROR: (1740-74400) raise MissingResource(repository=repo_id, distributor=distributor_id) Expected results: repo publish to succeed Additional info: Reproduced both in 6.1.8 and 6.2 beta. Fix in 6.2 GA is sufficient for me, ideally 6.1.9 backport is a plus. If not, pls. provide workaround.