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/f32ea44c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f32ea44c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f32ea44c Branch: refs/heads/feature/systemvm-persistent-config Commit: f32ea44cccc21066d2d86478e8d66464442f590c Parents: f4f2590 Author: wilderrodrigues <[email protected]> Authored: Wed Jan 21 19:29:33 2015 +0100 Committer: wilderrodrigues <[email protected]> Committed: Mon Feb 16 16:08:36 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/f32ea44c/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
