Bug 1741049

Summary: VLAN interface should be activated after base interface
Product: Red Hat Enterprise Linux 8 Reporter: Gris Ge <fge>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED ERRATA QA Contact: Mingyu Shi <mshi>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.1CC: jiji, jishi, network-qe
Target Milestone: rc   
Target Release: 8.1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: nmstate-0.0.8-9.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 20:52:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gris Ge 2019-08-14 07:21:43 UTC
Description of problem:

When creating both VLAN and its base interface in the same transaction,
the libnmstate might fail error:

2019-08-14 15:09:19,728 root         ERROR    NM main-loop aborted: Connection activation failed on connection_id dummy01.101: error=nm-manager-error-quark: dummy01.101 failed to create parent: The device 'dummy01' has no connections available for activation. (2)

Version-Release number of selected component (if applicable):

nmstate-0.0.8-3.el8

How reproducible:
rare

Steps to Reproduce:
1. Create vlan_up.yml:

```yml
---
interfaces:
  - name: dummy01.101
    type: vlan
    state: up
    vlan:
      base-iface: dummy01
      id: 101
    ipv6:
      enabled: true
  - name: dummy01
    type: dummy
    state: up
```

2. Create vlan_down.yml

```yml
---
interfaces:
  - name: dummy01
    state: absent
  - name: dummy01.101
    type: vlan
    state: absent
```

3. sudo nmstatectl set vlan_down.yml && sudo nmstatectl set vlan_up.yml

Actual results:

Fail with error:

Connection activation failed on connection_id dummy01.101: error=nm-manager-error-quark: dummy01.101 failed to create parent: The device 'dummy01' has no connections available for activation.

Expected results:
No failure.

Additional info:

Please use rpm with bug #1740584 fixed to reproduce. Even through it still hard
to reproduce.

Comment 5 errata-xmlrpc 2019-11-05 20:52:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:3347