Merge ~chad.smith/cloud-init:bug/status-fix-done-status into cloud-init:master
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Chad Smith | ||||
Approved revision: | c29199c7d8b0b525f31f1d0eda6f9647e481eeef | ||||
Merge reported by: | Chad Smith | ||||
Merged at revision: | 86d2fc7f515f70a5117f00baf701a0bed6310b3e | ||||
Proposed branch: | ~chad.smith/cloud-init:bug/status-fix-done-status | ||||
Merge into: | cloud-init:master | ||||
Diff against target: |
140 lines (+32/-8) 2 files modified
cloudinit/cmd/status.py (+4/-1) cloudinit/cmd/tests/test_status.py (+28/-7) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ryan Harper | Approve | ||
Server Team CI bot | continuous-integration | Approve | |
Review via email: mp+337306@code.launchpad.net |
Commit message
cli: fix cloud-init status to report running when before result.json
Fix various corner cases for cloud-init status subcommand. Report
'runnning' under the following conditions:
- No /run/cloud-
- Any stage in status.json is unfinished
- status.json reports a non-null stage it is in progress on
LP: #1747965
Description of the change
see commit message
to test:
# provide slow running cloud-config
cat >slow.yaml <EOF
#cloud-config
runcmd:
- sleep 30
EOF
make deb # in this branch
lxc launch ubuntu-daily:bionic myb1
lxc file push cloud-init*deb myb1/.
lxc exec myb1 'dpkg -i /cloud-init*deb'
lxc config set myb1 user.user-data - < slow.yaml
lxc exec myb1 'cloud-init clean --logs --reboot'
lxc exec myb1 bash
cloud-init --wait # should print dots for < 30 seconds and exit w/ done
PASSED: Continuous integration, rev:c29199c7d8b 0b525f31f1d0eda 6f9647e481eeef /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 761/
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/ 761/rebuild
https:/