"Lifecycle environment must be specified" error when editing a host

As a workaround, ensure that either

(a) the host is not assigned to a hostgroup; or
(b) the hostgroup(s) associated with the host assign both a lifecycle environment and content view.

One of the above should get you unblocked, hopefully.

I think the issue may be resolved by Bug #36721: Discovery Provisioning fails as the sync media is getting diminished from the host page even though it's synced - Katello - Foreman, which wasn’t selected for backport to 4.9. However, I marked it as un-triaged again so that we can reconsider that in this week’s triage meeting.

Side note: the bug you mentioned Bug #36845: "Lifecycle environment must be specified" error when editing a host - Katello - Foreman was raised in the Foreman project, which is why no one from Katello had seen it yet. It may end up being closed as a duplicate, but for now I changed it to the correct project, Katello.