openvswitch.openvswitch
openvswitch.openvswitch copied to clipboard
Read operation does not return value
trafficstars
SUMMARY
Read operation does not return value
ISSUE TYPE
- Bug Report
COMPONENT NAME
openvswitch_db
ANSIBLE VERSION
ansible [core 2.14.4]
config file = /Users/daniel/code/test/ansible.cfg
configured module search path = ['/Users/daniel/code/test/plugins/modules']
ansible python module location = /Users/daniel/code/test/venv/lib/python3.9/site-packages/ansible
ansible collection location = /Users/daniel/.ansible/collections:/usr/share/ansible/collections
executable location = /Users/daniel/code/test/venv/bin/ansible
python version = 3.9.16 (main, Dec 7 2022, 10:02:13) [Clang 14.0.0 (clang-1400.0.29.202)] (/Users/daniel/code/test/venv/bin/python3.9)
jinja version = 3.1.2
libyaml = True
COLLECTION VERSION
openvswitch.openvswitch 2.1.0
CONFIGURATION
OS / ENVIRONMENT
Target host: Ubuntu 20.04
STEPS TO REPRODUCE
- name: Check if OVN Mac Mapping is defined
openvswitch_db:
state: read
table: open_vswitch
record: .
col: external_ids
key: ovn-chassis-mac-mappings
register: ovn_mac_mapping
- debug:
var: ovn_mac_mapping
EXPECTED RESULTS
Value should be returned because it is defined.
$ ovs-vsctl list open . | grep external_ids
external_ids : {hostname=test-node09, ovn-bridge-mappings="physnet1:br-provider", ovn-chassis-mac-mappings="physnet1:fa:16:3f:93:18:29", ovn-cms-options=enable-chassis-as-gw, ovn-encap-ip="10.0.0.9", ovn-encap-type=geneve, ovn-openflow-probe-interval="60", ovn-remote="ssl:10.0.0.2:6642", ovn-remote-probe-interval="180000", rundir="/var/run/openvswitch", system-id="ae0cb377-2e90-5894-a96f-33bfb5e68901"}
$ /usr/bin/ovs-vsctl -t 5 get open_vswitch . external_ids:ovn-chassis-mac-mappings
"physnet1:fa:16:3f:93:18:29"
ACTUAL RESULTS
"ovn_mac_mapping": {
"changed": true,
"commands": [
"/usr/bin/ovs-vsctl -t 5 get open_vswitch . external_ids:ovn-chassis-mac-mappings"
],
"failed": false,
"failed_when_result": false,
"output": {
"ovn-chassis-mac-mappings": ""
}
}
This has something to do with dashes in the name. When I fetch a key that has no dashes (e.g. hostname), the value is returned in output.