weizhouapache commented on issue #7653:
URL: https://github.com/apache/cloudstack/issues/7653#issuecomment-1598993171

   > Is there perhaps a certain log that can be traced that logs the process of 
entries being added to the `/etc/hosts` file? That would be the only way I 
would be able to provide the actual error being triggered.
   
   @whitetiger264 
   you can check /var/log/cloud.log if there are some errors
   
   when vm is deleted, there should be logs like
   ```
   2023-06-20 15:10:25,590 INFO     Attempting to delete entries from 
dnsmasq.leases file for VMs which are not on dhcphosts file
   2023-06-20 15:10:25,590 INFO     dhcp_release $(ip route get 10.0.100.105 | 
grep eth | head -1 | awk '{print $3}') 10.0.100.105 1e:00:83:00:00:2d
   2023-06-20 15:10:25,590 INFO     Executing: dhcp_release $(ip route get 
10.0.100.105 | grep eth | head -1 | awk '{print $3}') 10.0.100.105 
1e:00:83:00:00:2d
   2023-06-20 15:10:25,609 INFO     Deleted 1 entries from dnsmasq.leases file
   2023-06-20 15:10:25,609 INFO     Wrote edited file /etc/hosts
   2023-06-20 15:10:25,609 INFO     Updated file in-cache configuration
   2023-06-20 15:10:25,609 INFO     Updated hosts file
   ```
   
   
   when vm is created
   ```
   2023-06-20 15:10:59,634 INFO     update_config.py :: Processing incoming 
file => vm_dhcp_entry.json.75a5c3d8-7f85-4160-aa0b-047d3c253aaf
   2023-06-20 15:10:59,635 INFO     Processing JSON file 
vm_dhcp_entry.json.75a5c3d8-7f85-4160-aa0b-047d3c253aaf
   2023-06-20 15:10:59,635 INFO     Continuing with the processing of file 
'/var/cache/cloud/vm_dhcp_entry.json.75a5c3d8-7f85-4160-aa0b-047d3c253aaf'
   2023-06-20 15:10:59,636 INFO     Command of type dhcpentry received
   ...
   2023-06-20 15:10:59,744 INFO     Attempting to delete entries from 
dnsmasq.leases file for VMs which are not on dhcphosts file
   2023-06-20 15:10:59,745 INFO     Deleted 0 entries from dnsmasq.leases file
   2023-06-20 15:10:59,745 INFO     Wrote edited file /etc/hosts
   2023-06-20 15:10:59,745 INFO     Updated file in-cache configuration
   2023-06-20 15:10:59,746 INFO     Updated hosts file
   ...
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to