Open dekimsey opened 3 years ago
This issue(if it is one) can be bypassed by deleting the malformed intention by ID. But getting by name works fine, so I guess it's a bug?
$ consul intention get reporting-service portal-stats-service
Source: reporting-service
Destination: portal-stats-service
Action: allow
ID: adca4769-879b-c047-335f-765a552ecbd4
Created At: Thursday, 03-Dec-20 13:25:08 CST
$ consul intention get adca4769-879b-c047-335f-765a552ecbd4
Source: reporting-service
Destination: portal-stats-service
Action: allow
ID: adca4769-879b-c047-335f-765a552ecbd4
Created At: Thursday, 03-Dec-20 13:25:08 CST
Where as with DELETE:
$ consul intention delete reporting-service portal-stats-service
Error deleting the intention: Unexpected response code: 500 (rpc error making call: Sources[0].LegacyMeta must be omitted)
$ consul intention delete adca4769-879b-c047-335f-765a552ecbd4
Intention deleted.
~I cannot reproduce this bug with Consul v1.9.3, Revision f55da9306
.~ Edit: I noticed that my Intention wasn't a legacy Intention.
Overview of the Issue
I am trying to delete an intention, but I'm receiving an error message a 500 response with the error message,
Sources[0].LegacyMeta must be omitted
.Additionally it seems that if an intention has any metadata assigned, it may not be updated by the UI returning the message,
error="Meta must not be specified, or should be unchanged during an update."
Reproduction Steps
Steps to reproduce this issue, eg:
Unsure, it may be because this intention was defined when the cluster was 1.6.2 or so.
Consul info for both Client and Server
Server info
``` agent: check_monitors = 0 check_ttls = 0 checks = 0 services = 0 build: prerelease = revision = f55da930 version = 1.9.3 consul: acl = enabled bootstrap = false known_datacenters = 3 leader = true leader_addr = 10.70.253.191:8300 server = true raft: applied_index = 115592433 commit_index = 115592433 fsm_pending = 0 last_contact = 0 last_log_index = 115592433 last_log_term = 12000 last_snapshot_index = 115582181 last_snapshot_term = 12000 latest_configuration = [{Suffrage:Voter ID:ea967cb2-b51d-2f71-0125-46c36f76a31b Address:10.70.253.191:8300} {Suffrage:Voter ID:e506af7d-2919-d83c-610f-18f9e3992bf7 Address:10.70.252.184:8300} {Suffrage:Voter ID:404b58d0-ddfd-9aaf-d082-c0d84676f9 e6 Address:10.70.253.208: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 = 12000 runtime: arch = amd64 cpu_count = 2 goroutines = 1105 max_procs = 2 os = linux version = go1.15.6 serf_lan: coordinate_resets = 0 encrypted = true event_queue = 0 event_time = 2151 failed = 0 health_score = 0 intent_queue = 0 left = 2 member_time = 29313 members = 146 query_queue = 0 query_time = 4 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 = 6205 members = 9 query_queue = 0 query_time = 1 ```Operating system and Environment details
CentOS 7 x86_64
Log Fragments
Intention information: