On Jul 14, 2017, at 2:34 PM, James Phillips <
ja...@hashicorp.com> wrote:
>
> Hi Brian,
>
>> When I see this error, the ACL token written into Consul’s config file is valid (I can retrieve the rules applied to it), and the age of the consul process indicates that it was restarted after the config file was regenerated.
>
> The ACL token isn't currently in the reloadable configuration, so I
> can see that a reload won't pick it up (or a SIGHUP), but it doesn't
> make sense that an agent restart would not see it. Can you clarify if
> you are completely restarting the agent process, or if you are just
> reloading?
>
> I think we can pretty easily make the ACL token get picked up with a
> reload with a small code change; that would support rotation.
That would be a nice change. I do have “systemctl restart consul” in the consul-template config that manages the credential file. (That’s not quite as scary as it sounds; I have two c-t instances, one i call “vault-template” that doesn’t talk to Consul and is thus suitable for retrieving the token for the Consul agents).
When I said “the age of the consul process” I was referring to the etime field in ps, so it was definitely restarted.
I’m upgrading consul-template to 0.19.0 to take advantage of the Vault grace period option that was added. I’m hoping that will head off the possible race condition with the token getting revoked. I’ll keep an eye out for the behavior of the agent not honoring the new token. It doesn’t make any sense to me, either, but I was wondering if perhaps it was stored in the same way the gossip encryption key is.