]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Add a newline to user data injection.
authorIan Main <imain@redhat.com>
Thu, 6 Sep 2012 02:00:54 +0000 (19:00 -0700)
committerIan Main <imain@redhat.com>
Thu, 6 Sep 2012 02:03:32 +0000 (19:03 -0700)
If no newline is present at the end of the user-data section of the
template, the addition of the touch command will cause the last
line to break.

Change-Id: I15ba402f83f6fba03f7d0455a63a5dc03480973d
Signed-off-by: Ian Main <imain@redhat.com>
heat/engine/instance.py

index 9d19a71d7a9913a79ed6d6fcecc2ae2dd3c4b5ca..74f05e3c2e32e240caab4ddf8a9e119d8a85331c 100644 (file)
@@ -191,7 +191,7 @@ class Instance(resources.Resource):
     def handle_create(self):
         security_groups = self.properties.get('SecurityGroups')
         userdata = self.properties['UserData']
-        userdata += 'touch /var/lib/cloud/instance/provision-finished\n'
+        userdata += '\ntouch /var/lib/cloud/instance/provision-finished\n'
         flavor = self.properties['InstanceType']
         key_name = self.properties['KeyName']