Bug 1567958 - removing label from host's network interface removes also network assigned to it
Summary: removing label from host's network interface removes also network assigned to it
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ansible
Version: 4.2.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.2.5
: ---
Assignee: Ondra Machacek
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-16 13:35 UTC by Lucie Leistnerova
Modified: 2018-09-04 14:05 UTC (History)
6 users (show)

Fixed In Version: ansible-2.5.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-04 09:54:08 UTC
oVirt Team: Infra
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ansible ansible pull 38816 0 None None None 2018-04-16 14:30:18 UTC

Description Lucie Leistnerova 2018-04-16 13:35:05 UTC
Description of problem:
When user removes label from host's network interface, also network is removed.

Version-Release number of selected component (if applicable):
ansible-2.5.0-2.fc27.noarch
ovirt-engine-4.2.3-0.1.el7.noarch

How reproducible: always


Steps to Reproduce:
1. create dummy_1 interface on host, create test_network in engine
2. assign network and add label to interface

---
- hosts:
    - engine
  tasks:
    - name: Add VM Networks
      ovirt_host_networks:
        auth: "{{ ansible_auth }}"
        name: "vhost05"
        interface: dummy_1
        networks:
          - name: test_network
        labels:
          - INT
        check: true
        save: true

3. label and network added, see in admin portal hosts detail -> Network interfaces -> Setup Host Networks
4. remove the label

---
- hosts:
    - engine
  tasks:
    - name: Remove label
      ovirt_host_networks:
        auth: "{{ ansible_auth }}"
        name: "vhost05"
        interface: dummy_1
        labels:
          - INT
        check: true
        save: true
        state: absent


Actual results: label and network are removed from the interface


Expected results: only label is removed, network stays assigned to interface dummy_1

Comment 2 Lucie Leistnerova 2018-07-16 15:24:11 UTC
When only label or only network is defined for deletion, only the specified item is really removed. When defined both, both are removed.

verified in ansible-2.6.1-1.el7ae.noarch with ovirt-engine-4.2.5.1-0.1.el7ev.noarch

Comment 3 Marina Kalinin 2018-08-31 20:00:31 UTC
HI Ondra / Lucie,

This bug is on verified and 4.2.5 is out.
Why is this bug still open?
Who can confirm the correct status of it?

Thank you!

Comment 4 Martin Perina 2018-09-04 09:54:08 UTC
(In reply to Marina from comment #3)
> HI Ondra / Lucie,
> 
> This bug is on verified and 4.2.5 is out.
> Why is this bug still open?
> Who can confirm the correct status of it?
> 
> Thank you!

The fix was provided in Ansible Engine 2.5.1 released in errata https://errata.devel.redhat.com/advisory/33631 but we cannot add RHV bugs to Ansible Engine erratas, so such bugs need to be closed manually.

Comment 5 Marina Kalinin 2018-09-04 14:05:15 UTC
https://access.redhat.com/errata/RHBA-2018:1210


Note You need to log in before you can comment on or make changes to this bug.