Skip to content

USHIFT-1083 Backup data if system was healthy#1874

Merged
openshift-merge-robot merged 7 commits intoopenshift:mainfrom
pmtk:backup-on-reboot
Jun 5, 2023
Merged

USHIFT-1083 Backup data if system was healthy#1874
openshift-merge-robot merged 7 commits intoopenshift:mainfrom
pmtk:backup-on-reboot

Conversation

@pmtk
Copy link
Member

@pmtk pmtk commented Jun 2, 2023

No description provided.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 2, 2023
@openshift-ci openshift-ci bot requested review from jerpeter1 and pacevedom June 2, 2023 11:36
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 2, 2023
@pmtk pmtk changed the title WIP USHIFT-1083 Backup data if system was healthy USHIFT-1083 Backup data if system was healthy Jun 2, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 2, 2023
Copy link
Contributor

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

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

I have a couple of nits, but those can be addressed in another PR. I'll leave it open to give others on the team a chance to read it but we should be able to approve it Monday.

exit 0
fi

mkdir -p /var/lib/microshift-backups
Copy link
Contributor

Choose a reason for hiding this comment

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

We should make sure to add this directory to the RPM spec.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we should be adding database directories to the RPM spec. They should not be deleted after RPMs are uninstalled.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good point. I'd say we want to keep it. @dhellmann WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

Does listing the directory, without its content, in the spec cause it to be deleted when the RPM is removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

After some quick investigation it looks like uninstall removes files that are specified in %files so I think what we have is okay

return err
}
if !exists {
klog.InfoS("Boot health information is missing - skipping backup")
Copy link
Contributor

Choose a reason for hiding this comment

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

We may end up changing this later when we support storage migration on an RPM-based system. Let's leave this return here for now and think about it when we enable that mode later.

@pmtk
Copy link
Member Author

pmtk commented Jun 5, 2023

/hold

addressing changes in .go

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 5, 2023
@pmtk
Copy link
Member Author

pmtk commented Jun 5, 2023

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 5, 2023
@pmtk
Copy link
Member Author

pmtk commented Jun 5, 2023

/test microshift-e2e

@dhellmann
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 5, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann, pmtk

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

@pmtk
Copy link
Member Author

pmtk commented Jun 5, 2023

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 5, 2023
@pmtk
Copy link
Member Author

pmtk commented Jun 5, 2023

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 5, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 5, 2023

@pmtk: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-openshift-conformance-reduced-arm 5483c25 link false /test e2e-openshift-conformance-reduced-arm
ci/prow/microshift-e2e-arm 5483c25 link false /test microshift-e2e-arm
ci/prow/microshift-e2e 5483c25 link false /test microshift-e2e

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants