Project

General

Profile

Actions

Bug #37895

closed

Can't remove a version from an environment if it is being used by a multi-CV activation key.

Added by Samir Jha 4 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
Activation Key
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Removing a version from an env when the CVE is in use by a multi-CV activation key tries to reassign multi-CV AK to single CVE. This is not always the intended behavior. Also, if you try to reassign AK to a CVE already in multi-CV AK's CVEs, it prints a debug message and does nothing, causing failures in later actions.

Relevant logs:

19:30:16 rails.1   | 2024-10-08T19:30:16 [I|app|049ec4ca] Activation key 'dev' already has the content view environment 'Default Organization View' and environment 'Library'.
19:30:17 rails.1   | 2024-10-08T19:30:17 [D|kat|049ec4ca] Resource GET request: /candlepin/status
19:30:17 rails.1   | 2024-10-08T19:30:17 [D|kat|049ec4ca] Headers: null
19:30:17 rails.1   | 2024-10-08T19:30:17 [D|kat|049ec4ca] Body: null
19:30:17 rails.1   | 2024-10-08T19:30:17 [D|kat|049ec4ca] Candlepin request 33409230-df24-470c-9349-e6bd7179b7a6 returned with code 200
19:30:17 rails.1   | 2024-10-08T19:30:17 [D|kat|049ec4ca] Processing response: 200
19:30:17 rails.1   | 2024-10-08T19:30:17 [D|kat|049ec4ca] {"mode":"NORMAL","modeReason":null,"modeChangeTime":null,"result":true,"version":"4.4.14","release":"1","standalone":true,"timeUTC":"2024-10-08T19:30:17+0000","rulesSource":"database","rulesVersion":"5.44","managerCapabilities":["instance_multiplier","derived_product","vcpu","cert_v3","hypervisors_heartbeat","remove_by_pool_id","syspurpose","storage_band","cores","multi_environment","hypervisors_async","org_level_content_access","typed_environments","guest_limit","ram","batch_bind"],"keycloakRealm":null,"keycloakAuthUrl":null,"keycloakResource":null,"deviceAuthRealm":null,"deviceAuthUrl":null,"deviceAuthClientId":null,"deviceAuthScope":null}
19:30:17 rails.1   | 2024-10-08T19:30:17 [E|bac|049ec4ca] Cannot remove 'cv1' from environment 'qa' due to associated activation keys: dev, dev, dev, dev. (RuntimeError)
19:30:17 rails.1   |  049ec4ca | /home/vagrant/katello/app/models/katello/content_view.rb:726:in `check_remove_from_environment!'
19:30:17 rails.1   |  049ec4ca | /home/vagrant/katello/app/lib/actions/katello/content_view_environment/destroy.rb:10:in `plan'

Actions

Also available in: Atom PDF