Merge ~raharper/cloud-init:sysconfig-resolvconf-duplicate-header-lp1701420 into cloud-init:master
Proposed by
Ryan Harper
Status: | Merged |
---|---|
Approved by: | Scott Moser |
Approved revision: | 491585acd21b21dc18defc90cc1e00489ea00769 |
Merged at revision: | 56103567fbf486625cdf5bfe40eea5ddcb7e8e04 |
Proposed branch: | ~raharper/cloud-init:sysconfig-resolvconf-duplicate-header-lp1701420 |
Merge into: | cloud-init:master |
Diff against target: |
31 lines (+8/-1) 2 files modified
cloudinit/net/sysconfig.py (+5/-1) tests/unittests/test_net.py (+3/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Needs Fixing | |
cloud-init Commiters | Pending | ||
Review via email:
|
Description of the change
sysconfig: Dont repeat header when rendering resolv.conf
The sysconfig renderer duplicates the cloud-init header string
when rendering resolv.conf file. This leads to resolv.conf file
growing with every reboot of a system. Fix this by checking for
the header when loading content from existing file.
Update one of the sysconfig unittests with multiple render calls
to simulate the reboot to check that we don't repeat the header.
LP: #1701420
To post a comment you must log in.
FAILED: Continuous integration, rev:491585acd21 b21dc18defc90cc 1e00489ea00769 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 106/
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
FAILED: CentOS 6 & 7: Build & Test
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 106/rebuild
https:/