Network Manager on Layer 7 restart persistantly flooding /var/log
search cancel

Network Manager on Layer 7 restart persistantly flooding /var/log

book

Article ID: 243702

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

Network Manager flooding the /var/log/messages which is filling up disk space.
This is happening in Azure environments
 
#########################
AZURE images used to build  the appliance:
 
 
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx systemd: Starting Network Manager Script Dispatcher Service...
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx NetworkManager[8894]: <info>  [1630337949.0951] dhcp4 (eth1): canceled DHCP transaction, DHCP client pid 8930
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx NetworkManager[8894]: <info>  [1630337949.0952] dhcp4 (eth1): state changed bound -> done
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx NetworkManager[8894]: <info>  [1630337949.0952] device (eth1): DHCPv4: 480 seconds grace period started
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx dbus[760]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx systemd: Started Network Manager Script Dispatcher Service.
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx nm-dispatcher: req:1 'connectivity-change': new request (4 scripts)
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx nm-dispatcher: req:1 'connectivity-change': start running ordered scripts...
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx nm-dispatcher: req:2 'connectivity-change': new request (4 scripts)
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx NetworkManager[8894]: <info>  [1630337949.1045] dhcp4 (eth0): canceled DHCP transaction, DHCP client pid 8935
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx NetworkManager[8894]: <info>  [1630337949.1046] dhcp4 (eth0): state changed unknown -> done
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx NetworkManager[8894]: <info>  [1630337949.1046] dhcp4 (eth0): canceled DHCP transaction
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx NetworkManager[8894]: <info>  [1630337949.1051] manager: startup complete
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx nm-dispatcher: req:3 'connectivity-change': new request (4 scripts)
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx NetworkManager[8894]: <info>  [1630337949.1111] exiting (success)
Aug 30 17:39:09 xxxxxxxxxxxxxxxxx systemd: Stopped Network Manager.
 

Environment

Release : 10.0

Component :

Resolution

It is the Azure  waagant trying to set the hostname and filling up the messages log .

to  resolved the issue .

check the file 

cat  /var/lib/waagent/published_hostname

This should have the current hostname as listed in the azure portal if it still has 

localhost.localhost  or something else.

Delete the file . 

restart the waagent using 

service waagent stop

service waagent start

Now check the file again

cat  /var/lib/waagent/published_hostname

It should now contain the current hostname 

if not check the waagent.log 

cat  /var/log/waagent.log

2022-05-17T09:24:28.187821Z INFO EnvHandler ExtHandler Published hostname record does not exist, creating [/var/lib/waagent/published_hostname] with hostname <hostname>.<yourdomain>.co ]

if it is correct check the messages log for new hostname change messages like 

2022-05-17T09:23:04.487696Z INFO EnvHandler ExtHandler EnvMonitor: Detected hostname change: localhost.localdomain -> <hostname>.<yourdomain>.com

This message should not happen anymore .