Merge ~chad.smith/cloud-init:clean-status-commands into cloud-init:master
| Status: | Merged |
|---|---|
| Approved by: | Chad Smith on 2017-12-05 |
| Approved revision: | 5609ca047823ec70a82a5a2e521e32cd5c3632ce |
| Merged at revision: | 30b4d15764a1a9644379cf95770e8b2480856882 |
| Proposed branch: | ~chad.smith/cloud-init:clean-status-commands |
| Merge into: | cloud-init:master |
| Diff against target: |
1018 lines (+888/-11) 10 files modified
cloudinit/cmd/clean.py (+102/-0) cloudinit/cmd/main.py (+18/-0) cloudinit/cmd/status.py (+157/-0) cloudinit/cmd/tests/__init__.py (+0/-0) cloudinit/cmd/tests/test_clean.py (+159/-0) cloudinit/cmd/tests/test_status.py (+353/-0) cloudinit/distros/__init__.py (+11/-5) cloudinit/util.py (+26/-0) tests/unittests/test_cli.py (+24/-6) tests/unittests/test_util.py (+38/-0) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Server Team CI bot | continuous-integration | Approve on 2017-12-05 | |
| Scott Moser | 2017-11-10 | Needs Fixing on 2017-11-10 | |
|
Review via email:
|
|||
Description of the Change
cli: Add clean and status subcommands
The 'cloud-init clean' command allows a user or script to clear cloud-init artifacts from the system so that cloud-init sees the system as unconfigured upon reboot. Optional parameters can be provided to remove cloud-init logs and reboot after clean.
The 'cloud-init status' command allows the user or script to check whether cloud-init has finished all configuration stages and whether errors occurred. An optional --wait argument will poll on a 0.25 second interval until cloud-init configuration is complete. The benefit here is scripts can block on cloud-init completion before performing post-config tasks.
| Scott Moser (smoser) wrote : | # |
I really like it.
some minor things inline.
And what happens when cloud-init is disabled, either by ds-identify disabling it or /etc/cloud/
to test that, just touch /etc/cloud/
and reboot
- 0ea787b... by Chad Smith on 2017-11-13
PASSED: Continuous integration, rev:0ea787b32e6
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:/
- 656e569... by Chad Smith on 2017-11-15
- 38999e5... by Chad Smith on 2017-11-15
FAILED: Continuous integration, rev:38999e541fc
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild:
https:/
- 001c52a... by Chad Smith on 2017-11-15
PASSED: Continuous integration, rev:001c52a8078
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:/
- f5633b9... by Chad Smith on 2017-11-15
FAILED: Continuous integration, rev:f5633b91c02
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild:
https:/
- e80b2cb... by Chad Smith on 2017-11-16
PASSED: Continuous integration, rev:e80b2cbeb3c
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:/
- ee2d62c... by Chad Smith on 2017-11-16
PASSED: Continuous integration, rev:ee2d62c41d2
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:/
| Scott Moser (smoser) wrote : | # |
some comments on a probably older version.
re-reviwing here shortly.
- b08ee4a... by Chad Smith on 2017-11-20
PASSED: Continuous integration, rev:b08ee4ad44c
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:/
| Scott Moser (smoser) wrote : | # |
one small request.
other than that i approve.
i'll try to test some tomorrow with this.
| Scott Moser (smoser) wrote : | # |
I launched a container (bionic)
installed a deb from your branch (17.1-43-
then:
root@b1:~# cat /run/cloud-
{
"v1": {
"datasource": "DataSourceNoCloud [seed=/
"errors": []
}
}
root@b1:~# systemctl status cloud-init --no-pager | grep Active
Active: active (exited) since Mon 2017-11-27 22:45:19 UTC; 3min 11s ago
| Scott Moser (smoser) wrote : | # |
above, it would have made more sense if i'd have shown this also
root@b1:~# cloud-init status
status: disabled
- 14e9ab8... by Chad Smith on 2017-11-28
| Chad Smith (chad.smith) wrote : | # |
Addressed review comment, shuffling uses_systemd out of Distros.
- 95acd47... by Chad Smith on 2017-11-28
FAILED: Continuous integration, rev:14e9ab84581
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:95acd47699c
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild:
https:/
- d04460a... by Chad Smith on 2017-11-29
PASSED: Continuous integration, rev:d04460aee05
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:/
| Scott Moser (smoser) wrote : | # |
Chad, this looks good.
Thanks.
i had one thing inline that i'd like fixed (kernel commandline cloud-init=
and then the c-i.
and then i think we're good.
- 59929ff... by Chad Smith on 2017-11-30
PASSED: Continuous integration, rev:59929ff7190
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:/
| Scott Moser (smoser) wrote : | # |
Can we replace 'print' calls that are for error purposes with a 'print_error' function.
http://
Just appply ^ and I'm good.
We could do the same with 'print' to 'print_output', but I'm not hung up on that now.
- 5609ca0... by Chad Smith on 2017-12-05
PASSED: Continuous integration, rev:5609ca04782
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:965e55fd772 20461709ec0208e bc524dcfd62919 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 483/
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: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 483/rebuild
https:/