Merge ~smoser/cloud-init:bug/1707222-use-run-for-tmpdir into cloud-init:master
| Status: | Merged |
|---|---|
| Approved by: | Scott Moser on 2017-09-07 |
| Approved revision: | 41ef7485d1589a7c4a379763d4e4fdcc6d88d12b |
| Merged at revision: | 409918f9ba83e45e9bc5cc0b6c589e2fc8ae9b60 |
| Proposed branch: | ~smoser/cloud-init:bug/1707222-use-run-for-tmpdir |
| Merge into: | cloud-init:master |
| Diff against target: |
355 lines (+112/-46) 10 files modified
cloudinit/config/cc_bootcmd.py (+2/-1) cloudinit/config/cc_chef.py (+2/-1) cloudinit/config/cc_snappy.py (+2/-2) cloudinit/net/dhcp.py (+2/-1) cloudinit/sources/helpers/azure.py (+2/-2) cloudinit/temp_utils.py (+93/-0) cloudinit/util.py (+2/-34) packages/bddeb (+3/-2) tests/unittests/test_datasource/test_azure_helper.py (+2/-2) tests/unittests/test_net.py (+2/-1) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Ryan Harper | 2017-08-29 | Approve on 2017-09-07 | |
| Chad Smith | Approve on 2017-09-07 | ||
| Server Team CI bot | continuous-integration | Approve on 2017-08-31 | |
|
Review via email:
|
|||
Commit Message
Use /run/cloud-init for tempfile operations.
During boot, the usage of /tmp is not safe. In systemd systems,
systemd-
while cloud-init is using it. The solution was to use
/run/cloud-
LP: #1707222
| Scott Moser (smoser) wrote : | # |
FAILED: Continuous integration, rev:4b4e5397775
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
FAILED: Ubuntu LTS: Build
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:b6e31f58f80
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: MAAS Compatability Testing
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:6150f71ba59
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: MAAS Compatability Testing
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
- 189c266... by Scott Moser on 2017-08-30
- 3fcdeca... by Scott Moser on 2017-08-30
- 90724e4... by Scott Moser on 2017-08-30
| Scott Moser (smoser) wrote : | # |
i think i've addressed all comments.
- 5ac4d45... by Scott Moser on 2017-08-30
PASSED: Continuous integration, rev:1020f5eff24
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: MAAS Compatability Testing
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:b2c155ef261
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: MAAS Compatability Testing
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
| Ryan Harper (raharper) wrote : | # |
Looks good, minor item and one question inline below.
- a9ff924... by Scott Moser on 2017-08-31
- 7eacf50... by Scott Moser on 2017-08-31
| Scott Moser (smoser) wrote : | # |
adjusted to feedback. i'm not sure what to do about the Paths statement that Chad raised.
FAILED: Continuous integration, rev:3e8b05f3ec2
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
FAILED: Ubuntu LTS: Build
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:41ef7485d15
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: MAAS Compatability Testing
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
| Chad Smith (chad.smith) wrote : | # |
> adjusted to feedback. i'm not sure what to do about the Paths statement that
> Chad raised.in
Scott, let's not block on my paths comment for now. We can sort it in a followup branch if the need becomes greater. It might involve us reworking how Paths object is initialized which would allow both paths and this to source the same static config variables/globals. It
| Chad Smith (chad.smith) wrote : | # |
It might be nice to cover some of this in unittesting, but I can take a stab at it on a cc_bootcmd schema branch I'm working.
| Scott Moser (smoser) wrote : | # |
marked approved per Chad's last comment there.
- c778531... by Scott Moser on 2017-09-07


Issues with this currently are ryFile was using util.del_file, but I did not want a circular import to cloudinit.util
a.) no unit tests of the _TEMPDIR path using /run/cloud-init.
b.) ExtendedTempora
c.) could clean up /run/cloud-init via atexit
d.) tempdir() was using del_dir, but circular import.