Doesn't report an error when hostname fails

Bug #832175 reported by Loïc Minier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Low
Unassigned
cloud-init (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Hi

If you try setting hostname to an invalid one, cloud-init will log setting the hostname (and will change /etc/hostname) but hostname (the command) will actually fail.

cloud-init should log an error in this case.

It would also be best to not set etc/hostname if running hostname fails.

Finally, if cloud-init detected the invalid syntax it could avoid running hostname entirely and display a nicer error by validating the allowed hostname chars first; this does mean validating the chars both in hostname and in cloud-init, which means it will get out of date, but that's fairly stable.

Cheers,

Related branches

Revision history for this message
Scott Moser (smoser) wrote :

This is most relevant when something else is buggy as in bug 820962.

Changed in cloud-init (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.6.1-0ubuntu16

---------------
cloud-init (0.6.1-0ubuntu16) oneiric; urgency=low

  * catch up with trunk at revision 439
  * warn on failure to set hostname (LP: #832175)
  * properly wait for all static interfaces to be up before
    cloud-init runs (depends on fix in LP:# 838968).
  * in DataSources NoCloud and OVF, do not set hostname to the
    static value 'ubuntuhost' if local-hostname is not in metadata
    (LP: #838280)
  * improve the way ssh_authorized_keys is updated, so that the
    values given will be used. (LP: #434076, LP: #833499)
  * cloud-init-notnet.conf: minor changes to config
 -- Scott Moser <email address hidden> Thu, 01 Sep 2011 21:14:09 -0400

Changed in cloud-init (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote :

This is fixed in revision 437.

Changed in cloud-init:
status: Confirmed → Fix Committed
Scott Moser (smoser)
Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.