Open thomaslepoix opened 10 months ago
Should be fixed by https://github.com/hashicorp/consul/issues/19572
FYI @thomaslepoix @huikang
I tried your patch and can confirm it solves it in my use case. Thank you !
I'll let the merge of the PR close this issue.
Thank you! @thomaslepoix for confirming.
Overview of the Issue
Declaring a service metadata field through a service file (HCL or JSON) works fine, but I didn't manage to declare the same metadata field through the
-meta
CLI flag.Reproduction Steps
vs.
Consul info for both Client and Server
Client info
``` Output from client 'consul info' command here agent: check_monitors = 0 check_ttls = 0 checks = 5 services = 5 build: prerelease = revision = version = 1.16.1 version_metadata = consul: acl = enabled known_servers = 1 server = false runtime: arch = amd64 cpu_count = 3 goroutines = 130 max_procs = 3 os = linux version = go1.20.7 serf_lan: coordinate_resets = 0 encrypted = true event_queue = 0 event_time = 3 failed = 0 health_score = 0 intent_queue = 0 left = 0 member_time = 4 members = 2 query_queue = 0 query_time = 1 ``` ```json Client agent JSON config { "acl": { "default_policy": "allow", "enable_token_persistence": true, "enabled": true }, "advertise_addr": "192.168.240.12", "auto_encrypt": { "tls": true }, "bind_addr": "192.168.240.12", "client_addr": "0.0.0.0", "data_dir": "/var/lib/consul", "datacenter": "dc1", "ports": { "grpc": 8502, "grpc_tls": 8503, "https": 8501 }, "retry_join": [ "192.168.240.11" ], "tls": { "defaults": { "ca_file": "/var/run/secrets/certs/consul-agent-ca.pem", "verify_incoming": true, "verify_outgoing": true }, "grpc": { "verify_incoming": false }, "https": { "verify_incoming": false } }, "ui_config": { "enabled": true }, "encrypt": "#########################" } ```Server info
``` Output from server 'consul info' command here agent: check_monitors = 0 check_ttls = 0 checks = 6 services = 7 build: prerelease = revision = version = 1.16.1 version_metadata = consul: acl = enabled bootstrap = true known_datacenters = 1 leader = true leader_addr = 192.168.240.11:8300 server = true raft: applied_index = 6173 commit_index = 6173 fsm_pending = 0 last_contact = 0 last_log_index = 6173 last_log_term = 3 last_snapshot_index = 0 last_snapshot_term = 0 latest_configuration = [{Suffrage:Voter ID:##################### Address:192.168.240.11:8300}] latest_configuration_index = 0 num_peers = 0 protocol_version = 3 protocol_version_max = 3 protocol_version_min = 0 snapshot_version_max = 1 snapshot_version_min = 0 state = Leader term = 3 runtime: arch = amd64 cpu_count = 3 goroutines = 262 max_procs = 3 os = linux version = go1.20.7 serf_lan: coordinate_resets = 0 encrypted = true event_queue = 0 event_time = 3 failed = 0 health_score = 0 intent_queue = 0 left = 0 member_time = 4 members = 2 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 = 1 members = 1 query_queue = 0 query_time = 1 ``` ```json Server agent JSON config { "acl": { "default_policy": "allow", "enable_token_persistence": true, "enabled": true "tokens": { "initial_management": "#######################" } }, "advertise_addr": "192.168.240.11", "auto_encrypt": { "allow_tls": true }, "bind_addr": "192.168.240.11", "bootstrap_expect": 1, "client_addr": "0.0.0.0", "connect": { "enabled": true }, "data_dir": "/var/lib/consul", "datacenter": "dc1", "domain": "##########", "ports": { "grpc": 8502, "grpc_tls": 8503, "https": 8501 }, "server": true, "tls": { "defaults": { "ca_file": "/run/secrets/certs/consul-agent-ca.pem", "cert_file": "/run/secrets/certs/dc1-server-consul-0.pem", "key_file": "/run/secrets/certs/dc1-server-consul-0-key.pem", "verify_incoming": true, "verify_outgoing": true }, "grpc": { "verify_incoming": false }, "https": { "verify_incoming": false } }, "ui_config": { "enabled": true }, "encrypt": "#########################" } ```Operating system and Environment details
NixOS 23.05, x86_64 Libvirt/KVM virtual machine
Log Fragments