Public bug reported:

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']:

** Affects: cloud-init (Ubuntu)
     Importance: Medium
     Assignee: Ben Howard (utlemming)
         Status: Confirmed

** Package changed: ubuntu => cloud-init (Ubuntu)

** Branch linked: lp:~utlemming/cloud-init/lp-1236445-smartos-hostname

** Description changed:

  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
+ 
+          if not md['local-hostname']:
+              md['local-hostname'] = system_uuid
  +        md['local-hostname'] = md['local-hostname'].strip()
-  
-          ud = None
-          if md['user-data']:
+ 
+          ud = None
+          if md['user-data']:

** Description changed:

  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()
+ +            md['local-hostname'] = md['local-hostname'].strip()
  
           ud = None
           if md['user-data']:

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1236445

Title:
  smartos hostname assignment fails due to whitespace

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1236445/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to