Commit Graph

1 Commits

Author SHA1 Message Date
Alex Leong 57d851b434
Report better errors for pods with tap disabled (#5799)
Fixes https://github.com/linkerd/linkerd2/discussions/5777

When a user runs `linkerd viz check --proxy`, it will print a warning if there are any proxies which cannot be tapped.  This is a normal state of affairs after freshly installing the linkerd-viz extensions because any existing pods will need to be restarted before they can be tapped.  The check warning may lead users to falsely believe that something has gone wrong with their installation.

We remove this specific check from `linkerd viz check --proxy`.  To replace it, we improve the error output when attempting to tap a resource which is not tappable.  This gives the user actionable feedback when the tap command fails.

Old:

```console
> linkerd viz tap -n emojivoto deploy/vote-bot
no pods to tap for deployment/vote-bot
```

New:

```console
> linkerd viz tap -n emojivoto deploy/vote-bot
no pods to tap for deployment/vote-bot
1 pods found with tap not enabled:
	* vote-bot-64dd87cb87-7mcv4
restart these pods to enable tap and make them valid tap targets
```

Signed-off-by: Alex Leong <alex@buoyant.io>
2021-02-24 12:32:46 -08:00