Fix restarting VPC
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5881a867 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5881a867 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5881a867 Branch: refs/heads/feature/systemvm-persistent-config Commit: 5881a867e525b5e6cbaf69c2f7f677f3aa1f9fd1 Parents: ac48381 Author: wilderrodrigues <[email protected]> Authored: Wed Jan 21 19:29:33 2015 +0100 Committer: wilderrodrigues <[email protected]> Committed: Wed Feb 4 18:47:08 2015 +0100 ---------------------------------------------------------------------- .../patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5881a867/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py ---------------------------------------------------------------------- diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py index 43f209a..f9ecbfc 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py @@ -39,7 +39,12 @@ class CsGuestNetwork: if not self.guest: return self.config.get_dns() # Can a router provide dhcp but not dns? - return [ self.data['router_guest_gateway'] ] + self.data['dns'].split(',') + if 'dns' in self.data: + return [ self.data['router_guest_gateway'] ] + self.data['dns'].split(',') + elif "router_guest_gateway" in self.data: + return [ self.data['router_guest_gateway'] ] + else: + return [""] def set_dns(self, val): self.data['dns'] = val
