Bug #39578
openMultiCV Content-view-environment can be added more than once for a host
Description
Description of problem:
When using multiple content views it is possible to add the same content-view-environment more than once
How reproducible:
Satellite 6.17.x
Satellite 6.18.x
Is this issue a regression from an earlier version:
No, MultiCV feature not yet GA
Steps to Reproduce:
1. Enable multiple content views in settings
- hammer settings set --name allow_multiple_content_views --value true
2. Add the same content-view-environment twice
- hammer host update --id fluffy.example.com --content-view-environments "prd/cv-os-rhel-10-x86_64,prd/cv-epel-rhel-10-x86_64,prd/cv-os-rhel-10-x86_64"
Actual behavior:
The hammer output shows an error 500 but still assigns duplicate CVs:
[root@satellite6:/root]# hammer host update --id fluffy.example.com --content-view-environments "prd/cv-os-rhel-10-x86_64,prd/cv-epel-rhel-10-x86_64,prd/cv-os-rhel-10-x86_64"
Could not update the host:
500 Internal Server Error
[root@satellite6:/root]# hammer host list --search=fluffy.example.com --fields="name,Content view environments"
-------------------|----------------------------------------------------------------------------
NAME | CONTENT VIEW ENVIRONMENTS
-------------------|----------------------------------------------------------------------------
fluffy.example.com | prd/cv-os-rhel-10-x86_64,prd/cv-epel-rhel-10-x86_64,prd/cv-os-rhel-10-x86_64
-------------------|----------------------------------------------------------------------------
Looking at the client side the content-view-environment is only shown once:
[root@fluffy:/root]# subscription-manager environments --list-enabled
-------------------------------------------
Environments
-------------------------------------------
Name: prd/cv-os-rhel-10-x86_64
Description:
Name: prd/cv-epel-rhel-10-x86_64
Description:
Expected behavior:
Hammer should not add the same content-view-environment more than one time.
Updated by The Foreman Bot 5 days ago
- Status changed from New to Ready For Testing
Updated by Ian Ballou 2 days ago
- Target version set to Katello 5.0.0
- Triaged changed from No to Yes