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

storage: require enterprise license for WAL failover #121165

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

jbowens
Copy link
Collaborator

@jbowens jbowens commented Mar 27, 2024

If WAL failover is configured but the user has not provided an enterprise license, WAL failover will refuse to failover and log a warning message every 10 minutes.

Epic: none
Release note: none

If WAL failover is configured but the user has not provided an enterprise
license, WAL failover will refuse to failover and log a warning message every
10 minutes.

Epic: none
Release note: none
@jbowens jbowens requested a review from sumeerbhola March 27, 2024 00:43
@jbowens jbowens requested a review from a team as a code owner March 27, 2024 00:43
Copy link

blathers-crl bot commented Mar 27, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jbowens
Copy link
Collaborator Author

jbowens commented Mar 27, 2024

I'm working on some storage.WALFailover unit tests in the background

Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @jbowens and @sumeerbhola)


pkg/storage/open.go line 417 at r1 (raw file):

				licenseOK := base.CCLDistributionAndEnterpriseEnabled(settings)
				if !licenseOK && cclWALFailoverLogEvery.ShouldLog() {
					log.Warningf(context.Background(), "Ignoring WAL failover configuration because it requires an enterprise license.")

Maybe we should log in the version not ok case too? In case someone doesn't finalize the upgrade accidentally

@sumeerbhola sumeerbhola requested a review from RaduBerinde March 27, 2024 02:34
Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed all commit messages.
Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @RaduBerinde)


pkg/storage/open.go line 417 at r1 (raw file):

Previously, RaduBerinde wrote…

Maybe we should log in the version not ok case too? In case someone doesn't finalize the upgrade accidentally

do users sometimes intentionally go for days without finalizing?

Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @sumeerbhola)


pkg/storage/open.go line 417 at r1 (raw file):

Previously, sumeerbhola wrote…

do users sometimes intentionally go for days without finalizing?

Probably, if it takes a long time to roll over the nodes.. but then they shouldn't be configuring WAL failover. I definitely heard of cases where they stay in that state unintentionally though.

Copy link
Collaborator Author

@jbowens jbowens left a comment

Choose a reason for hiding this comment

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

TFTRs!

Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @RaduBerinde and @sumeerbhola)


pkg/storage/open.go line 417 at r1 (raw file):

Previously, RaduBerinde wrote…

Probably, if it takes a long time to roll over the nodes.. but then they shouldn't be configuring WAL failover. I definitely heard of cases where they stay in that state unintentionally though.

I know of one customer that intends to set the env var fleet-wide, and they won't upgrade all at once. In their case, I think it's expected for WAL failover to be set but the version not yet finalized.

Maybe we should have a more general warning (independent of wal failover) logged at a longer period if the version hasn't been finalized.

@jbowens
Copy link
Collaborator Author

jbowens commented Mar 27, 2024

bors r+

@craig craig bot merged commit 085b9be into cockroachdb:master Mar 27, 2024
21 of 22 checks passed
@jbowens jbowens deleted the failover-ccl branch March 27, 2024 14:06
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.

4 participants