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

Consumed subscriptions, still listed as available are consumed again #1228

Closed
tomaciazek opened this issue Nov 4, 2020 · 8 comments
Closed
Labels
bug This issue/PR relates to a bug module module needs_triage os packaging plugins plugin (any type) python3

Comments

@tomaciazek
Copy link

tomaciazek commented Nov 4, 2020

SUMMARY

For some subscriptions (instance-based, I believe) subscription-manager will still report them as available for subscription-manager list --available, but with 'suggested' entitlements to consume equal to 0. This breaks the behavior of this module when either the pool option is provided or the pool_ids option but without the quantities specified.

NB: To make the module work correctly with the pool_ids option, the quantity must be a text value, otherwise module will re-subscribe (fortunately not consuming more entitlements) and report changed: true. That, I believe, is another bug.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

redhat_subscription

ANSIBLE VERSION
ansible 2.9.11
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/tomasz/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.6.9 (default, Jul 17 2020, 12:50:27) [GCC 8.4.0]
CONFIGURATION

ansible-config dump --only-changed returns no output

OS / ENVIRONMENT

Tested on RHEL 8.2 and RHEL 7.9

STEPS TO REPRODUCE
- name: RHEL registration
  hosts: all
  become: true

  tasks:
  - redhat_subscription:
      state: present
      activationkey: "mykey"
      org_id: "myorg"
      pool_ids:
        - 0123456789abcdef0123456789abcdef

AND

- name: RHEL registration
  hosts: all
  become: true

  tasks:
  - redhat_subscription:
      state: present
      activationkey: "mykey"
      org_id: "myorg"
      pool:  '^Red Hat Enterprise Linux'
EXPECTED RESULTS

Invoking twice, should show change only the first time. The second time, no changes should be reported and
no new entitlements consumed

ACTUAL RESULTS

Invoking the module the second time shows changes and consumes additional entitlements.

@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added affects_2.10 bug This issue/PR relates to a bug module module needs_triage os packaging plugins plugin (any type) python3 labels Nov 4, 2020
@unnecessary-username
Copy link
Contributor

Could you provide one or two SKUs which appears like that? I am a bit curious about this.

@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ptoscano
Copy link
Contributor

It looks to me that this issue may be an "older copy" of #5313, which was fixed few months ago, and backported to some older branches:

@tomaciazek can you please check again with any of the fixed versions mentioned above?

@tomaciazek
Copy link
Author

Sorry, I no longer have access to that environment where RHEL subscriptions were used, or any other environment that could allow me to test that.

@ptoscano
Copy link
Contributor

ptoscano commented Dec 7, 2022

Sorry, I no longer have access to that environment where RHEL subscriptions were used, or any other environment that could allow me to test that.

Ouch, that's unfortunate... thanks anyway :)

@felixfontein: what should we do in this case?

@felixfontein
Copy link
Collaborator

@ptoscano I guess we can close it then. If nobody complains, I'll do that later today.

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 needs_triage os packaging plugins plugin (any type) python3
Projects
None yet
Development

No branches or pull requests

5 participants