Bug 2118248 - Un-handled error by role redhat.satellite.repositories when enabling a repository which is already enabled.
Summary: Un-handled error by role redhat.satellite.repositories when enabling a repos...
Keywords:
Status: CLOSED DUPLICATE of bug 1919321
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible Collection
Version: 6.10.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-15 08:18 UTC by Ahmed Eladawy
Modified: 2023-07-31 17:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-31 17:24:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ahmed Eladawy 2022-08-15 08:18:50 UTC
Description of problem:

When using role redhat.satellite.repositories to enable a repository , if the repository is already enabled , the task is failed with the following error :

failed: [localhost] (item=[{u'name': u'Red Hat Enterprise Linux for x86_64'}, {u'arch': u'noarch', u'releasever': 8, u'name': u'Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)'}]) => {"ansible_loop_var": "item", "changed": false, "error": {"displayMessage": "The repository is already enabled", "errors": ["The repository is already enabled"]}, "item": [{"name": "Red Hat Enterprise Linux for x86_64"}, {"arch": "noarch", "name": "Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)", "releasever": 8}], "msg": "Error while performing enable on repository_sets: 409 Client Error: Conflict"}


Version-Release number of selected component (if applicable):

Satellite 6.10.7
Satellite Ansible collection 3.3.0.

How reproducible:

Not be able to reproduce , only happening with the customer.


Actual results:

Failed task because the repository is already enabled.

Expected results:

The task should not be failed as Ansible is supposed to be idempotent.

Comment 1 Evgeni Golov 2022-08-15 14:42:12 UTC
This is not so much a bug in the Ansible Collection, but in the Satellite API, as reported in https://bugzilla.redhat.com/show_bug.cgi?id=1919321

You probably can't reproduce because you have a fresh system, vs the original reporter having an old system where the repository was created *before* the change to the data structure was made.

Comment 4 Eric Helms 2023-07-31 17:24:03 UTC

*** This bug has been marked as a duplicate of bug 1919321 ***


Note You need to log in before you can comment on or make changes to this bug.