Details
-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
Normal
-
sst_system_roles
-
False
-
Description
What were you trying to do that didn't work?
While using the `network_state` variable to configure a vlan on top of the bond the `vlan.flags` is set to `none` .
```bash
$ nmcli connection show bond1.1234 | grep vlan.flags
vlan.flags: 0 (NONE)
```
Compared with the `network.connections` variable which leads to:
```bash
$ nmcli connection show bond1.1234 | grep vlan.flags
vlan.flags: 1 (REORDER_HEADERS)
```
The same result is obtained with the `nmcli` command:
```bash
nmcli connection add type vlan ifname bond1.1234 dev bond1 id 1234 connection.id bond1.1234 ipv4.method disabled ipv6.method disabled`
```
Please provide the package NVR for which bug is seen:
```bash
$ cat /etc/redhat-release
Red Hat Enterprise Linux release 9.3 (Plow)
$ uname -a
Linux localhost.localdomain 5.14.0-362.18.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jan 3 15:54:45 EST 2024 x86_64 x86_64 x86_64 GNU/Linux
$ rpm -qa | grep -E 'nmstate|rhel'
rhel-system-roles-1.22.0-2.el9.noarch
nmstate-2.2.23-1.el9_3.x86_64
nmstate-libs-2.2.23-1.el9_3.x86_64
python3-libnmstate-2.2.23-1.el9_3.x86_64
```
How reproducible:
- Install rhel-system-roles.network
- Run a playbook to configure a vlan with the `network_state` variable
Steps to reproduce:
Example of playbook:
```yaml
—
- name: Configure a bond interface with nmstate
hosts: localhost
gather_facts: false
become: true
vars:
network_state:
interfaces:
- name: bond1
state: up
type: bond
link-aggregation:
mode: active-backup
options:
miimon: 100
port:
- eth1
- name: bond1.1234
type: vlan
state: up
vlan:
base-iface: bond1
id: 1234
roles:
- rhel-system-roles.network
```
Expected results
```bash
$ nmcli connection show bond1.1234 | grep vlan.flags
vlan.flags: 1 (REORDER_HEADERS)
```
Actual results:
```bash
$ nmcli connection show bond1.1234 | grep vlan.flags
vlan.flags: 0 (NONE
```
I suggested the customer to use the `reorder-headers: true` on the playbook.
It seems there's a discrepancy between `network_connections` and `network_state`:
```bash
$ man nm-settings-nmcli | egrep vlan.flags -A11
vlan.flags
Alias: flags
One or more flags which control the behavior and features of the VLAN interface. Flags include NM_VLAN_FLAG_REORDER_HEADERS (0x1) (reordering of output
packet headers), NM_VLAN_FLAG_GVRP (0x2) (use of the GVRP protocol), and NM_VLAN_FLAG_LOOSE_BINDING (0x4) (loose binding of the interface to its master
device's operating state). NM_VLAN_FLAG_MVRP (0x8) (use of the MVRP protocol).
The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS, but it used to be 0. To preserve backward compatibility, the default-value in the
D-Bus API continues to be 0 and a missing property on D-Bus is still considered as 0.
Format: NMVlanFlags (uint32)
```