update-hostname module results in "Error reading hostname from /var/lib/cloud/data/previoius-hostname"

Bug #1078452 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Undecided
Unassigned

Bug Description

$ sudo rm /var/lib/cloud/data/previous-*

$ sudo cloud-init single --name=update-hostname
Cloud-init v. 0.7.1 running 'single' at Tue, 13 Nov 2012 20:54:41 +0000. Up 992.81 seconds.
2012-11-13 20:54:41,497 - __init__.py[WARNING]: /var/lib/cloud/data/previous-hostname
2012-11-13 20:54:41,498 - __init__.py[WARNING]: no
2012-11-13 20:54:41,499 - util.py[WARNING]: Error reading hostname from /var/lib/cloud/data/previous-hostname

This warning would occur on a fresh/pristine boot every time.
It comes from 2 places in cloudinit/distros/__init__.py:
  prev_hostname = self._read_hostname(prev_hostname_fn)
and
 self._write_hostname(hostname, fn)

Related branches

Joshua Harlow (harlowja)
Changed in cloud-init:
status: New → 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.