Problem: “Lifecycle environment must be specified” error when editing a host
Expected outcome: Able to modify/edit hosts
Foreman and Proxy versions: F 3.7.1 K 4.9.2
Foreman and Proxy plugin versions:
Distribution and version: Rocky 8
Other relevant data:
First off, I have always appreciated the help and support that this community has provided for us but I am a bit disappointed here with this issue.
I see there is a bug reported for this issue Bug #36845: "Lifecycle environment must be specified" error when editing a host - Foreman but I have to express disappointment on the resolution to fix it, which would be upgrade to 3.8. I am frustrated as we just updated to 3.7 from 3.6 as it was no longer supported and now discovered this issue will not be fixed unless we yet again upgrade.
The lifecycle of Foreman/Katello is already short, it seems as every month or two there is a new version and then there is no longer support for previous versions.
So, is there a reason why fixes aren’t backported to a “supported” version, in this case 3.7? Why list 3.7 as being supported when fixes can’t be applied?
I don’t know what error you get but editing a host works for me. But I’ve only tested a few changes. As you don’t write where exactly it’s hard to guess. There are so many different ways to change a host and different changes you can make.
It’s a new ticket. None of the developers really looked at it. Only the person who created the issue noted that the problem when away after upgrading to 4.10.0. So it’s futile to assume if or not it has been or will be backported. At this time it’s all completely circumstantial…
I suggest you describe what you do exactly and what happens exactly and provide the necessary logs/traces when it happens. I am on 3.7.0/4.9.2 and I can edit host information through the old gui via the edit button as well through the new gui. I can also change the content view and lifecycle environment either way in any way I want (or better: tested).
Looking at the issue 36845 and reading that “Since upgrading from Katello 4.9.0 to 4.9.2 any attempt to edit a host will result” I wonder though, whether that issue came from upgrading and not running foreman-installer afterwards. It sounds a lot like some necessary migration didn’t run…
As you are mentioning this: is that bug related or the same issue? Whenever I edit a host (via the edit button) it’ll reset the selected LE and CV of the host to the one in the host group. Quiet annoying but a quick search did’t find me a existing issue for that…
As far as I understand, I think this is by design. Host groups always try to keep all their hosts in sync, so if you go into the host edit screen and then save, the first thing it does is always to inherit all the values from the hostgroup.
That is very unexpected. If I go into the host edit screen and only make a minor change (e.g. change the comment) I would expect everything else to remain as it is. It did so in previous versions and it doesn’t make sense to me because you don’t see the change. If you check the settings before pressing Submit it’s all the way it’s supposed to be, but after the submit it has been changed. That makes that whole thing pretty hard to use.
Hey @jeremylenz. This forum topic was one that I opened but I asked to delete since it was just a rant post but my other post regarding the issue with logs is here which you have responded to as well:
Just don’t want to create any confusion with this. Thank you for your help and looking into this issue.
Hello, Thank you for providing this workaround but unfortunately it doesnt work in my environment.
I run the following:
foreman-3.7.0
katello-4.9.2
Katello 4.9.3 seems to be never released. I cannot update the complete installation because we use external Postgre Database which is barely supported
I need to barematel install hosts with kickstart. If I don use CV in the Host Group, I cannot select in the CV Operating System a Synced Content. If I use All Media instead the necessary information in the kickstart default are not filled correct:
# This kickstart file was rendered from the Foreman provisioning template "Kickstart default".
# for laura-stich running Rocky 9 x86_64
# Organization: Hydra-Local-Monitoring
# Location: Hydra Global
# Lifecycle environment:
# Content View:
# Content Source:
url --url https://dl.rockylinux.org/pub/rocky/9/BaseOS/x86_64/kickstart/
If I use the CV in the Hostgroup I can select the synced content in OS and get correct result in kickstart file but the described error then happens.
# This kickstart file was rendered from the Foreman provisioning template "Kickstart default".
# for hugh-barter running Rocky 9 x86_64
# Organization: Hydra-Local-Monitoring
# Location: Default Location
# Lifecycle environment: Test
# Content View: Rocky Linux
# Content Source: eudrpmon0016.dc.ege.ds
url --url http://hostname/pulp/content/Hydra-Local-Monitoring/Test/Rocky_Linux/custom/Rocky_Linux_BaseOS/Rocky_Linux_BaseOS/
repo --name Rocky_Linux_BaseOS --baseurl http://hostname/pulp/content/Hydra-Local-Monitoring/Test/Rocky_Linux/custom/Rocky_Linux_BaseOS/Rocky_Linux_Bas
If I dont use a host group I get the same described error.
I would appreciate any help here because otherwise I have to do a complete reinstallation.
Many Thanks
External databases are supported. However, Katello 4.9 is not, as the current version is 4.12 and 4.13 is about to be released. Is it possible to make a new post with more details about the issue with the external database?