sysconfig/cloudinit: Check if disabled via kernel commandline
Currently snapd manually checks for the presence of /etc/cloud/cloud-init.disabled to avoid running cloud-init status. This is done to avoid having to run cloud-init status to check current status. Similarly, snapd can check the kernel commandline for cloud-init=disabled which also disables cloud-init permanently.
A unit test is included.
Everyone contributing to this PR have now signed the CLA. Thanks!
@bboozzoo Thanks for the review. I just rebased on the tip of master and pushed the requested changes.
Ready for re-review.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 78.86%. Comparing base (
8d91db0) to head (8ffe03f). Report is 1 commits behind head on master.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## master #13289 +/- ##
==========================================
- Coverage 78.88% 78.86% -0.02%
==========================================
Files 1037 1037
Lines 132876 133056 +180
==========================================
+ Hits 104823 104940 +117
- Misses 21515 21562 +47
- Partials 6538 6554 +16
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 78.86% <100.00%> (-0.02%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks @bboozzoo @Meulengracht @ernestl for the reviews. I think that I've addressed everything.
It looks like this is waiting for a review from @alfonsosanchezbeato. I believe that I've addressed all requested changes. Please let me know anything else needs to change.
@Meulengracht, is review from Alfonso still required here?
I think it's okay to land
Proposed replacement PR for rebase & conflict fix: https://github.com/snapcore/snapd/pull/13289