Comment 0 for bug 1236445

Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

SmartOS uses whitespace when reporting the hostname via the meta-data source. As a result, the hostname assignment fails.

Simple fix:

=== modified file 'cloudinit/sources/DataSourceSmartOS.py'
--- cloudinit/sources/DataSourceSmartOS.py 2013-10-05 01:05:21 +0000
+++ cloudinit/sources/DataSourceSmartOS.py 2013-10-07 16:12:19 +0000
@@ -145,6 +145,7 @@

         if not md['local-hostname']:
             md['local-hostname'] = system_uuid
+ md['local-hostname'] = md['local-hostname'].strip()

         ud = None
         if md['user-data']: