The openstack network agent CLI does not filter by agent-type in OVN 17.1
Environment
- Red Hat OpenStack Platform 17.1
- OVN Open Virtual Network
Issue
The command
openstack network agent list --agent-type "OVN Controller agent"
doesn't function correctly and return an error
argument --agent-type: invalid choice
Resolution
The issue has been identifed as bug and is tracked in : RHOSSTRAT-337
Here is a workaround
with grep :
openstack network agent list | grep "OVN Controller agent"
examples with with jq:
openstack network agent list --format json | jq '.[] | select(.Agent_Type=="OVN Controller agent")'
or
openstack network agent list -c ID -c Agent_Type -c Host --format json | jq '.[] | select(.Agent_Type=="OVN Controller agent")'
Root Cause
On OSP 17.1 with OVN , the --agent-type option is not correctly implemented
Diagnostic Steps
running the command with the --agent-type option return the usage and error messages
$ openstack network agent list --agent-type "OVN Controller agent"
usage: openstack network agent list [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN] [--quote {all,minimal,none,nonnumeric}] [--noindent] [--max-width <integer>]
[--fit-width] [--print-empty] [--sort-column SORT_COLUMN] [--sort-ascending | --sort-descending] [--agent-type <agent-type>]
[--host <host>] [--network <network> | --router <router>] [--long]
openstack network agent list: error: argument --agent-type: invalid choice: 'OVN Controller agent' (choose from 'bgp', 'dhcp', 'open-vswitch', 'linux-bridge', 'ofa', 'l3', 'loadbalancer', 'metering', 'metadata', 'macvtap', 'nic')
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments