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

fix: only run periodic func on active instance in primary cluster or local mount #150

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

austingebauer
Copy link
Contributor

Overview

This PR adds a condition to the periodic func that ensures it only runs on the active instance in a primary cluster or on local mounts. This fixes an issue where root credential rotation was taking place on the active/secondary and active/primary. This caused intermittent 401s due to the rotations racing and invalidating the credentials of each other's cached clients.

Testing

I was able to reproduce this by getting the timing right on the active/secondary's periodicFunc such that it would perform the rotation. This also resulted in a "cannot write to readonly storage" error within the periodic func (see image below).

Screenshot 2023-07-03 at 5 36 12 PM

@austingebauer austingebauer requested review from elliesterner and a team July 4, 2023 01:20
Copy link
Contributor

@fairclothjm fairclothjm left a comment

Choose a reason for hiding this comment

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

LGTM!

@austingebauer austingebauer merged commit 9af529e into main Jul 5, 2023
@austingebauer austingebauer deleted the prevent-rotate-root-active-secondary branch July 5, 2023 21:30
austingebauer added a commit that referenced this pull request Jul 6, 2023
austingebauer added a commit that referenced this pull request Jul 6, 2023
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.

3 participants