Able to modify controller-0 interfaces while unlocked

Bug #1855187 reported by David Sullivan on 2019-12-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Medium
Thomas Gao

Bug Description

Brief Description
-----------------
For systems with only one controller, controller host-if-modify commands are accepted even when the host is unlocked.

Severity
--------
Major. Commands issued while the host is unlocked will not be processed until the host is next locked/unlocked.

Steps to Reproduce
------------------
Setup a system with only one controller. Either AIO-SX or stop before installing controller-1.
Unlock that controller.
Attempt to modify a host interface for controller-0

Expected Behavior
------------------
The command should be rejected if the host is unlocked.

Actual Behavior
----------------
The command is accepted.

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

System Configuration
--------------------
AIO-SX or multi node before controller-1 is installed.

Branch/Pull Time/Commit
-----------------------
20191121T023000Z

Last Pass
---------
Unknown

Timestamp/Logs
--------------
N/A

Test Activity
-------------
Developer Testing

Ghada Khalil (gkhalil) wrote :

stx.4.0 / medium priority - missing semantic check / can be avoided by using the proper procedure

tags: added: stx.4.0 stx.config stx.networking
Changed in starlingx:
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → Teresa Ho (teresaho)
Ghada Khalil (gkhalil) on 2020-01-06
Changed in starlingx:
assignee: Teresa Ho (teresaho) → Ghada Khalil (gkhalil)
Ghada Khalil (gkhalil) on 2020-01-15
Changed in starlingx:
assignee: Ghada Khalil (gkhalil) → Thomas Gao (tgao)
Thomas Gao (tgao) wrote :

Hi,

I can't seem to reproduce the bug.

System: AIO-SX (VBox)

[sysadmin@controller-0 ~(keystone_admin)]$ system host-list
+----+--------------+-------------+----------------+-------------+--------------+
| id | hostname | personality | administrative | operational | availability |
+----+--------------+-------------+----------------+-------------+--------------+
| 1 | controller-0 | controller | unlocked | enabled | available |
+----+--------------+-------------+----------------+-------------+--------------+
[sysadmin@controller-0 ~(keystone_admin)]$ system host-if-list controller-0
+--------------------------------------+--------+----------+----------+---------+-------------+----------+-------------+------------+
| uuid | name | class | type | vlan id | ports | uses i/f | used by i/f | attributes |
+--------------------------------------+--------+----------+----------+---------+-------------+----------+-------------+------------+
| 748d6780-940c-4ec1-9355-00837cd0a8a5 | lo | platform | virtual | None | [] | [] | [] | MTU=1500 |
| 852625f5-1be2-4b2b-9a0c-945094d9ebcb | enp0s3 | platform | ethernet | None | [u'enp0s3'] | [] | [] | MTU=1500 |
+--------------------------------------+--------+----------+----------+---------+-------------+----------+-------------+------------+
[sysadmin@controller-0 ~(keystone_admin)]$ system host-if-modify -c data controller-0 852625f5-1be2-4b2b-9a0c-945094d9ebcb
Host must be locked.
[sysadmin@controller-0 ~(keystone_admin)]$ system host-if-modify -n enp0s2 controller-0 852625f5-1be2-4b2b-9a0c-945094d9ebcb
Host must be locked.

Please let me know if I'm missing something.

David Sullivan (dsullivanwr) wrote :

Sorry I though it would be an issue for AIO-SX systems but there's a check for that. It's only an issue on other system types before the second controller is installed.
See: https://opendev.org/starlingx/config/src/branch/master/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/interface.py#L844

My understanding is that function should simply check that the host is locked. There were exceptions in prior builds/releases that are no longer applicable.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers