Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1768331 - Fixing the location mismatch of a provisioning template may cause hosts to assign to the wrong provisioning template.
Summary: Fixing the location mismatch of a provisioning template may cause hosts to as...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Organizations and Locations
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-04 05:39 UTC by Hao Chang Yu
Modified: 2021-07-09 17:02 UTC (History)
1 user (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30386 0 Normal New Fixing the location mismatch of a provisioning template may cause hosts to assign to the wrong provisioning template. 2020-10-20 07:03:31 UTC

Description Hao Chang Yu 2019-11-04 05:39:40 UTC
Description of problem:
Satellite fixes the location mismatch by adding the missing location (lets say Sydney) to the provisioning template. This may cause all Hosts in "Sydney" location to resolve the incorrect template.  Since the "find template" query is sorted by name, the first one found get assigned to the host.

How reproducible:
This bug will happen when following conditions are met:
- A hostgroup (with multiple locations) is associated to multiple provisioning templates. Web UI -> Provisioning Template -> Edit a provisioning template -> Association -> Valid Host Group and Environment Combinations
- Have multiple provisioning templates that organized by locations but not all their locations are matching the associated hostgroup.

Steps to Reproduce:
1. Create "Brisbane" and "Sydney" locations.
2. Create a Host Group (called "HG_A") and then associate "Brisbane" and "Sydney" locations to it. Select "RHEL 7.6" Operating system for it.
3. Create a host (called "Host_A").
  - a. Click "Manage Host" button.
  - b. Assign it to "HG_A" hostgroup
  - c. Assign it to "Brisbane" location.
5. Clone the "Kickstart Default" provisioning template:
  - a. Rename it as "Kicstart Default for Brisbane".
  - b. Select all applicable Operating systems.
  - c. Associate "HG_A" host group to it.
6. Edit "Kicstart Default for Brisbane", ensure the location is set to "Brisbane" ONLY.
7. Clone the "Kickstart Default" provisioning template again:
  - a. Rename it as "Kicstart Default for Sydney".
  - b. Select all applicable Operating systems.
  - c. Associate "HG_A" host group to it.
8. Edit "Kicstart Default for Sydney", ensure the location is set to "Sydney" ONLY.
9. Go to Web UI -> Manage Locations -> Edit Brisbane -> Provisioning templates:
  - a. Uncheck "All provisioning templates" option.
  - b. Deselect "Kicstart Default for Sydney".
  - c. Click Submit.
10. Go to Web UI -> Manage Locations -> Edit Sydney -> Provisioning templates:
  - a. Uncheck "All provisioning templates" option.
  - b. Deselect "Kicstart Default for Brisbane".
  - c. Click Submit.
11. In the Web UI, Change current location to "Brisbane"
12. Edit the "Host_A" created in Step 2. Go to -> Operating System Tab -> Click "Resolve" button.

Notice that "Provisioning Template: Kicstart Default for Brisbane" is resolved. This is correct.

13. Go to All Hosts -> select "Host_A" -> Assign Location -> Select "Sydney" -> Select "Fix on mismatch".
14. In the Web UI, Change current location to "Sydny"
15. Edit the "Host_A" again. Go to -> Operating System Tab -> Click "Resolve" button.

Actual results:
It is still resolving "Kicstart Default for Brisbane"

Expected results:
"Kicstart Default for Sydney" to be resolved.

16. To make Satellite to resolve the correct provisioning Template. We need to go to Web UI -> Hosts -> Provisioning Templates -> "Kicstart Default for Brisbane" -> Locations -> Deselect "Sydney" location.

Comment 3 Hao Chang Yu 2019-11-04 07:23:23 UTC
In my opinion, Satellite should only consider a location mismatch between hostgroup and provisioning template if none of the locations that associated to the hostgroup is in the provisioning template.

For example:

# The following SHOULD NOT consider a mismatch:
Hostgroup A: Brisbane, Sydney
Provisioning Template A: Brisbane.


# The following SHOULD consider a mismatch:
Hostgroup B: Brisbane, Sydney
Provisioning Template B: Melbourne.

Comment 4 Dominik Matoulek 2020-07-13 13:54:23 UTC
Created redmine issue https://projects.theforeman.org/issues/30386 from this bug

Comment 5 Mike McCune 2021-07-09 17:02:24 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this feel free to contact your Red Hat Account Team. Thank you.


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