commit 7973677a3d7d518c31757b36037373d2c4ac769c
Author: Andre Fernando Zanella Kantek <email address hidden>
Date: Thu May 6 07:32:59 2021 -0400
In AIO-SX, interface edit rejected with Host administrative unlocked
It was detected the edit rejection when the user, on an unlocked
host, tries to convert an ethernet non-SRIOV to an SRIOV-PF
interface, with the server responding "Host 'controller-0' is
administrative 'unlocked'".
This is caused because UpdateInterface.handle() executes first the
datanetwork assignment and then modifies the interface. Since the
assignment, on an unlocked host, is only possible for SRIOV
interfaces, the order of execution matters, we need to have the
interface modified and then assigned. The correction consists of
altering the order (first modify then assign) to do the described.
Tests:
To ensure the continuous operation of the other types of conversion
the following combinations were tested (all were done adding the
interface to a network or datanetwork, depending on the class):
Unlocked state:
ethernet/[none,data,pci-pt,platform] to pci-sriov: accepted
modify parameters of a pci-sriov: rejected
conversion to other than pci-sriov: rejected
Locked state:
all conversions (with network/datanetwork assignment) are accepted
Closes-Bug: 1925183
Signed-off-by: Andre Fernando Zanella Kantek <email address hidden>
Change-Id: Ib124bf7222e07966becbb81198f65f5bc55715ce
Reviewed: https:/ /review. opendev. org/c/starlingx /gui/+/ 790043 /opendev. org/starlingx/ gui/commit/ 7973677a3d7d518 c31757b36037373 d2c4ac769c
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 7973677a3d7d518 c31757b36037373 d2c4ac769c
Author: Andre Fernando Zanella Kantek <email address hidden>
Date: Thu May 6 07:32:59 2021 -0400
In AIO-SX, interface edit rejected with Host administrative unlocked
It was detected the edit rejection when the user, on an unlocked
host, tries to convert an ethernet non-SRIOV to an SRIOV-PF
interface, with the server responding "Host 'controller-0' is
administrative 'unlocked'".
This is caused because UpdateInterface .handle( ) executes first the
datanetwork assignment and then modifies the interface. Since the
assignment, on an unlocked host, is only possible for SRIOV
interfaces, the order of execution matters, we need to have the
interface modified and then assigned. The correction consists of
altering the order (first modify then assign) to do the described.
Tests:
To ensure the continuous operation of the other types of conversion
the following combinations were tested (all were done adding the
interface to a network or datanetwork, depending on the class):
Unlocked state: [none,data, pci-pt, platform] to pci-sriov: accepted
ethernet/
modify parameters of a pci-sriov: rejected
conversion to other than pci-sriov: rejected
Locked state:
all conversions (with network/datanetwork assignment) are accepted
Closes-Bug: 1925183
Signed-off-by: Andre Fernando Zanella Kantek <email address hidden> 66becbb81198f65 f5bc55715ce
Change-Id: Ib124bf7222e079