Skip to content

Conversation

@runcom
Copy link
Member

@runcom runcom commented May 6, 2020

Restarted from #1203 and that's why we have the dropins rename as well (which is something we should do anyway as we ship those).

Backup and restore (when needed) units and dropins

Also, we need #1716

Signed-off-by: Antonio Murdaca [email protected]

@runcom runcom requested a review from yuqi-zhang May 6, 2020 09:02
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels May 6, 2020
@openshift-ci-robot
Copy link
Contributor

@runcom: This pull request references Bugzilla bug 1764116, which is invalid:

  • expected the bug to be open, but it isn't
  • expected the bug to be in one of the following states: NEW, ASSIGNED, ON_DEV, POST, POST, but it is CLOSED (DUPLICATE) instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

Bug 1764116: pkg/daemon: rollback dropins and units

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@runcom runcom changed the title Bug 1764116: pkg/daemon: rollback dropins and units Bug 1764001: pkg/daemon: rollback dropins and units May 6, 2020
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels May 6, 2020
@openshift-ci-robot
Copy link
Contributor

@runcom: This pull request references Bugzilla bug 1764001, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1764001: pkg/daemon: rollback dropins and units

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@runcom
Copy link
Member Author

runcom commented May 6, 2020

cc @yuqi-zhang

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 6, 2020
@openshift-ci-robot
Copy link
Contributor

@runcom: This pull request references Bugzilla bug 1764001, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1764001: pkg/daemon: rollback dropins and units

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@runcom runcom force-pushed the backuprestore-systemd branch 2 times, most recently from 49d9ec8 to 32eaf39 Compare May 6, 2020 09:23
@runcom runcom force-pushed the backuprestore-systemd branch 4 times, most recently from e6c85dc to 7816742 Compare May 6, 2020 10:47
@runcom
Copy link
Member Author

runcom commented May 6, 2020

something funny is happening, dropins files seem like they don't get written when empty - causing the cluster to fail. I'm looking into this.

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 6, 2020
@runcom
Copy link
Member Author

runcom commented May 6, 2020

/skip

@runcom
Copy link
Member Author

runcom commented May 6, 2020

something funny is happening, dropins files seem like they don't get written when empty - causing the cluster to fail. I'm looking into this.

this looks like the case, really funny.

@runcom runcom force-pushed the backuprestore-systemd branch from 03f30e6 to 0f9f0f5 Compare May 6, 2020 14:39
@runcom runcom removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 6, 2020
@runcom
Copy link
Member Author

runcom commented May 6, 2020

Tested the proxy functionality with this (since this is touching that area) and I can enable proxy day2 just fine 👍

Copy link
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an awkward case that arises because we didn't do backups before, so its similar to the files case where we were backing up wrongly.

@runcom runcom force-pushed the backuprestore-systemd branch from 0f9f0f5 to ce70da3 Compare May 21, 2020 08:22
@runcom
Copy link
Member Author

runcom commented May 21, 2020

/skip

@runcom runcom force-pushed the backuprestore-systemd branch from ce70da3 to d2dc8ea Compare May 24, 2020 14:02
runcom added 2 commits May 24, 2020 16:11
This will make sure we don't ship files that are dropins. If we do that
(like we're doing), someone could ship a dropin for the same service/same droping name
and the validation will fail as the "file" is validate first. See https://bugzilla.redhat.com/show_bug.cgi?id=1764001

Signed-off-by: Antonio Murdaca <[email protected]>
Backup and restore (when needed) units and dropins

Signed-off-by: Antonio Murdaca <[email protected]>
@runcom runcom force-pushed the backuprestore-systemd branch from d2dc8ea to a0f0a4a Compare May 24, 2020 14:12
@runcom
Copy link
Member Author

runcom commented May 24, 2020

/refresh

@runcom
Copy link
Member Author

runcom commented May 24, 2020

/retest

2 similar comments
@runcom
Copy link
Member Author

runcom commented May 24, 2020

/retest

@runcom
Copy link
Member Author

runcom commented May 25, 2020

/retest

Copy link
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think we've covered the cases we care about, thanks for fixing it up!

Now one thing to note is that if a systemd unit was overwritten before this patch, we will not restore that file even with this patch in place. This is not a regressive behaviour but is something we can fix if we really wanted to (I don't mind either way). If you are ok with the way it is I can give it the lgtm.

@runcom
Copy link
Member Author

runcom commented May 26, 2020

Now one thing to note is that if a systemd unit was overwritten before this patch, we will not restore that file even with this patch in place. This is not a regressive behaviour but is something we can fix if we really wanted to (I don't mind either way). If you are ok with the way it is I can give it the lgtm.

@yuqi-zhang right, let's follow up on that as it's not a regression unless this patch makes it harder to fix that in a follow up even between releases

for j := range u.Dropins {
path := filepath.Join(pathSystemd, u.Name+".d", u.Dropins[j].Name)
if _, ok := newDropinSet[path]; !ok {
if _, err := os.Stat(noOrigFileStampName(path)); err == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Done more than once. Consider making a function in the future.

@yuqi-zhang
Copy link
Contributor

let's follow up on that as it's not a regression unless this patch makes it harder to fix that in a follow up even between releases

Yes, I think this is fine.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 26, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ashcrow, runcom, yuqi-zhang

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:
  • OWNERS [ashcrow,runcom,yuqi-zhang]

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

@ashcrow
Copy link
Member

ashcrow commented May 26, 2020

/test e2e-gcp-upgrade

@openshift-merge-robot openshift-merge-robot merged commit 4bbc400 into openshift:master May 26, 2020
@openshift-ci-robot
Copy link
Contributor

@runcom: All pull requests linked via external trackers have merged: openshift/machine-config-operator#1715. Bugzilla bug 1764001 has been moved to the MODIFIED state.

Details

In response to this:

Bug 1764001: pkg/daemon: rollback dropins and units

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@runcom runcom deleted the backuprestore-systemd branch May 26, 2020 20:33
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. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants