Modfying interface with different class is not rejected

Bug #1793592 reported by Senthil Mukundakumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Teresa Ho

Bug Description

 Brief Description
-----------------------

Modifying existing pxeboot platform class to data class is not rejected. This leads to invalid configuration on compute and allows the user to unlock the compute host.

Severity
--------
Major

Steps to Reproduce
--------------------------
1. Initial compute-0 config: Mgmt & Infra tagged on pxeboot network

[wrsroot@controller-0 ~(keystone_admin)]$ system host-if-list 5
+--------------------------------------+----------+----------+----------+------+---------------+---------------+----------------------+---------------------------+-------------------+
| uuid | name | class | type | vlan | ports | uses i/f | used by i/f | attributes | provider networks |
| | | | | id | | | | | |
+--------------------------------------+----------+----------+----------+------+---------------+---------------+----------------------+---------------------------+-------------------+
| 03752e08-d41c-4950-9422-687d9cdbc020 | data0 | data | ethernet | None | [u'ens785f1'] | [] | [] | MTU=1500,accelerated=True | group0-data0 |
| 605cd718-3915-4e09-862e-1f3c5568fb91 | vlan167 | platform | vlan | 167 | [] | [u'pxeboot0'] | [] | MTU=9216 | None |
| e02152c2-752a-48b2-9d53-b91b84f9ac14 | pxeboot0 | platform | ethernet | None | [u'ens785f0'] | [] | [u'vlan167', | MTU=9216 | None |
| | | | | | | | u'mgmt0'] | | |
| | | | | | | | | | |
| f849f250-b0a7-4e7e-a5fd-93409553f62d | mgmt0 | platform | vlan | 166 | [] | [u'pxeboot0'] | [] | MTU=9216 | None |
+--------------------------------------+----------+----------+----------+------+---------------+---------------+----------------------+---------------------------+-------------------+

2. Modify pxeboot platform to data without changing class to None.
[wrsroot@controller-0 ~(keystone_admin)]$ system host-if-modify -n ens785f0 -p group0-data1 -c data compute-0 e02152c2-752a-48b2-9d53-b91b84f9ac14
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| ifname | ens785f0 |
| iftype | ethernet |
| ports | [u'ens785f0'] |
| providernetworks | group0-data1 |
| imac | 3c:fd:fe:ac:61:6c |
| imtu | 9216 |
| ifclass | data |
| networks | pxeboot |
| aemode | None |
| schedpolicy | None |
| txhashpolicy | None |
| uuid | e02152c2-752a-48b2-9d53-b91b84f9ac14 |
| ihost_uuid | 273879c8-255e-4ac8-bbc8-33285cd24ed0 |
| vlan_id | None |
| uses | [] |
| used_by | [u'vlan167', u'mgmt0'] |
| created_at | 2018-09-19T23:21:51.770225+00:00 |
| updated_at | 2018-09-20T16:53:10.733203+00:00 |
| sriov_numvfs | 0 |
| ipv4_mode | disabled |
| ipv6_mode | disabled |
| accelerated | [True] |
+------------------+--------------------------------------+

3. Infra and mgmt tagged on data after modification.
[wrsroot@controller-0 ~(keystone_admin)]$ system host-if-list compute-0
+--------------------------------------+----------+----------+----------+------+---------------+---------------+--------------------+---------------------------+-------------------+
| uuid | name | class | type | vlan | ports | uses i/f | used by i/f | attributes | provider networks |
| | | | | id | | | | | |
+--------------------------------------+----------+----------+----------+------+---------------+---------------+--------------------+---------------------------+-------------------+
| 03752e08-d41c-4950-9422-687d9cdbc020 | data0 | data | ethernet | None | [u'ens785f1'] | [] | [] | MTU=1500,accelerated=True | group0-data0 |
| 605cd718-3915-4e09-862e-1f3c5568fb91 | vlan167 | platform | vlan | 167 | [] | [u'ens785f0'] | [] | MTU=9216 | None |
| e02152c2-752a-48b2-9d53-b91b84f9ac14 | ens785f0 | data | ethernet | None | [u'ens785f0'] | [] | [u'vlan167', | MTU=9216,accelerated=True | group0-data1 |
| | | | | | | | u'mgmt0'] | | |
| | | | | | | | | | |
| f849f250-b0a7-4e7e-a5fd-93409553f62d | mgmt0 | platform | vlan | 166 | [] | [u'ens785f0'] | [] | MTU=9216 | None |
+--------------------------------------+----------+----------+----------+------+---------------+---------------+--------------------+---------------------------+-------------------+

