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 OpenFGA cluster issues #266

Merged
merged 15 commits into from
Dec 4, 2023
Merged

Fix OpenFGA cluster issues #266

merged 15 commits into from
Dec 4, 2023

Conversation

stgraber
Copy link
Member

@stgraber stgraber commented Dec 4, 2023

This fixes a number of problems with the initial OpenFGA implementation:

  • Race condition where all cluster members attempt to sync all resources, this is very wasteful and the code itself is racy, leading to some write conflicts. This PR restricts the resource sync to the cluster leader.
  • Storage bucket deletion was going through access control twice for some reason
  • Storage volumes are updated to allow for an optional location field
  • Storage buckets are updated to allow for an optional location field

Closes #265

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
@stgraber
Copy link
Member Author

stgraber commented Dec 4, 2023

This turned out a tiny bit harder than first expected as it requires knowing whether we're clustered in a few new places. To do this consistently and easily, I've now moved the clustering state to the shared state struct.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
@tych0 tych0 merged commit b510238 into lxc:main Dec 4, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect handling of cluster-specific resources in OpenFGA
2 participants