incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mry...@apache.org
Subject svn commit: r792551 - /incubator/tashi/trunk/src/tashi/agents/dhcpdns.py
Date Thu, 09 Jul 2009 13:33:26 GMT
Author: mryan3
Date: Thu Jul  9 13:33:25 2009
New Revision: 792551

URL: http://svn.apache.org/viewvc?rev=792551&view=rev
Log:
Bug fix -- DNS end DHCP entries were failing to be added if the name did not already exist
and reverseDns was turned on


Modified:
    incubator/tashi/trunk/src/tashi/agents/dhcpdns.py

Modified: incubator/tashi/trunk/src/tashi/agents/dhcpdns.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/agents/dhcpdns.py?rev=792551&r1=792550&r2=792551&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/agents/dhcpdns.py (original)
+++ incubator/tashi/trunk/src/tashi/agents/dhcpdns.py Thu Jul  9 13:33:25 2009
@@ -100,8 +100,11 @@
 		return ipString
 	
 	def addDhcp(self, name, ipaddr, hwaddr):
-		self.removeDhcp(name)
-		self.removeDhcp(name, ipaddr)
+		try:
+			self.removeDhcp(name)
+			self.removeDhcp(name, ipaddr)
+		except:
+			pass
 		cmd = "omshell"
 		(stdin, stdout) = os.popen2(cmd)
 		stdin.write("server %s\n" % (self.dhcpServer))
@@ -137,7 +140,10 @@
 		stdout.close()
 	
 	def addDns(self, name, ip):
-		self.removeDns(name)
+		try:
+			self.removeDns(name)
+		except:
+			pass
 		if (self.dnsKeyFile != ""):
 			cmd = "nsupdate -k %s" % (self.dnsKeyFile)
 		else:



Mime
View raw message