Description of problem: Satellite 6.5.3 can't generate ISO image for installation (build mode fails). I've added kickstart repositories for RHEL 8.0 and RHEL 8.1 Version-Release number of selected component (if applicable): Satellite 6.5.3 How reproducible: No clue. Actual results: The following errors may prevent a successful build: Templates Failure parsing OSB4_bootiso: undefined method `full_path' for nil:NilClass. Failure parsing Kickstart default PXEGrub: undefined method `full_path' for nil:NilClass. Failure parsing Kickstart default PXEGrub2: undefined method `full_path' for nil:NilClass. Failure parsing Kickstart default iPXE: undefined method `full_path' for nil:NilClass. Failure parsing OSB4_kickstart: undefined method `full_path' for nil:NilClass. Failure parsing Kickstart default finish: undefined method `full_path' for nil:NilClass. Failure parsing Kickstart default user data: undefined method `full_path' for nil:NilClass. Failure parsing Discovery Red Hat kexec: undefined method `full_path' for nil:NilClass. Expected results: A working ISO build! Additional info: If there is a manual for how to get RHEL 8 hosts setup with Satellite 6.5.3 I did not find it - where is it?
In /var/log/foreman/production.log i can see 2019-12-19T14:13:21 [I|app|7d01e7ed] Rendering Kickstart default PXEGrub 2019-12-19T14:13:21 [E|app|7d01e7ed] Could not find a provider for myhost.com. Providers returned {"Katello::ManagedContentMediumProvider"=>["Kickstart repository was not set for host 'myhost.com'"], "MediumProviders::Default"=>["rh8 8.1 medium was not set for host 'myhost.com'", "Invalid medium '' for 'rh8 8.1'"]} 2019-12-19T14:13:21 [W|app|7d01e7ed] Review template error NoMethodError: undefined method `full_path' for nil:NilClass /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.58/app/services/katello/managed_content_medium_provider.rb:12:in `medium_uri' /usr/share/foreman/app/models/operatingsystems/redhat.rb:7:in `mediumpath' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.58/app/lib/katello/concerns/renderer_extensions.rb:15:in `kickstart_attributes' /usr/share/foreman/lib/foreman/renderer/scope/variables/base.rb:30:in `load_variables_base' /usr/share/foreman/lib/foreman/renderer/scope/variables.rb:20:in `block in load_variables' /usr/share/foreman/lib/foreman/renderer/scope/variables.rb:18:in `each' /usr/share/foreman/lib/foreman/renderer/scope/variables.rb:18:in `load_variables' /usr/share/foreman/lib/foreman/renderer/scope/base.rb:27:in `initialize' /usr/share/foreman/lib/foreman/renderer/scope/template.rb:9:in `initialize' /usr/share/foreman/lib/foreman/renderer.rb:39:in `new' /usr/share/foreman/lib/foreman/renderer.rb:39:in `get_scope' /usr/share/foreman/app/models/template.rb:172:in `render' /usr/share/foreman/app/models/host/base.rb:356:in `render_template' /usr/share/foreman/app/services/host_build_status.rb:36:in `block in templates_status' /usr/share/foreman/app/services/host_build_status.rb:33:in `each' /usr/share/foreman/app/services/host_build_status.rb:33:in `templates_status'
In edit mode for the host i've changed the os from my custom Redhat 8 image to some other image and then back to the original then it was building the image. why? WHY?
Here is a workaround that has been tested and shown to work: On Satellite, create a hostgroup that sets the operating system and its installation medium. The relationship between the operating system and the medium_id will be calculated at that moment. Next, when creating the host with an API call, point to the hostgroup (host[hostgroup_id] in the JSON payload) and do not mention an operating system (operatingsystem_id). By doing this, the medium_id that was pre-calculated for the hostgroup will be used and the bug will be worked around. Note that this workaround is pretty flexible. You may override any setting that is defined for the hostgroup, so this workaround effectively boils down to using host[hostgroup_id] instead of host[operatingsystem_id] to set the operating system from a host-create API call.
To be able to provision a host, ether "Synced Content" must be checked and Content Environment + Content View + Synced Content must contain a "kickstart" type repository or All Media + Installation Media must be set for external (non-managed) repositories. The error indicate that none of the mentioned was done, therefore Satellite don't know where to get the installation URL. To install RHEL8 via Kickstart, enable "Red Hat Enterprise Linux 8 for x86_64 - BaseOS Kickstart 8.X" (not "8"). I just tested this on 6.5.2.1, here is a recording of what I did: https://youtu.be/P0vbmweLjPk I briefly scanned our documentation repository and it looks like information about this is sparse: $ ag BaseOS doc-Content_Management_Guide/topics/Importing_Red_Hat_Content.adoc 123:To select the repositories to synchronize, you must first identify the product that contains the repository, and then enable that repository based on the relevant release version and base architecture. For Red{nbsp}Hat Enterprise Linux 8, you must enable both AppStream and BaseOS repositories. 133:To provision Red{nbsp}Hat Enterprise Linux 8 clients, you require the *Red{nbsp}Hat Enterprise Linux 8 for x86_64 - AppStream (RPMS)* and *Red{nbsp}Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)* repositories. doc-Provisioning_Guide/topics/Resources.adoc 179:For {RHEL} 8, ensure that you add both *{RHEL} 8 for x86_64 - AppStream Kickstart x86_64 8* and *{RHEL} 8 for x86_64 - BaseOS Kickstart x86_64 8* repositories. Therefore once you confirm this works for you, I will turn this BZ into documentation one so our docs team can further expand the instructions about how to kickstart RHEL8 systems. If you still have issues, provide steps how to reproduce the issue. I don't know what repositories have you enabled and promoted to your content view. Or are you trying with some external content via Installation Media? Have you edited an existing host? Using WebUI or CLI? Are you using a host group? Then describe what exactly is set in the hostgroup and what's overriden in the host, we've experienced some bugs in host-hostgroup override code in the past but I need to do know what exactly was overriden.
Hi Lukas, Rainer Beyel told me also to install both *{RHEL} 8 for x86_64 - AppStream Kickstart x86_64 8* and *{RHEL} 8 for x86_64 - BaseOS Kickstart x86_64 8* repositories. And without those it makes not even sense to try to build an ISO - agreed. However, we still got that problem here since we made custom kickstart scripts, called OSB4_kickstart and same for partitioning. Once the host is installed it will set the OS to "Redhat 7.6" for RHEL7 and "Redhat 8.1" for RHEL8 and going back to build mode I always have to reassign to "Redhat 8 (OSB4)" before I can successfully run the build mode with generating the ISO. In the "Redhat 8 (OSB4)" OS configuration I assigned custom kickstart and custom partitioning which is not the case for the automatically generated OS entries. I will have a look at the hostgroup "workaround" by Pablo now and report in another comment if that works for us. Thanks
@Pablo, i tried your workaround but: https://sat6-url/hostgroups/20-hg-rh8/edit shows the Operating System tab and I can select all except the "Media Selection" nor "Media" and therefore can't get it to work. If I remove the OS configuration from the host and want to inherit it from the hg-rh8 then it fails with the error message: ----------- The following errors may prevent a successful build: Templates Failure parsing OSB4_bootiso: undefined method `full_path' for nil:NilClass. Failure parsing Kickstart default PXEGrub: undefined method `full_path' for nil:NilClass. Failure parsing Kickstart default PXEGrub2: undefined method `full_path' for nil:NilClass. Failure parsing Kickstart default iPXE: undefined method `full_path' for nil:NilClass. Failure parsing OSB4_kickstart: undefined method `full_path' for nil:NilClass. Failure parsing Kickstart default finish: undefined method `full_path' for nil:NilClass. Failure parsing Kickstart default user data: undefined method `full_path' for nil:NilClass. Failure parsing Discovery Red Hat kexec: undefined method `full_path' for nil:NilClass. ----------- As Operating System in the HG I tried the one I manage manually "Redhat 8 (OSB4)" and the ones which were created automatically "Redhat 8.0" and so on. I even tried this for the RHEL7 but it did not work there either.
@Pablo: I tried with the support from Reiner Beyel, also from redhat, and: 1. we were able to assign an OS to the hg-rh8 hostgroup but we can't figure out why it worked this time and not all the other times. 2. we then removed the OS section from the host and afterwards retriggered the build mode which triggered the same error as above, as no install media could be used 3. then i reopened the host edit view and, AS you said, the OS was populated with the right values taken from the HG! 4. running the build mode once more it worked Now comes the problem with this, i don't want to remove the OS selection in host edit mode, then save it and reopen it just to have a working configuration to use the build mode. This would mean that we need to edit all the hosts twice to have the right OS selection being inherited from the HG. Also I think that this form of inheritance only works when one opens the host in edit mode and safes it right away afterwards - is that assumption correct? Your workflow is still too complicated to be used!
RE: OS keeps updating and overwriting your OS: Go to Settings - Administer - Provisioning - Ignore facts for operating system and set this to FALSE. For the hostgroup/CLI issue, please isolate a scenario which I can reproduce.
@Lukas: Administer->Settings->Provisioning->"Ignore facts for operating system" is was set to "no" (which is probably "FALSE") already. Regarding your second wish, this is such a huge wish of yours, and as a developer I can understand your desire, but I barely can install a Satellite server within less than 2 days and therefore I won't be able to reproduce this easily.
Joachim, if you set "Ignore facts for operating system" to true/yes/ja or whatever is shown as positive answer, during fact upload Satellite will ignore OS fact which is likely in form of "RedHat 7.X" or similar and it will keep the OS you have set during provisioning. If I understand your problem, this should help. As for the hostgroup issue, this is misunderstanding. I don't want you to install fresh Satellite, all I need are clear steps how to reproduce the issue. We've seen some hostgroup inheritance issues in the past, there can be a bug but it worked when I tried. Specifically I need to see all hostgroup options you set, including all options from the parent hostgroup if there's any. And then all the flags you override for your host. Also if you do this from web or CLI.
I've updated the default to "TRUE" and yes, this might help us here! I think this ticket can now be closed as, if the setting above never changes the OS from what we set it as a default, this will do the trick! Thanks to the Redhats!
Thank you, there are few more similar options in Administer - Settings - Provisioning and Puppet. If you do not treat Puppet as "single point of truth" then you can disable all of them, it can also update: - domain - subnet - IP address - OS (you have disabled this one) - puppet environment This is out of my head, the list is probably not complete. Setting names are similar: "Ignore facts for xyz".