Open webdog opened 2 years ago
The CLI's consul intention list output doesn't provide a value for ID (Note: These Service Intentions were created by Kubernetes planfiles with the service intentions CRD, I'm not sure if this would prevent creation of a UUID)
This is expected behavior. The Intention.ID
field was deprecated with the introduction to service intentions. Once an intention is migrated from a legacy intention to service intention, the ID field is cleared.
Intention.ID
after migration is stored in the LegacyID field. After transitioning this field is cleared.
The Kubernetes CRD creates service intentions, not legacy intentions, so it is correct that the ID field is empty.
@blake Appreciate you following up. The point remains that this is still poor UX for the Consul practitioner. Whether or not behavior is intended or correct by some measure is not relevant to the user that is attempting to get information from consul, but can't because of some limitation that they may or may not be aware of. The next steps are clear in that this could be an opportunity for improving the UX. Limitations of Consul schema/attrs don't have to limit the experience a user has with the Consul CLI.
As a heads-up, I left HashiCorp awhile back, so I don't have any ownership of this issue anymore, so feel free to manage it as you will. Thanks! 😃
Overview of the Issue
I have a service intention, and want to retrieve configuration data from the CLI, to troubleshoot. The practitioner's process of retrieving an intention's configuration isn't clear and provides insufficient information/breadcrumbs.
Starting off, I use
consul intention
to understand this CLI subcommand:The docs returned from
consul intention
do not contain an example forconsul intention get
, and advise the following:A practitioner will assume this could mean
consul intention get help
, a reasonable assumption as other CLIs (aws
as an example) provide the stringhelp
as a reserved keyword to generate the help docs for a given subcommand. We do not do this, and assume this string is the name of a service.There's no breadcrumb for the practitioner to understand what they are doing incorrectly here. Using a guess, we can ascertain that
-h
is the correct usage:consul intention list
output doesn't provide a value for ID (Note: These Service Intentions were created by Kubernetes planfiles with the service intentions CRD, I'm not sure if this would prevent creation of a UUID). So the second usage example is not usable.List intentions, no ID/UUID is displayed:
Get an intention, returning an error, because I didn't provide the destination. The error is confusing to the practitioner as it remarks that I am missing the UUID. But the previous returned data from
consul intention list
shows that the UUID column is empty. How would I pass a UUID if I can't lookup a UUID? The issue in reality is that I didn't pass the destination, but this could be easily overlooked if the help docs aren't easily accessible.Operating system and Environment details
Consul v1.12.2 Revision 19041f20 Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
Consul installation deployed to Kubernetes with consul-k8s, using latest chart, version 1.12.2, with an upstream HCP Consul Server cluster.
Next steps:
consul intention get -h
Thank you! 😺