osm icon indicating copy to clipboard operation
osm copied to clipboard

"osm metrics enable/disable" are effectively no-ops without args

Open johnsonshi opened this issue 3 years ago • 3 comments
trafficstars

Bug description:

If both metrics commands are run without any other options, then both commands do not do ANYTHING, are effectively no-ops and just return without doing anything. Both commands require the --namespace flag to be required - use something like cobra.MarkFlagsRequired to require this flag.

Also the flag should be more appropriately named “--namespaces” to emphasize that multiple namespaces can have metrics enabled or disabled.

Affected area (please mark with X where applicable):

  • Install [ ]
  • SMI Traffic Access Policy [ ]
  • SMI Traffic Specs Policy [ ]
  • SMI Traffic Split Policy [ ]
  • Permissive Traffic Policy [ ]
  • Ingress [ ]
  • Egress [ ]
  • Envoy Control Plane [ ]
  • CLI Tool [X]
  • Metrics [ ]
  • Certificate Management [ ]
  • Sidecar Injection [ ]
  • Logging [ ]
  • Debugging [ ]
  • Tests [ ]
  • Demo [ ]
  • CI System [ ]

Expected behavior:

Steps to reproduce the bug (as precisely as possible):

bin/osm metrics enable # without any other options bin/osm metrics disable # without any other options

image

How was OSM installed?:

Anything else we need to know?:

Bug report archive:

Environment:

  • OSM version (use osm version):
  • Kubernetes version (use kubectl version):
  • Size of cluster (number of worker nodes in the cluster):
  • Others:

johnsonshi avatar Jan 13 '22 18:01 johnsonshi

Hi @johnsonshi now osm namespace remove will remove the metrics annotation https://github.com/openservicemesh/osm/pull/4539

also, the command osm metrics enable helps mention that multiple namespaces can have metrics enabled or disabled.
image

mudit-01 avatar Mar 07 '22 10:03 mudit-01

Hi @johnsonshi I can work on this, which task should I start with first?

mudit-01 avatar May 05 '22 10:05 mudit-01

Added default label size/needed. Please consider re-labeling this issue appropriately.

github-actions[bot] avatar Jul 13 '22 00:07 github-actions[bot]