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

Make framework.WALPrefix a local path #164

Merged
merged 4 commits into from
Oct 16, 2023

Conversation

Zlaticanin
Copy link
Contributor

@Zlaticanin Zlaticanin commented Oct 13, 2023

The WAL rollback process for plugins is a way to have plugins cleanup external state from any failed requests. The intention is that, whenever a request comes in, the plugin is responsible for writing to framework.PutWAL() with some data, and then end a request by calling framework.DeleteWAL() to delete the data. If the request fails partway through, then DeleteWAL never gets called.
This PR makes framework.WALPrefix to be a local path so that performance secondaries wouldn't end up with the WAL data getting replicated.

WAL logs before the change:

2023-10-13T11:20:30.150-0700 [DEBUG] perf-pri.core0.secrets.local-azure.local-azure_ebf06d55.local-azure.vault-plugin-secrets-azure: rolling back SP: appID=b345ef81-8a2XXXXXX-82458841eb appObjID=19XX4866-XXX-4a6e-85dd-32ec2cXX480 timestamp=2023-10-13T11:20:30.150-0700
2023-10-13T11:20:31.376-0700 [DEBUG] perf-sec.core0.secrets.local-azure.local-azure_ebf06d55.local-azure.vault-plugin-secrets-azure: rolling back SP: appID=b345ef81-XXXX-ac82458841eb appObjID=19d64866-XXXX-85dd-32ec2c175480 timestamp=2023-10-13T11:20:31.376-0700

After the change:

2023-10-13T11:38:51.541-0700 [DEBUG] perf-pri.core0.secrets.local-azure.local-azure_0ec36706.local-azure.vault-plugin-secrets-azure: rolling back SP: appID=29eXXXX4f7-6ae3bXX39b appObjID=a93391d2XXXX31bcf29XXb9 timestamp=2023-10-13T11:38:51.540-0700

Azure Auth PR: hashicorp/vault-plugin-auth-azure#137

@Zlaticanin
Copy link
Contributor Author

Thank you @fairclothjm! 🙏

@Zlaticanin Zlaticanin closed this Oct 16, 2023
@Zlaticanin Zlaticanin reopened this Oct 16, 2023
@Zlaticanin Zlaticanin merged commit a5ca9e8 into main Oct 16, 2023
5 checks passed
@Zlaticanin Zlaticanin deleted the VAULT-19950/fix-walprefix-path branch October 16, 2023 17:21
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.

2 participants