Skip to content

WIP [fcos] pkg/daemon: don't delete a file if its replaced with a dropin#2198

Closed
vrutkovs wants to merge 2 commits intoopenshift:fcosfrom
vrutkovs:4.5-check-dropins-on-stale-removal
Closed

WIP [fcos] pkg/daemon: don't delete a file if its replaced with a dropin#2198
vrutkovs wants to merge 2 commits intoopenshift:fcosfrom
vrutkovs:4.5-check-dropins-on-stale-removal

Conversation

@vrutkovs
Copy link
Copy Markdown
Contributor

@vrutkovs vrutkovs commented Nov 3, 2020

Cherry-pick of #2196 on FCOS

Some systemd service settings may be defined in .Storage.Files and in .Systemd.Units.Dropins. Dropins is preferable, so users may want to migrate to the way.

However if a file representing a dropin was defined in .Storage.Files and converted into .Systemd.Units.Dropin in new version of MC, it would be placed by Ignition's dropin implementation and then garbage-collected by MCD's deleteStaleData.

This change ensures we're checking Systemd.Units.Dropins before attempting to remove this file. This is crucial for OKD 4.5 -> 4.6 upgrades - kubelet MCO config was defined as a file in 4.5 and converted into a dropin in 4.6

Vadim Rutkovsky added 2 commits November 3, 2020 18:57
Some systemd service settings may be defined in .Storage.Files and in .Systemd.Units.Dropins. Dropins is preferable, so users may want to migrate to the way.

However if a file representing a dropin was defined in .Storage.Files and converted into .Systemd.Units.Dropin in new version of MC, it would be placed by Ignition's dropin implementation and then garbage-collected by MCD's deleteStaleData.

This change ensures we're checking Systemd.Units.Dropins before attempting to remove this file. This is crucial for OKD 4.5 -> 4.6 upgrades - kubelet MCO config was defined as a file in 4.5 and converted into a dropin in 4.6
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 3, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vrutkovs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 3, 2020
@vrutkovs vrutkovs force-pushed the 4.5-check-dropins-on-stale-removal branch from 76dcfdc to 59ac825 Compare November 3, 2020 19:05
@vrutkovs
Copy link
Copy Markdown
Contributor Author

vrutkovs commented Nov 6, 2020

not necessary, a fix needs to go in MCO 4.6

@vrutkovs vrutkovs closed this Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants