Bug 1625762 - Kickstart repo seems not available in promoted CV.
Summary: Kickstart repo seems not available in promoted CV.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Host Group
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Jonathon Turel
QA Contact: Mirek Długosz
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-05 19:20 UTC by Fred van Zwieten
Modified: 2020-05-01 13:31 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-01 13:31:17 UTC
Target Upstream Version:


Attachments (Terms of Use)
Error message when trying to create nested hostgroup on new LCE (85.50 KB, image/png)
2018-09-05 19:20 UTC, Fred van Zwieten
no flags Details


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 25379 Normal Closed Kickstart repo seems not available in promoted CV. 2020-10-30 17:27:42 UTC

Description Fred van Zwieten 2018-09-05 19:20:23 UTC
Created attachment 1481142 [details]
Error message when trying to create nested hostgroup on new LCE

Description of problem:
See summary

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

How reproducible:
I have a CV CV_RHEL with RHEL7, RHEL7 kickstart and sat tools beta.
Published and promoted to DEV LCE.
Created a HG with CV_RHEL in library and the kickstart is auto selected from synced content.
Try to create a nested HG for CV_RHEL in DEV and get the error message in screenshot.
I have regenerated the metadata but that did not help.
I have done the same on 6.4 snap 19 and it worked. Now it seem to not work anymore.

Steps to Reproduce:
1.
2.
3.

Actual results:
The error in the screenshot

Expected results:
It should work because kickstart repo is in promoted CV

Additional info:
All repo's are "on demand" (not sure if that matters)

Comment 1 Fred van Zwieten 2018-09-05 19:38:48 UTC
When I change the "synced content" from "inherited" to RHEL 7.5 Kickstart I can save it.

When I then change it back to inherited I can also save it..

Comment 7 Partha Aji 2018-09-19 22:25:03 UTC
Context
Parent Hostgroup -> Library, CV, CS, OS, Arch, KS Repo
Child Hostgroup -> Dev,  (Inherited CV,  CS, OS, Arch, KS Repo)

Behavior in 6.4
Creating the 2 host groups in Satellite 6.4 via UI will give you the following error
"The selected kickstart repository is not part of the assigned content view, lifecycle environment, content source, operating system, and architecture"
This is because the KS Repo in the child hostgroup still points to the parent's Content View Environment (CVE) when the save is submitted.
In other words the KS Repo in the parent hostgroup exclusively pointed to the repo in Library/CV.
When you asked it to inherit in the child hostgroup you need to change it to say "point to a repository with the same name in Dev/CV assuming it exists".
The Hostgroup UI unfortunately  does not do that and instead tries to keep the Dev/CV but still points to the repo in Library/CV

As a part of https://projects.theforeman.org/issues/20785 we tried to call out this invalid state (KS repo id of the hostgroup must be in CV/LCE of the same) to keep the data consistent.


Behavior in 6.3

We did not have this validation for host groups in 6.3. Hence no error gets reported. However the data in 6.3 is broken and invalid. In 6.3 the child hostgroup's kickstart repo will point to the Kickstart repo of the Parent hostgroup (Library/CV) even though you asked it to use the repo in Dev/CV. The Hostgroup data mismatch is silently ignored.


While this is not a good user experience, I would say the 6.4 behavior is more desirable than 6.3 (broken data.) If having nested hostgroups is going to get the customer in a bad state then it is better to report it.

Potential Fixes
We can maybe try to
1) Map the KS Repo in Library/CV to the one in Dev/CV and then try to save. Will require support from foreman to "reload" the form elements on all tabs when the environment changes. Or
2) Apply the same logic when validating, where we say "hmm ok I dont see any ks repos matching, let me assume you were inheriting from a parent and see if something matches there". I don't know if we can differentiate between the case where you inherit vs you are pointing it to exactly use that kickstart repository. So error behavior would be weird.

Comment 10 Jonathon Turel 2018-09-25 18:37:41 UTC
Not required any longer. Thank you!

Comment 11 Fred van Zwieten 2018-09-27 12:03:33 UTC
I retested this with snap 24 and the behaviour is still...horrible!

Basically creating nested HG's always fail unless you remove the default "inherited" value on the synced content field and use an actual kickstart repo.

That is a rather bad UX experience imo.

Why is it not possible to find the same kickstart repo in the LCE/CV as the parent's LCE/CV at save time?

As a workaround, can we not pre-populate the synced content field with nothing (blank) to force the user to make a choice. Also, remove the "inherit" value from the list.

Comment 12 Jonathon Turel 2018-11-02 18:16:37 UTC
Created redmine issue http://projects.theforeman.org/issues/25379 from this bug

Comment 13 pm-sat@redhat.com 2018-11-13 15:09:52 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25379 has been resolved.

Comment 14 Bryan Kearney 2020-05-01 13:31:17 UTC
Satellite 6.4 is now End of Life. These bus will not be fixed on the 6.4 stream. Users of Satellite should upgrade to the latest version of Satellite to get access to the most current set of bugfixes and feature improvements.


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