-
Notifications
You must be signed in to change notification settings - Fork 48
Flush mine during upgrade #4934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development/133.0
Are you sure you want to change the base?
Changes from all commits
bf3f7e1
b809723
4112ab5
2c8d871
e70fc16
dc852db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -92,6 +92,20 @@ upgrade_bootstrap () { | |
| metalk8s.salt.master.installed saltenv="$SALTENV" | ||
| } | ||
|
|
||
| flush_and_refresh_mine() { | ||
| # After upgrading salt-master, the mine cache files on the master may have | ||
| # been corrupted by a non-atomic write interrupted mid-SIGTERM (kubelet | ||
| # kills the container when the manifest changes). mine.update alone cannot | ||
| # fix this: it reads the corrupt file first, fails, and silently discards | ||
| # the new data. mine.flush deletes the file (no read needed), after which | ||
| # mine.update writes a clean cache from scratch. | ||
| # Run on all minions so the master has a clean, up-to-date mine cache for | ||
| # the entire cluster before any upgrade state queries it. | ||
| SALT_MASTER_CALL=("${EXEC_CONTAINER_COMMAND[@]}" "$(get_salt_container)") | ||
| "${SALT_MASTER_CALL[@]}" salt '*' mine.flush | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| "${SALT_MASTER_CALL[@]}" salt '*' mine.update | ||
| } | ||
|
|
||
| launch_pre_upgrade () { | ||
| SALT_MASTER_CALL=("${EXEC_CONTAINER_COMMAND[@]}" "$(get_salt_container)") | ||
| "${SALT_MASTER_CALL[@]}" salt-run saltutil.sync_all \ | ||
|
|
@@ -209,6 +223,7 @@ run "Performing Pre-Upgrade checks" precheck_upgrade | |
| "$BASE_DIR"/backup.sh --no-replication | ||
|
|
||
| run "Upgrading bootstrap" upgrade_bootstrap | ||
| run "Refreshing Salt mine on nodes" flush_and_refresh_mine | ||
| run "Setting cluster version to $DESTINATION_VERSION" patch_kubesystem_namespace | ||
| run "Launching the pre-upgrade" launch_pre_upgrade | ||
| run "Upgrading etcd cluster" upgrade_etcd | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.