Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Sometimes cannot publish hostname #3165

Open
yuxisun1217 opened this issue Jul 30, 2024 · 1 comment
Open

[BUG] Sometimes cannot publish hostname #3165

yuxisun1217 opened this issue Jul 30, 2024 · 1 comment
Assignees

Comments

@yuxisun1217
Copy link

Describe the bug: A clear and concise description of what the bug is.

Sometimes after changing hostname, the nmcli fails to modify eth0 dhcp-hostname, and the hostname cannot be published
Reproduce rate: ~10%

waagent.log:

2024-07-29T07:39:44.742927Z INFO EnvHandler ExtHandler EnvMonitor: Detected hostname change: walaauto95d1v24 -> walaauto95d1v25
2024-07-29T07:39:44.759943Z VERBOSE EnvHandler ExtHandler Command: [service NetworkManager restart]
2024-07-29T07:39:44.963589Z INFO EnvHandler ExtHandler Examine /proc/net/route for primary interface
2024-07-29T07:39:44.965679Z INFO EnvHandler ExtHandler Primary interface is [eth0]
2024-07-29T07:39:44.986179Z VERBOSE EnvHandler ExtHandler Command: [nmcli device modify eth0 ipv4.dhcp-hostname walaauto95d1v25 ipv6.dhcp-hostname walaauto95d1v25]
2024-07-29T07:39:45.055011Z ERROR EnvHandler ExtHandler Command: [nmcli device modify eth0 ipv4.dhcp-hostname walaauto95d1v25 ipv6.dhcp-hostname walaauto95d1v25], return code: [6], result: [Error: Reapplying connection to device 'eth0' (/org/freedesktop/NetworkManager/Devices/2) failed: Device is not activated
]
2024-07-29T07:39:45.055495Z ERROR EnvHandler ExtHandler failed to set DHCP hostname for interface eth0: return code 6
2024-07-29T07:39:45.055980Z INFO EnvHandler ExtHandler Examine /proc/net/route for primary interface
2024-07-29T07:39:45.056561Z INFO EnvHandler ExtHandler Primary interface is [eth0]
2024-07-29T07:39:45.066097Z VERBOSE EnvHandler ExtHandler Command: [ip link set eth0 down && ip link set eth0 up]

Steps to reproduce
Prepare a VM on Azure with waagent service started.
Change hostname, and check if the hostname is published to the DNS
hostnamectl set-hostname walacheck1
sleep 30s-1min
nslookup $(hostname)

Distro and WALinuxAgent details (please complete the following information):
RHEL-9.5
WALinuxAgent-2.7.0.6-10.el9.noarch

@maddieford maddieford self-assigned this Jul 30, 2024
@maddieford
Copy link
Contributor

@yuxisun1217 Thanks for opening this issue. Improving hostname publishing on Rhel 8/9 is a high priority item for us, we'll look into this soon.

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

No branches or pull requests

2 participants