]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
downburst: Explicitly type our user-data 1119/head
authorZack Cerza <zack@redhat.com>
Mon, 9 Oct 2017 21:14:40 +0000 (15:14 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 9 Oct 2017 21:34:36 +0000 (15:34 -0600)
Something broke for us in cloud-init 0.7.9. Turns out our user-data was
being interpreted as an octet-stream, as opposed to a cloud-config. Mark
it as a cloud-config, so that cloud-init will do the right thing once
more.

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/provision/downburst.py

index fdb23af43442f2de97924f28c3bc437dad537bfd..62f29e352581b424792158cb65851395f98c8976 100644 (file)
@@ -209,7 +209,8 @@ class Downburst(object):
         if os_type in ('ubuntu', 'fedora'):
             user_info['packages'].append('python')
         user_fd = tempfile.NamedTemporaryFile(delete=False)
-        yaml.safe_dump(user_info, user_fd)
+        user_str = "#cloud-config\n" + yaml.safe_dump(user_info)
+        user_fd.write(user_str)
         self.user_path = user_fd.name
         return True