cloud-init icon indicating copy to clipboard operation
cloud-init copied to clipboard

WIP: Fall back to cached local ds if no valid ds found

Open PengpengSun opened this issue 1 year ago • 1 comments

Proposed Commit Message

Fall back to cached local ds if no valid ds found

Rebooting an instance which has finished VMware guest
customization with DataSourceVMware will load
DataSourceNone due to metadata is NOT available.

This is mostly a re-post of PR#229, few differences are:
1. Let ds decide if fallback is allowed, not always fall back
   to previous cached LOCAL ds.
2. No comparing instance-id of cached ds with previous instance-id
   due to I think they are always identical.

Fixes GH-3402 (GitHub Issue number. Remove line if irrelevant)
LP: #1835205 (Launchpad bug number. Remove line if irrelevant)

Additional Context

Fixes #3402

Test Steps

Checklist

Merge type

  • [x] Squash merge using "Proposed Commit Message"
  • [ ] Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

PengpengSun avatar Mar 04 '24 08:03 PengpengSun

When this happens, does ds-identify still correctly identify the platform?

Not sure if I get your question correctly, with my understanding, ds-identify identifies the platform before init --local, so this shall not have impact on ds identify process. The purpose of this change is to add an opportunity for the cached ds to be restored after no data can be gotten from ds in the ds list.

PengpengSun avatar Mar 08 '24 06:03 PengpengSun

Hi @holmanb , I'm removing WIP from title, please kindly review this again and let me know if any updates needed. Thanks!

PengpengSun avatar Mar 19 '24 02:03 PengpengSun

@holmanb is it possible to backport this patch to 24.1 train maybe in 24.1.5?

ani-sinha avatar Apr 12 '24 06:04 ani-sinha