[
https://issues.apache.org/jira/browse/CLOUDSTACK-10252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16337305#comment-16337305
]
ASF GitHub Bot commented on CLOUDSTACK-10252:
---------------------------------------------
rhtyd closed pull request #2427: CLOUDSTACK-10252: Delete dnsmasq leases file
on restart
URL: https://github.com/apache/cloudstack/pull/2427
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py
b/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py
index 7aac837cf1b..30fb38e016a 100755
--- a/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py
+++ b/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py
@@ -49,15 +49,21 @@ def process(self):
self.add(self.dbag[item])
self.write_hosts()
- if self.cloud.is_changed():
- self.delete_leases()
-
self.configure_server()
- restart_dnsmasq = self.conf.commit()
- self.cloud.commit()
+ restart_dnsmasq = False
+
+ if self.conf.commit():
+ restart_dnsmasq = True
+
+ if self.cloud.commit():
+ restart_dnsmasq = True
+
self.dhcp_opts.commit()
+ if restart_dnsmasq:
+ self.delete_leases()
+
if not self.cl.is_redundant() or self.cl.is_master():
if restart_dnsmasq:
CsHelper.service("dnsmasq", "restart")
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> VR Problem on Releasing Expunged Instance IP from dnsmasq.leases file
> ---------------------------------------------------------------------
>
> Key: CLOUDSTACK-10252
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10252
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Rohit Yadav
> Assignee: Rohit Yadav
> Priority: Blocker
> Fix For: 4.11.0.0
>
>
> Email on dev@:
> Hi;
> Today we noticed that one of our new provisioned instance did not get IP
> from VR. When we dig into the issue we find that one different mac is
> written in dnsmasq.leases file holds new instances IP address.
> We checked this mac address from db and we noticed that this mac is used
> for old expunged instance.
> So from this point we realised that when we destroy an instance its mac did
> not removed from dnsmasq.leases file so if we use this ip for a new
> instance then we have a problem, our instance could not get IP from VR.
> We have one host on our lab environment and its Ubuntu 16.04.3 KVM. Today
> we made a HA test and we crashed the host so VR and SystemVM's are rebooted
> after we boot host back. I do not think this issue is related to VR reboot
> but i like to give information about our environment.
> We need to manage dnsmasq.leases file when we expunge an instance.
> Thanks
> Özhan
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)