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
Redhat_subscription fails when quantity isn't given on a physical server. #66478
Comments
Files identified in the description: If these files are inaccurate, please update the |
When quantity is not specified, then default value 1 is used:
This works in most cases, but not in case described in this issue. When special type of product is used, then it is required to attach at least quantity e.g. 2 on physical server. When no quantity is specified, then subscription-manager is able to attach correct minimal quantity as it is demonstrated in following example:
When quantity is not specified, then I propose to set quantity to
@cnsnyder Thoughts? |
* Bug fix for: ansible#66478 * When no quantity is set, then candlepin server usually uses default value 1. When more quantities are required, then candlepin server can automatically choose correct minimal value.
* Bug fix for: ansible#66478 * When no quantity is set, then candlepin server usually uses default value 1. When more quantities are required, then candlepin server can automatically choose correct minimal value.
* Bug fix for: ansible#66478 * When no quantity is set, then candlepin server usually uses default value 1. When more quantities are required, then candlepin server can automatically choose correct minimal value.
* Fixes #66478 * When no quantity is set, then candlepin server usually uses default value 1. When more quantities are required, then candlepin server can automatically choose correct minimal value.
…66807) * Fixes ansible#66478 * When no quantity is set, then candlepin server usually uses default value 1. When more quantities are required, then candlepin server can automatically choose correct minimal value. (cherry picked from commit 6f1bb37)
…66807) * Fixes ansible#66478 * When no quantity is set, then candlepin server usually uses default value 1. When more quantities are required, then candlepin server can automatically choose correct minimal value.
SUMMARY
Using the redhat_subscription module with pool_ids and no quantities on a physical server causes the quantity to be forced to 1. This results in a warning on stdout from redhat_subscription and a return code of 1. This causes the action to be marked as FAILED although subscription_manager does the right thing.
ISSUE TYPE
COMPONENT NAME
redhat_subscription
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Tested with Ansible 2.9, not tested with the development version yet but the issue is still there in the code. Target OS Version is RedHat Enterprise Linux 7.6 on a two socket physical server.
STEPS TO REPRODUCE
Using a physical server with two sockets execute the equivalent of the yaml below.
EXPECTED RESULTS
I expect the system to be subscribed to a given pool.
ACTUAL RESULTS
This play fails with a warning on stdout that Quantity needs to be a multiple of 2 and a return code of 1. Subscription-manager does the right thing but the return code causes Ansible to choke.
In the main code if pool_ids is provided without a quantity then it is set to 1. This is not valid for a two socket physical server.
The text was updated successfully, but these errors were encountered: