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

rhsm_release: removing required=true for 'release' option #6401

Merged
merged 1 commit into from
Apr 23, 2023

Conversation

felixfontein
Copy link
Collaborator

SUMMARY

Apparently null/None was always a valid parameter. ansible-core only allowed this due to a bug that got fixed, so specifying release: null no longer works with that fix (ansible/ansible#79677).

(This also breaks nightly CI.)

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

rhsm_release

@ansibullbot
Copy link
Collaborator

cc @cnsnyder @ptoscano @seandst
click here for bot help

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) labels Apr 23, 2023
@felixfontein felixfontein merged commit 486c47f into ansible-collections:main Apr 23, 2023
@patchback
Copy link

patchback bot commented Apr 23, 2023

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/486c47f922dfb3a4712f28572a6c44fe3540bbaa/pr-6401

Backported as #6408

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein deleted the ci branch April 23, 2023 14:51
patchback bot pushed a commit that referenced this pull request Apr 23, 2023
Fix rhsm_release by removing required=true for 'release' option.

(cherry picked from commit 486c47f)
@patchback
Copy link

patchback bot commented Apr 23, 2023

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/486c47f922dfb3a4712f28572a6c44fe3540bbaa/pr-6401

Backported as #6409

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Apr 23, 2023
Fix rhsm_release by removing required=true for 'release' option.

(cherry picked from commit 486c47f)
felixfontein added a commit that referenced this pull request Apr 23, 2023
…d=true for 'release' option (#6408)

rhsm_release: removing required=true for 'release' option (#6401)

Fix rhsm_release by removing required=true for 'release' option.

(cherry picked from commit 486c47f)

Co-authored-by: Felix Fontein <felix@fontein.de>
felixfontein added a commit that referenced this pull request Apr 23, 2023
…d=true for 'release' option (#6409)

rhsm_release: removing required=true for 'release' option (#6401)

Fix rhsm_release by removing required=true for 'release' option.

(cherry picked from commit 486c47f)

Co-authored-by: Felix Fontein <felix@fontein.de>
richm added a commit to richm/linux-system-roles-rhc that referenced this pull request Jun 2, 2023
Do not set release if rhc_release is none.
See ansible-collections/community.general#6401
for details.
ptoscano added a commit to ptoscano/linux-system-roles-rhc that referenced this pull request Jun 5, 2023
- we need to update the community.general dependency to >= 6.6.0 to make
  the role working with with ansible-core >= 2.15 (adapting to a change
  in rhsm_release [1])
- unpin the community.general requirement means breaking the
  registration of Fedora managed nodes, as SELinux policies need to be
  adapted [2]
- [2] is temporarily broken by a dnf bug in Rawhide [3]

Since registration is already broken for people using the upstream
redhat_subscription module in community.general, and registering Fedora
system is a corner case, let's temporarily stop supporting Fedora
systems. This will allow us to fix the role to make it usable with
ansible-core >= 2.15; the support for Fedora will be added back when the
Fedora SELinux policy will be fixed.

[1] ansible-collections/community.general#6401
[2] fedora-selinux/selinux-policy#1726
[3] https://bugzilla.redhat.com/show_bug.cgi?id=2210694

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
richm pushed a commit to linux-system-roles/rhc that referenced this pull request Jun 5, 2023
- we need to update the community.general dependency to >= 6.6.0 to make
  the role working with with ansible-core >= 2.15 (adapting to a change
  in rhsm_release [1])
- unpin the community.general requirement means breaking the
  registration of Fedora managed nodes, as SELinux policies need to be
  adapted [2]
- [2] is temporarily broken by a dnf bug in Rawhide [3]

Since registration is already broken for people using the upstream
redhat_subscription module in community.general, and registering Fedora
system is a corner case, let's temporarily stop supporting Fedora
systems. This will allow us to fix the role to make it usable with
ansible-core >= 2.15; the support for Fedora will be added back when the
Fedora SELinux policy will be fixed.

[1] ansible-collections/community.general#6401
[2] fedora-selinux/selinux-policy#1726
[3] https://bugzilla.redhat.com/show_bug.cgi?id=2210694

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
richm added a commit to richm/linux-system-roles-rhc that referenced this pull request Jun 5, 2023
Do not set release if rhc_release is none.
See ansible-collections/community.general#6401
for details.
ptoscano added a commit to ptoscano/linux-system-roles-rhc that referenced this pull request Jun 6, 2023
This version contains a number of features and fixes that greatly help
this role; while the role was able so far to work with older versions,
let's require a recent version so it is possible to drop workarounds.

In particular, we need to require 6.6.0 so we can adapt to the new
behaviour of rhsm_release [1], needed to run with ansible-core 2.15.

[1] ansible-collections/community.general#6401

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
richm pushed a commit to linux-system-roles/rhc that referenced this pull request Jun 6, 2023
This version contains a number of features and fixes that greatly help
this role; while the role was able so far to work with older versions,
let's require a recent version so it is possible to drop workarounds.

In particular, we need to require 6.6.0 so we can adapt to the new
behaviour of rhsm_release [1], needed to run with ansible-core 2.15.

[1] ansible-collections/community.general#6401

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
richm added a commit to richm/linux-system-roles-rhc that referenced this pull request Jun 6, 2023
The way the new version of rhsm_release works is - if the `release`
parameter is present, set the release to the given value.
If there is no `release` parameter, unset the release.
If the user does not set `rhc_release`, then it will be `null`,
and calling the rhsm_release module will be skipped.
See ansible-collections/community.general#6401
for details.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm added a commit to richm/linux-system-roles-rhc that referenced this pull request Jun 6, 2023
The way the new version of rhsm_release works is this:

- if the `release` parameter is present, set the release to the given
  value.
- If there is no `release` parameter, unset the release.

If the user does not set `rhc_release`, or if the user sets it to `omit`
then it will be `null`, and calling the rhsm_release module will be
skipped.
See ansible-collections/community.general#6401
for details.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
ptoscano pushed a commit to linux-system-roles/rhc that referenced this pull request Jun 6, 2023
The way the new version of rhsm_release works is this:

- if the `release` parameter is present, set the release to the given
  value.
- If there is no `release` parameter, unset the release.

If the user does not set `rhc_release`, or if the user sets it to `omit`
then it will be `null`, and calling the rhsm_release module will be
skipped.
See ansible-collections/community.general#6401
for details.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants