[NUMA] Successful In-place rebuild with images having different cpu thread policy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Description
===========
Performing rebuild of a vm with a different image passes when the images have different cpu_threads_policy defined in image metadata, when it should fail
Steps to reproduce
==================
1. Create two images, one with hw_cpu_
2. create a flavor with 2 cpus, make sure Compute host has at least 4 physical cpus, and following metadata:
hw:cpu_
3. create a vm with first image
4. Rebuild the vm with the second image. It passes here when it should be failing
Expected result
===============
Rebuild fails with below error:
An instance's NUMA topology cannot be changed as part of a rebuild. The image provided is invalid for this instance. (HTTP 400)
Actual result
=============
(overcloud) [stack@undercloud-0 ~]$ openstack image set --property hw_cpu_
(overcloud) [stack@undercloud-0 ~]$ openstack image set --property hw_cpu_
+------
| ID | Name | Status | Task State | Power State | Networks | Image Name | Image ID | Flavor Name | Flavor ID | Availability Zone | Host | Properties |
+------
| 6d833fa7-
+------
(overcloud) [stack@undercloud-0 ~]$ openstack server rebuild --image rhel8.1 --wait test-19390
Complete
+------
| Field | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | active |
| OS-SRV-
| OS-SRV-
| accessIPv4 | |
| accessIPv6 | |
| addresses | private=
| adminPass | 8bndFiMX5beY |
| config_drive | |
| created | 2020-01-
| description | None |
| flavor | disk='13', ephemeral='0', extra_specs.
| hostId | 466779e6411be23
| host_status | UP |
| id | 6d833fa7-
| image | rhel8.1 (0a514761-
| key_name | mykey |
| locked | False |
| locked_reason | None |
| name | test-19390 |
| progress | 0 |
| project_id | 96a6914ad7264c9
| properties | |
| security_groups | name='default' |
| server_groups | [] |
| status | REBUILD |
| tags | [] |
| trusted_
| updated | 2020-01-
| user_data | None |
| user_id | a73228cfc17c476
| volumes_attached | |
+------
(overcloud) [stack@undercloud-0 ~]$ openstack server list --long
+------
| ID | Name | Status | Task State | Power State | Networks | Image Name | Image ID | Flavor Name | Flavor ID | Availability Zone | Host | Properties |
+------
| 6d833fa7-
+------
Environment
===========
NUMATopologyFilter should be enabled, compute nodes should have NUMA
summary: |
- [NUMA] Successful In-place rebuild of images with different cpu thread - policy + [NUMA] Successful In-place rebuild with images having different cpu + thread policy |
Configuration issue where i had to use hw_cpu_ thread_ policy instead of hw_cpu_ threads_ policy:
Logs confirming expected error while rebuilding: thread_ policy= 'prefer' rhel7.7 thread_ policy= 'isolate' rhel8.0 ------- ------- ------- ------- ----+-- ------- ---+--- -----+- ------- ----+-- ------- ----+-- ------- ------- ------- -+----- ------- +------ ------- ------- ------- ------- ----+-- ------- ----+-- ------- --+---- ------- ------- -+----- ------- ------- -----+- ------- ----+ ------- ------- ------- ------- ----+-- ------- ---+--- -----+- ------- ----+-- ------- ----+-- ------- ------- ------- -+----- ------- +------ ------- ------- ------- ------- ----+-- ------- ----+-- ------- --+---- ------- ------- -+----- ------- ------- -----+- ------- ----+ 8a88-4647- abd8-c8fef6958d b6 | test-12470 | ACTIVE | None | Running | private= 192.168. 100.46 | rhel7.7 | bc5d13ae- 058f-4b06- a362-cf98933f27 4d | | | nova | compute- 0.redhat. local | | ------- ------- ------- ------- ----+-- ------- ---+--- -----+- ------- ----+-- ------- ----+-- ------- ------- ------- -+----- ------- +------ ------- ------- ------- ------- ----+-- ------- ----+-- ------- --+---- ------- ------- -+----- ------- ------- -----+- ------- ----+ b2b7-4d49- a848-2b2d32b671 49)
(overcloud) [stack@undercloud-0 ~]$ openstack image set --property hw_cpu_
(overcloud) [stack@undercloud-0 ~]$ openstack image set --property hw_cpu_
+------
| ID | Name | Status | Task State | Power State | Networks | Image Name | Image ID | Flavor Name | Flavor ID | Availability Zone | Host | Properties |
+------
| dd8545a3-
+------
(overcloud) [stack@undercloud-0 ~]$ openstack server rebuild --image rhel8.0 --wait test-12470
An instance's NUMA topology cannot be changed as part of a rebuild. The image provided is invalid for this instance. (HTTP 400) (Request-ID: req-8db11997-