snapd icon indicating copy to clipboard operation
snapd copied to clipboard

sysconfig/cloudinit: Check if disabled via kernel commandline

Open holmanb opened this issue 2 years ago • 5 comments

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.

holmanb avatar Oct 11 '23 20:10 holmanb

Everyone contributing to this PR have now signed the CLA. Thanks!

github-actions[bot] avatar Feb 26 '24 18:02 github-actions[bot]

@bboozzoo Thanks for the review. I just rebased on the tip of master and pushed the requested changes.

Ready for re-review.

holmanb avatar Feb 26 '24 18:02 holmanb

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.

codecov-commenter avatar Feb 27 '24 08:02 codecov-commenter

Thanks @bboozzoo @Meulengracht @ernestl for the reviews. I think that I've addressed everything.

holmanb avatar Feb 27 '24 23:02 holmanb

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.

holmanb avatar Mar 14 '24 16:03 holmanb

@Meulengracht, is review from Alfonso still required here?

ernestl avatar May 31 '24 14:05 ernestl

I think it's okay to land

Meulengracht avatar May 31 '24 14:05 Meulengracht

Proposed replacement PR for rebase & conflict fix: https://github.com/snapcore/snapd/pull/13289

ernestl avatar Jun 03 '24 09:06 ernestl