Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Pulpcore to 3.39 #1725

Merged
merged 1 commit into from
Nov 24, 2023
Merged

Conversation

@ianballou
Copy link
Contributor Author

I've also made it so the pulpcore module is not installed unless the pulpcore version is between 3.16 and 3.39. I'm not 100% certain if I should add the second conditional like I did.

pipelines/pulpcore/02-install.yml Outdated Show resolved Hide resolved
roles/pulpcore_repositories/tasks/main.yml Show resolved Hide resolved
# https://github.com/ansible/ansible/issues/56504
# https://github.com/ansible/ansible/issues/64852
args:
creates: /etc/dnf/modules.d/pulpcore.module
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is right. The file will already be there if it is enabled and instead it will actually skip this step if it's enabled (which is true for upgrades).

Just for background:

# dnf module enable pulpcore:el8
# ls /etc/dnf/modules.d
pulpcore.module  python39.module
# dnf module disable pulpcore
# ls /etc/dnf/modules.d
pulpcore.module  python39.module
# cat /etc/dnf/modules.d/pulpcore.module
[pulpcore]
name=pulpcore
stream=
profiles=
state=disabled

Note that the enable part also enabled python39 but disable doesn't disable python. It looks like ansible-core has rebased to python3.11 (al least in CentOS Stream 8), but worth considering in the release notes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evgeni any thoughts on using this for idempotency?

- name: 'Disable pulpcore:el8 module'
  command: dnf module disable -y pulpcore:el8
  args:
    removes: /etc/dnf/modules.d/pulpcore.module

- name: Delete pulpcore module
  file:
    path: /etc/dnf/modules.d/pulpcore.module
    state: absent

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable. The removes on the disable command is a "lie", but then you fix it up and things should be fine.

OTOH, we could also just remove the file, that's the only thing that carries the info about the module state.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with remove only and updated the PR

@evgeni evgeni force-pushed the bump-pulpcore-3.39 branch from 8afe739 to deabede Compare November 24, 2023 16:47
@evgeni evgeni merged commit a7120dd into theforeman:master Nov 24, 2023
8 checks passed
@evgeni
Copy link
Member

evgeni commented Nov 27, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants