Skip to content
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

set DisableNonReplicatableQueries before sandboxing subcluster during online upgrade #853

Merged
merged 19 commits into from
Aug 8, 2024

Conversation

fenic-fawkes
Copy link
Collaborator

mostly based on the work in #831 plus fixing merge conflicts, etc

pkg/controllers/vdb/onlineupgrade_reconciler.go Outdated Show resolved Hide resolved
pkg/controllers/vdb/onlineupgrade_reconciler.go Outdated Show resolved Hide resolved
pkg/controllers/vdb/getconfigparameter_reconciler.go Outdated Show resolved Hide resolved
scripts/guess-server-upgrade-base-image.sh Outdated Show resolved Hide resolved
@CLAassistant
Copy link

CLAassistant commented Jul 25, 2024

CLA assistant check
All committers have signed the CLA.

Base automatically changed from vnext to main July 26, 2024 18:57
@fenic-fawkes fenic-fawkes force-pushed the fenic/VER-92800-set-DisableNonReplicatableQueries branch 2 times, most recently from 3a0d601 to c89ff2e Compare July 29, 2024 15:53
Copy link
Collaborator

@cchen-vertica cchen-vertica left a comment

Choose a reason for hiding this comment

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

Looks good. For testing your code, you could add step 36 in
e2e-leg-9/new-online-upgrade-sanity to verify non-replicable queries cannot be made in old main cluster, and add step 47 to verify we can make non-replicable queries in new main cluster.

@cchen-vertica
Copy link
Collaborator

You don't need to modify the added test step(36). It looks good.

Once you fixed the conflicts and passed the test, I will approve it.

@fenic-fawkes fenic-fawkes force-pushed the fenic/VER-92800-set-DisableNonReplicatableQueries branch from 544e1b8 to 7411a28 Compare August 1, 2024 15:39
return ctrl.Result{Requeue: true}, nil
}

cmd := []string{"-tAc", "SELECT count(*) FROM node_subscriptions WHERE subscription_state not in ('ACTIVE', 'INACTIVE');"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can the subscriptions be "INACTIVE"? Why not using "subscription_state != 'ACTIVE'"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

running a test, yes. subscriptions can be inactive and stay that way. for our use case we don't really care, this check is enough to make sure that sandbox can be run successfully

Copy link
Collaborator

Choose a reason for hiding this comment

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

My understanding is: if subscriptions on the nodes of a subcluster are inactive, the subcluster doesn't have coverage to do the sandbox. What do I miss?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i'm not sure. all i know is that running rebalance_shards didn't change the subscription_state and sandboxing went fine

Copy link
Collaborator

@cchen-vertica cchen-vertica Aug 5, 2024

Choose a reason for hiding this comment

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

subscription_state probably is "PENDING" after add_node(before rebalance_shards) so this check fixed the issue. But the safer way is to verify all subscriptions are "ACTIVE".

Copy link
Collaborator

@roypaulin roypaulin left a comment

Choose a reason for hiding this comment

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

Merge the main into your branch to get the latest changes.

pkg/controllers/vdb/onlineupgrade_reconciler.go Outdated Show resolved Hide resolved
Manager UpgradeManager
Dispatcher vadmin.Dispatcher
sandboxName string // name of the sandbox created for replica group B
originalConfigParamDisableNonReplicatableQueriesValue string
Copy link
Collaborator

Choose a reason for hiding this comment

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

Aren't we going to set back the original value when upgrade is done?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

why? this is an undocumented parameter that, eg, prevents reip for now and is purely needed for upgrade. once we've addressed the issues on the server side i'd be open to setting it, especially if we document it, but for now i think we should leave it cleared in the new cluster

@fenic-fawkes fenic-fawkes force-pushed the fenic/VER-92800-set-DisableNonReplicatableQueries branch from cef7c7a to 05ef7fd Compare August 5, 2024 13:13
@fenic-fawkes fenic-fawkes force-pushed the fenic/VER-92800-set-DisableNonReplicatableQueries branch from 05ef7fd to ef15842 Compare August 5, 2024 13:36
@fenic-fawkes fenic-fawkes force-pushed the fenic/VER-92800-set-DisableNonReplicatableQueries branch from 288b664 to dba7c3f Compare August 5, 2024 17:23
pkg/events/event.go Outdated Show resolved Hide resolved
pkg/controllers/vdb/onlineupgrade_reconciler.go Outdated Show resolved Hide resolved
pkg/controllers/vdb/onlineupgrade_reconciler.go Outdated Show resolved Hide resolved
pkg/controllers/vdb/onlineupgrade_reconciler.go Outdated Show resolved Hide resolved
pkg/controllers/vdb/onlineupgrade_reconciler.go Outdated Show resolved Hide resolved
@fenic-fawkes fenic-fawkes force-pushed the fenic/VER-92800-set-DisableNonReplicatableQueries branch from ef5a218 to 2f15656 Compare August 5, 2024 21:05
@fenic-fawkes fenic-fawkes merged commit 94916d7 into main Aug 8, 2024
31 checks passed
@fenic-fawkes fenic-fawkes deleted the fenic/VER-92800-set-DisableNonReplicatableQueries branch August 8, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants