From a64fc0bc4b3a3104778efcbf5151783922172e49 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Fri, 14 Dec 2012 22:45:07 +0100 Subject: [PATCH] Handle empty UserData for instance UserData is not required, so handle the case where it is not supplied (i.e. is None). bug 1090544 Change-Id: If8bfe9ba2aafe3bb2e9de14b01c57d1ddcf9b21d Signed-off-by: Zane Bitter --- heat/engine/resources/instance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heat/engine/resources/instance.py b/heat/engine/resources/instance.py index 077c087df5..9eac3b1beb 100644 --- a/heat/engine/resources/instance.py +++ b/heat/engine/resources/instance.py @@ -214,7 +214,7 @@ class Instance(resource.Resource): security_groups = [self.physical_resource_name_find(sg) for sg in self.properties.get('SecurityGroups')] - userdata = self.properties['UserData'] + userdata = self.properties['UserData'] or '' userdata += '\ntouch /var/lib/cloud/instance/provision-finished\n' flavor = self.properties['InstanceType'] key_name = self.properties['KeyName']