Bug 2114505

Summary: [Bug] - Unable to remove a location from the Capsule server
Product: Red Hat Satellite Reporter: Dhaval Joshi <dhjoshi>
Component: Organizations and LocationsAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED MIGRATED QA Contact: Shweta Singh <shwsingh>
Severity: high Docs Contact:
Priority: high    
Version: 6.11.0CC: ahumbe, aruzicka, ashipati, bhoefer, hemanth.manupati, hyu, jsenkyri, leenbower, mark.milano, msunil, rlavi, sattia, saydas
Target Milestone: UnspecifiedKeywords: MigratedToJIRA, PrioBumpGSS, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-06 12:25:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dhaval Joshi 2022-08-02 18:46:07 UTC
Description of problem:
[Bug] - Unable to edit and remove the locations from the Capsule server

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

How reproducible:
100%

Steps to Reproduce:
1. Deploy a fresh Satellite 6.11
2. Add an organization and multiple locations.
3. Deploy an external capsule server.
4. Assign a location to the Capsule server.
5. Select Location Context as Any Location on Satellite WebUI >> Go to Capsules >> Edit the Capsule >> Locations

Actual results:
Both locations are assigned to the Capsule and both are greyed out. Unable to remove a location.

Expected results:
Only the assigned location should be shown as assigned location and not both locations.


Additional info:

Comment 7 Adam Ruzicka 2023-07-26 08:08:14 UTC
If I'm reading it right, the screenshot in #4 tells you that there is a host in test_loc_1 that is registered to that capsule which prevents you from removing the location from the capsule. If that is the case, then finding the host(s) and moving it to a different location should allow you to remove the location from the capsule.

Comment 10 Bernie Hoefer 2023-08-18 17:39:15 UTC
I appear to have hit this bug in standing up a new test Capsule 6.11.5.4 server.  The instructions in:

  _Installing Capsule Server_
  Chapter 2.7, "Assigning the Correct Organization and Location to Capsule Server in the Satellite web UI"
  https://access.redhat.com/documentation/en-us/red_hat_satellite/6.11/html/installing_capsule_server/installing-capsule-server#assigning-organization-location-capsule-server_capsule

...did not work; I got a "Cannot update Location to {LOCATION_2} because of mismatch in settings" error.  It did succeed if I selected the "Fix Location on Mismatch" radio button.)

But like this bug states, when I browse to 

  Infrastructure menu --->
    Capsules ---> 
      click the Edit button for the capsule ---> 
        Locations tab

...I see that both locations are listed but greyed out.  (Hovering the mouse over either of them displays "This is used by a host" -- even though this is a new capsule and thus has no hosts!)

If I switch my web UI location view to LOCATION_2 and again browse to the new capsule's Locations tab, things look OK.  (Only LOCATION_2 is among the selected items.)  But if the web UI location view is set to "Any Location", both locations are among the selected items for this capsule.

Comment 15 Adam Ruzicka 2024-01-11 12:54:08 UTC
Just posting some of my notes around this. If you go to Infrastructure > Capsules (ie the index page), the location list in the "locations" column should be always correct.

1) If a location is shown as greyed out in the location selector when you try to edit the capsule (ie the edit page), but at the same time it is not in the list of locations on the index page, then that's just a bug. The capsule is not really assigned to that location and you can't un-assign something that's not assigned in the first place.

2) If a location is shown as greyed out in the location selector in the edit page and it is in the list of locations on the index page and your current location is "Any location", you can try changing the current location to a location different than the one you're trying to remove. In some cases, this will allow you to remove the location.

3) Otherwise (ie if a location is shown as greyed out in the location selector in the edit page and it is in the list of locations on the index page and your current location is NOT "Any location") the behaviour is probably correct as the capsule is actually used by a host in that location.

While part 1) is ugly, it should be just a cosmetic issue without any real impact on anything. What I described in part 2) could be considered a workaround in that one specific case.

Comment 19 Eric Helms 2024-06-06 12:25:31 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.