Project

Profile

Help

Issue #5518

closed

Problem: Running include_roles with pulp-rpm-prerequisites causes it to fail

Added by mdepaulo@redhat.com over 4 years ago. Updated about 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
Yes
Tags:
Sprint:
Quarter:

Description

Normally pulp-rpm-prerequisites gets run with a static import like:
section of playbook: "roles:"
Task in playbook/role: "import_role:"

But if it gets run via a dynamic include like:
- include_role:
name: "{{ item }}"
with_items:
- pulp.pulp_rpm_prerequisites
- pulp-database
- pulp-workers
- pulp-resource-manager
- pulp-content

It fails because it references the variable prereq_pip_packages, which has not been included from the "pulp"role (dependency of later roles) yet.

Added by Mike DePaulo over 4 years ago

Revision c79d9e45 | View on GitHub

Problem: Running include_roles with pulp_rpm_prerequisites causes it to fail

Solution: Provide a new field within the dict pulp_install_plugins called prereq_role . The pulp role, with its variables loaded, will dynamically import all prereq roles.

Fixes: #5518 Problem: Running include_roles with pulp_rpm_prerequisites causes it to fail https://pulp.plan.io/issues/5518

Added by Mike DePaulo over 4 years ago

Revision c79d9e45 | View on GitHub

Problem: Running include_roles with pulp_rpm_prerequisites causes it to fail

Solution: Provide a new field within the dict pulp_install_plugins called prereq_role . The pulp role, with its variables loaded, will dynamically import all prereq roles.

Fixes: #5518 Problem: Running include_roles with pulp_rpm_prerequisites causes it to fail https://pulp.plan.io/issues/5518

Actions #1

Updated by Anonymous over 4 years ago

  • Status changed from NEW to MODIFIED

Added by Mike DePaulo over 4 years ago

Revision 81cf67ec | View on GitHub

README.md: Show pulp-rpm-prerequisites in the pulp_install_plugins var

instead of showing pulp-rpm-prerequisites in the roles list

So that if users do put the roles list in a sequential include_roles task instead, the list will work.

re: #5518 Problem: Running include_roles with pulp_rpm_prerequisites causes it to fail https://pulp.plan.io/issues/5518

Added by Mike DePaulo over 4 years ago

Revision 3a715fba | View on GitHub

Fail with a better message if we cannot modify prereq_pip_packages

So that if users do put the pulp-rpm-prerequisites role in a role list in a sequential include_roles task instead, they'll get a clearer error.

re: #5518 Problem: Running include_roles with pulp_rpm_prerequisites causes it to fail https://pulp.plan.io/issues/5518

Added by Mike DePaulo over 4 years ago

Revision 7fa5495f | View on GitHub

Problem: pulp/README.md does not fully document prereq_role

Solution: Document the ability to specify a folder path (like pulplift will do), and the need to download it 1st.

re: #5518 Problem: Running include_roles with pulp_rpm_prerequisites causes it to fail https://pulp.plan.io/issues/5518

[noissue]

Added by Mike DePaulo over 4 years ago

Revision 7fa5495f | View on GitHub

Problem: pulp/README.md does not fully document prereq_role

Solution: Document the ability to specify a folder path (like pulplift will do), and the need to download it 1st.

re: #5518 Problem: Running include_roles with pulp_rpm_prerequisites causes it to fail https://pulp.plan.io/issues/5518

[noissue]

Added by Mike DePaulo over 4 years ago

Revision e37b3dfe | View on GitHub

Problem: pulp/README.md does not fully document prereq_role

Solution: Document the ability to specify a folder path (like pulplift will do), and the need to download it 1st.

re: #5518 Problem: Running include_roles with pulp_rpm_prerequisites causes it to fail https://pulp.plan.io/issues/5518

[noissue]

Added by Mike DePaulo over 4 years ago

Revision e37b3dfe | View on GitHub

Problem: pulp/README.md does not fully document prereq_role

Solution: Document the ability to specify a folder path (like pulplift will do), and the need to download it 1st.

re: #5518 Problem: Running include_roles with pulp_rpm_prerequisites causes it to fail https://pulp.plan.io/issues/5518

[noissue]

Added by Mike DePaulo over 4 years ago

Revision 7b5a79f6 | View on GitHub

Problem: README.md & example yml's are out of date

Solution: Update them, including for pulp_rpm_prerequisites being in pulp_install_plugins / prereq_role

re: #5518 Problem: Running include_roles with pulp_rpm_prerequisites causes it to fail https://pulp.plan.io/issues/5518

[noissue]

Actions #2

Updated by mdepaulo@redhat.com over 4 years ago

  • Subject changed from Problem: Running include_roles with pulp_rpm_prerequisites causes it to fail to Problem: Running include_roles with pulp-rpm-prerequisites causes it to fail
Actions #3

Updated by mdepaulo@redhat.com over 4 years ago

  • Tags Katello-P1, Pulp 3 installer added
Actions #4

Updated by mdepaulo@redhat.com over 4 years ago

  • Sprint Candidate changed from No to Yes
Actions #5

Updated by mdepaulo@redhat.com over 4 years ago

  • Status changed from MODIFIED to 5

I think jsherrill from Katello finished verifying, I am waiting for confirmation.

We now have an easier and more robust way of including pulp-rpm-prerequisites. It's in the ansible-pulp "pulp" role, uses the pulp_install_plugins dictionary, and is generic / available to all plugins.

Since pulp:ansible-pulp3|c79d9e45b2d40b0d14e5a0f2ab1e4b1b9c009505 was merged, I submitted 3 new PRs.

I made a better error message for the no longer necessary way of trying to use pulp-rpm-prerequisites (in pulp-rpm-prerequisites itself.)
I updated example configs / subrepos in pulplift.
I updated docs in all 3 repos:

https://github.com/pulp/pulp-rpm-prerequisites/pull/12
https://github.com/pulp/pulplift/pull/47
https://github.com/pulp/ansible-pulp/pull/169

Actions #6

Updated by mdepaulo@redhat.com over 4 years ago

  • Description updated (diff)
Actions #7

Updated by mdepaulo@redhat.com over 4 years ago

All 3 related PRs are merged.

I am still waiting to hear back from jsherrill from katello to make sure everything is working now.

Added by Mike DePaulo over 4 years ago

Revision bbc98150 | View on GitHub

Update docs for new prereq_role dictionary variable

And to remove the no longer-used app-label.

re: #5518 Problem: Running include_roles with pulp-rpm-prerequisites causes it to fail https://pulp.plan.io/issues/5518

[noissue]

Actions #8

Updated by fao89 over 4 years ago

  • Tags CI/CD added
  • Tags deleted (Katello-P1, Pulp 3 installer)
Actions #9

Updated by mdepaulo@redhat.com about 4 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
  • Tags deleted (CI/CD)

Also available in: Atom PDF