Skip to content

Conversation

@vittyvk
Copy link
Contributor

@vittyvk vittyvk commented Oct 14, 2024

RHEL8+ uses NetworkManager and the most recent RHEL10 switched to using built-in dhcp client making DefaultOSUtil.set_dhcp_hostname() unsuitable. In fact, RHEL distos had been carrying RHEL-only downstream patch replacing RedhatOSModernUtil.set_dhcp_hostname() with

nmcli device modify ipv4.dhcp-hostname <HOSTNAME ipv6.dhcp-hostname

since RHEL8 but this is also not ideal as 'nmcli device modify' does not persist the change. Do 'nmcli connection modify' instead.

Issue #


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • [-] If applicable, the PR references the bug/issue that it fixes in the description.
  • [-] New Unit tests were added for the changes made

Quality of Code and Contribution Guidelines

@vittyvk
Copy link
Contributor Author

vittyvk commented Nov 21, 2024

ping?

@maddieford
Copy link
Contributor

Hi @vittyvk, thank you for opening this. It's in our backlog to review+test

@Klaas-
Copy link

Klaas- commented Mar 3, 2025

references #2640

RHEL8+ uses NetworkManager and the most recent RHEL10 switched to using
built-in dhcp client making DefaultOSUtil.set_dhcp_hostname() unsuitable.
In fact, RHEL distos had been carrying RHEL-only downstream patch replacing
RedhatOSModernUtil.set_dhcp_hostname() with

  nmcli device modify <DEV> ipv4.dhcp-hostname <HOSTNAME ipv6.dhcp-hostname
  <HOSTNAME>

since RHEL8 but this is also not ideal as 'nmcli device modify' does not
persist the change. Complement this with 'nmcli connection modify' to both
make the immediate change and persist it.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
@vittyvk
Copy link
Contributor Author

vittyvk commented Apr 3, 2025

While this is still on review, I added a simple re-try mechanism for 'nmcli device modify' as it was found that this action can coincide with NetworkManager's interface re-configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants