Merge lp:~harlowja/cloud-init/update-prev-hostname-read into lp:~cloud-init-dev/cloud-init/trunk
Proposed by
Joshua Harlow
Status: | Merged |
---|---|
Merged at revision: | 733 |
Proposed branch: | lp:~harlowja/cloud-init/update-prev-hostname-read |
Merge into: | lp:~cloud-init-dev/cloud-init/trunk |
Diff against target: |
113 lines (+43/-21) 2 files modified
cloudinit/distros/__init__.py (+23/-1) cloudinit/distros/debian.py (+20/-20) |
To merge this branch: | bzr merge lp:~harlowja/cloud-init/update-prev-hostname-read |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Scott Moser | Needs Fixing | ||
Review via email: mp+134213@code.launchpad.net |
Description of the change
Only attempt to read the previous hostname file if it exists.
- Instead of always reading the previous hostname file even if it
did not exist lets only read it if it is a valid variable and is
actually a existent file instead of just attempting to read it
always.
- Also update the logging that is done when a previous file does not exist.
To post a comment you must log in.
$ sudo rm /var/lib/ cloud/data/ previous- *
$ sudo cloud-init single --name= update- hostname cloud/data/ previous- hostname
Cloud-init v. 0.7.1 running 'single' at Tue, 13 Nov 2012 22:59:46 +0000. Up 8497.87 seconds.
2012-11-13 22:59:46,560 - util.py[WARNING]: Error reading hostname from /var/lib/
The second issue comes from the update path.