Skip to content

Capture and display repository/gist warnings during cluster restore#423

Merged
jatoben merged 8 commits into
masterfrom
cluster-restore-display-warnings
Aug 9, 2018
Merged

Capture and display repository/gist warnings during cluster restore#423
jatoben merged 8 commits into
masterfrom
cluster-restore-display-warnings

Conversation

@jatoben

@jatoben jatoben commented Aug 7, 2018

Copy link
Copy Markdown
Contributor

The change in #386 allowed a backup to complete if a data consistency issue occured, printing a warning instead of causing a hard failure. Currently, an analogous situation exists for cluster restores; any errors along the way will cause the restore to fail. These may be minor issues that can be addressed with the help of GitHub support, and do not need to block the use of the destination cluster in the meantime.

This PR captures the stderr output of the repository and Gist finalize scripts from the cluster side, displaying them as warnings. Note that this will need a corresponding change on the Enterprise appliance side so that those scripts don't exit non-zero on error to take effect.

@jatoben jatoben requested a review from a team August 7, 2018 23:23

@lildude lildude left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just a little niggle with one of the tests.

Comment thread test/test-ghe-restore.sh Outdated
grep -q "dpages-cluster-restore-finalize OK" "$TRASHDIR/restore-out"

# verify no warnings printed
grep -qv "Warning" "$TRASHDIR/restore-out"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This will always succeed if the restore-out file contains more than just "Warning" lines:

$ cat foo.out
Warning
baaa
$ grep -qv Warning foo.out; echo $?
0
$

You would need to negate a successful find:

$ grep -q Warning foo.out; echo $?
0
$ ! grep -q Warning foo.out; echo $?
1
$ ! grep -q foo foo.out; echo $?
0
$

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah, thanks for that @lildude 🙇 Fix coming up.

@jatoben jatoben requested a review from lildude August 8, 2018 23:45

@lildude lildude left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@jatoben jatoben merged commit 487113e into master Aug 9, 2018
@jatoben jatoben deleted the cluster-restore-display-warnings branch August 9, 2018 14:37
@lildude lildude mentioned this pull request Aug 21, 2018
dooleydevin pushed a commit that referenced this pull request Aug 16, 2023
…rror-msg-for-snapshots

Backport 417 for 3.9: add msg in the logs for skipping snapshots
@dooleydevin dooleydevin mentioned this pull request Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants