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

manifest role does not handle a changed manifest simply. #1585

Open
parmstro opened this issue Apr 6, 2023 · 1 comment
Open

manifest role does not handle a changed manifest simply. #1585

parmstro opened this issue Apr 6, 2023 · 1 comment

Comments

@parmstro
Copy link
Contributor

parmstro commented Apr 6, 2023

SUMMARY

When uploading a manifest to a satellite/foreman server after updating it or redefining it, the manifest role appears to not automatically try to refresh the manifest and instead fails. Also, trying to write a recovery fails if the manifest has been deleted on the portal...

ISSUE TYPE
  • Bug Report
ANSIBLE VERSION
ansible --version
ansible [core 2.13.3]
  config file = /home/parmstro/.ansible.cfg
  configured module search path = ['/home/parmstro/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /home/parmstro/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.14 (main, Nov  7 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)]
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
redhat.satellite            3.9.0-dev
KATELLO/FOREMAN VERSION
satellite 6.12.3
STEPS TO REPRODUCE
  1. Create, download and upload a manifest to the satellite
  2. Change the manifest.
  3. Redownload the manifest and try to upload it
  4. "Owner has already imported from another subscription management application. [DISTRIBUTOR_CONFLICT]"
- name: "Upload the manifest"
  ansible.builtin.include_role:
    name: redhat.satellite.manifest
  vars:
    satellite_server_url: "{{ satellite_url }}"
    satellite_username: "{{ satellite_admin_username }}"
    satellite_password: "{{ satellite_admin_password }}"
    satellite_organization: "{{ satellite_initial_organization }}"
    satellite_manifest_path: "{{ manifest_path }}"
EXPECTED RESULTS

The subscription is refreshed or replaced.

ACTUAL RESULTS

Errors below...

TASK [satellite_post : Try to upload] ******************************************************************************
fatal: [sat.example.ca]: FAILED! => {"changed": false, "msg": "Upload of the manifest failed: Owner has already imported from another subscription management application. The following conflicts were found: [ DISTRIBUTOR_CONFLICT ]"}

TASK [satellite_post : Try to refresh existing] ********************************************************************
fatal: [sat.example.ca]: FAILED! => {"changed": false, "error": {"displayMessage": "The Subscription Allocation providing the imported manifest has been removed. Please create a new Subscription Allocation and import the new manifest.", "errors": ["The Subscription Allocation providing the imported manifest has been removed. Please create a new Subscription Allocation and import the new manifest."]}, "msg": "Error while performing refresh_manifest on subscriptions: 400 Client Error: Bad Request for url: https://sat.example.ca/katello/api/organizations/1/subscriptions/refresh_manifest"}
@parmstro
Copy link
Contributor Author

parmstro commented Apr 6, 2023

I can understand why this may behave the way it does... avoiding the whole reattach all the subs thing. But a "force: true" parameter might be a nice add.

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

No branches or pull requests

1 participant