hashicorp / hashicorp/consul

Endless cache update event correlation_id=leaf

Open
#9,264 0 comments 0 reactions 0 assignees View on GitHub
theme/agent-cache theme/certificates theme/consul-vault
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

#### Overview of the Issue

My client agent is endlessly being triggered for a cache update of the leaf certificate. This happens about every 1-3 seconds. I thought leaf certificates were good for 72 hours.

What triggers a cache update of the leaf cert? This does not seem expected.

#### Reproduction Steps

1. Create a cluster with 1 client node and 3 server nodes.
2. Enable auto_encrypt with vault as the provider
3. Join client node and monitor debug log. Example logs showns below.

### Consul info for both Client and Server

Client info

```
agent:
check_monitors = 0
check_ttls = 0
checks = 0
services = 0
build:
prerelease =
revision = 2fa535b5
version = 1.8.6
consul:
acl = disabled
known_servers = 3
server = false
runtime:
arch = amd64
cpu_count = 1
goroutines = 57
max_procs = 1
os = linux
version = go1.14.12
serf_lan:
coordinate_resets = 0
encrypted = true
event_queue = 0
event_time = 2
failed = 0
health_score = 0
intent_queue = 0
left = 0
member_time = 9
members = 4
query_queue = 0
query_time = 1
```

Server info

```
agent:
check_monitors = 0
check_ttls = 0
checks = 0
services = 0
build:
prerelease =
revision = 2fa535b5
version = 1.8.6
consul:
acl = disabled
bootstrap = false
known_datacenters = 1
leader = true
leader_addr = 10.0.1.208:8300
server = true
raft:
applied_index = 208
commit_index = 208
fsm_pending = 0
last_contact = 0
last_log_index = 208
last_log_term = 2
last_snapshot_index = 0
last_snapshot_term = 0
latest_configuration = [{Suffrage:Voter ID:ba3531ce-0aa8-001e-dbf1-e88b6672a15d Address:10.0.1.208:8300} {Suffrage:Voter ID:cb135899-c63c-2f45-50e9-048fce83d00d Address:10.0.1.68:8300} {Suffrage:Voter ID:3d55a009-cce3-e0a2-5e92-d4d94c20ef44 Address:10.0.1.217:8300}]
latest_configuration_index = 0
num_peers = 2
protocol_version = 3
protocol_version_max = 3
protocol_version_min = 0
snapshot_version_max = 1
snapshot_version_min = 0
state = Leader
term = 2
runtime:
arch = amd64
cpu_count = 1
goroutines = 123
max_procs = 1
os = linux
version = go1.14.12
serf_lan:
coordinate_resets = 0
encrypted = true
event_queue = 0
event_time = 2
failed = 0
health_score = 0
intent_queue = 0
left = 0
member_time = 9
members = 4
query_queue = 0
query_time = 1
serf_wan:
coordinate_resets = 0
encrypted = true
event_queue = 0
event_time = 1
failed = 0
health_score = 0
intent_queue = 0
left = 0
member_time = 4
members = 3
query_queue = 0
query_time = 1
```

### Operating system and Environment details

Running on EC2 Amazon Linux 2. All nodes in the same subnet with open security groups.

### Log Fragments
```
[DEBUG] agent.auto_config: handling a cache update event: correlation_id=leaf
[DEBUG] agent.auto_config: leaf certificate watch fired - updating TLS certificate
[TRACE] agent.tlsutil: UpdateAutoEncryptCert: version=54
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.