4. unlocked compute-0 with unsupported configration and it allowed to unlock. Should unlock need to be rejected with invalid config?
[wrsroot@controller-0 ~(keystone_admin)]$ system host-list
+----+--------------+-------------+----------------+-------------+--------------+
| id | hostname | personality | administrative | operational | availability |
+----+--------------+-------------+----------------+-------------+--------------+
| 1 | controller-0 | controller | unlocked | enabled | available |
| 2 | controller-1 | controller | unlocked | enabled | available |
| 3 | storage-0 | storage | unlocked | enabled | available |
| 4 | storage-1 | storage | unlocked | enabled | available |
| 5 | compute-0 | compute | unlocked | disabled | offline |
| 6 | compute-1 | compute | unlocked | enabled | available |
| 7 | compute-2 | compute | unlocked | enabled | available |
| 8 | compute-3 | compute | unlocked | enabled | available |
| 9 | compute-4 | compute | unlocked | enabled | available |
+----+--------------+-------------+----------------+-------------+--------------+

Expected Behavior
------------------ -------

Modying Interface with platform class to data class should be rejected.

Actual Behavior
---------------------
Modification is allowed.

[wrsroot@controller-0 ~(keystone_admin)]$ system host-if-modify -n ens785f0 -p group0-data1 -c data compute-0 e02152c2-752a-48b2-9d53-b91b84f9ac14
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| ifname | ens785f0 |
| iftype | ethernet |
| ports | [u'ens785f0'] |
| providernetworks | group0-data1 |
| imac | 3c:fd:fe:ac:61:6c |
| imtu | 9216 |
| ifclass | data |
| networks | pxeboot |
| aemode | None |
| schedpolicy | None |
| txhashpolicy | None |
| uuid | e02152c2-752a-48b2-9d53-b91b84f9ac14 |
| ihost_uuid | 273879c8-255e-4ac8-bbc8-33285cd24ed0 |
| vlan_id | None |
| uses | [] |
| used_by | [u'vlan167', u'mgmt0'] |
| created_at | 2018-09-19T23:21:51.770225+00:00 |
| updated_at | 2018-09-20T16:53:10.733203+00:00 |
| sriov_numvfs | 0 |
| ipv4_mode | disabled |
| ipv6_mode | disabled |
| accelerated | [True] |
+------------------+--------------------------------------+

Reproducibility
---------------
Reproducible

System Configuration
--------------------
Any

Branch/Pull Time/Commit
-----------------------
StarlingX master as of 2018-09-18_20-18-00

Revision history for this message
Ghada Khalil (gkhalil) wrote :

Targeting stx.2018.10; this issue is related to the Generalized Interface and Network Configuration Feature:
https://storyboard.openstack.org/#!/story/2003087
which was recently submitted

Changed in starlingx:
assignee: nobody → Teresa Ho (teresaho)
importance: Undecided → Medium
status: New → Triaged
tags: added: stx.2018.10 stx.networking
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-config (master)

Fix proposed to branch: master
Review: https://review.openstack.org/604912

Changed in starlingx:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stx-config (master)

Reviewed: https://review.openstack.org/604912
Committed: https://git.openstack.org/cgit/openstack/stx-config/commit/?id=7f504cb25c9254d2e1a733156458a714a6f15b69
Submitter: Zuul
Branch: master

commit 7f504cb25c9254d2e1a733156458a714a6f15b69
Author: Teresa Ho <email address hidden>
Date: Mon Sep 24 17:05:06 2018 -0400

    Prevents data sharing platform interface

    The existing data consolidation rules are continued to be enforced
    when changing interface class between platform and non-platform
    interface.

    Closes-Bug: 1793592

    Change-Id: I8f2a97f7e1f867ff1534ee584e1b1754e8440813
    Signed-off-by: Teresa Ho <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ken Young (kenyis)
tags: added: stx.1.0
removed: stx.2018.10
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.