-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[Consul Enterprise] ACL replication fails when non-default namespace exists and default namespace has policy default #9271
Comments
There is a conflict between the namespace and acl policy replicators that can cause both to stall indefinitely. The namespace replicator will fail to replicate a namespace if any namespace in the batch of updates fails validation. The policy replicator will fail to replicate a policy if any policy in the batch of updates fails validation. There are several ways to make modifications in the primary DC such that there will be conflicts between the replicators. In the example above the policy replicator is failing to upsert the namespaces The only mitigation in the example above would be to roll back the default ns changes to add the cross-ns-policy, let replication catch up and then reapply those changes. The actual code fix would be to relax the validations performed when a secondary dc is inserting a namespace due to replication. We should not validate that the policies/roles already exist. That will allow the ns to get inserted which in turn will allow the policy replications to finish. Longer term it would be nice to move all replication over to a single ordered event stream so that we have some guarantee about seeing these updates in the order they were performed in the primary thus eliminating any possible validation issues. |
This will be fixed in 1.9.1, 1.8.8 and 1.7.11 |
Overview of the Issue
ACL replication fails when non-default namespace exists and default namespace has policy default.
Reproduction Steps
Agent config for
dc1
:Agent config for dc2
Create data dirs
Start agent 1
Create policies and tokens
Start agent 2
See logs in dc2 forever looping:
That policy ID is the default policy for the
default
namespace.Consul Versions
Permutations
Bug does not occur if a) there is no
test-ns
or b) there is no policy default fordefault
ns or c)test-ns
is created after the initial federation is complete.The text was updated successfully, but these errors were encountered: