-
Bug
-
Resolution: Done
-
Normal
-
None
-
rhel-9.6
-
No
-
Low
-
1
-
rhel-net-mgmt
-
ssg_networking
-
None
-
False
-
False
-
-
None
-
NMT SST - Refine next
-
-
None
-
None
-
None
What were you trying to do that didn't work?
Use wrong format in bond port, nmstate provides wrong error position.
What is the impact of this issue to you?
It is misleading for locating the error position.
Please provide the package NVR for which the bug is seen:
nmstate-2.2.38-1.el9.x86_64
How reproducible is this bug?:
100%
Steps to reproduce
cat << EOF > wrong-format.yaml interfaces: - name: bond0 type: bond state: up link-aggregation: mode: 0 port: - name: veth0 - name: veth1 EOF nmstatectl apply wrong-format.yaml
Expected results
(An example)
Invalid format in bond port, should be a string (interface name), not a map
Or refer to:
Similarly, when applying
interfaces: - name: br0 type: linux-bridge state: up bridge: port: - veth1
nmstate prompts:
Provide file is not valid NetworkState or NetworkPolicy: interfaces: invalid type: string "veth1", expected struct LinuxBridgePortConfig at line 2 column 1
Though "line 2 column 1" is incorrect, the other information is clear enough.
Actual results
Provide file is not valid NetworkState or NetworkPolicy: interfaces: invalid type: map, expected a string at line 2 column 1
The position seems relative to `port`, but lack of other info may mislead user to check line 2 column 1 in the YAML file