Add realtime mask as parameter

Update realtime mask to be configurable since the dedicated cpus may not
match the '1-2' mask currently present in test. Also update job
deployment to use '1-2' in devstack environment.

Change-Id: Ia04227209ac45595826ee4715bf1b5052faa9c64
This commit is contained in:
jamepark4 2024-05-28 14:28:59 -04:00
parent b5f4a1792f
commit e8ffa780d8
4 changed files with 12 additions and 2 deletions

View File

@ -28,6 +28,7 @@ function configure {
iniset $TEMPEST_CONFIG whitebox-hardware cpu_topology "$WHITEBOX_CPU_TOPOLOGY"
iniset $TEMPEST_CONFIG whitebox-hardware dedicated_cpus_per_numa "$WHITEBOX_DEDICATED_CPUS_PER_NUMA"
iniset $TEMPEST_CONFIG whitebox-hardware shared_cpus_per_numa "$WHITEBOX_SHARED_CPUS_PER_NUMA"
iniset $TEMPEST_CONFIG whitebox-hardware realtime_mask "$WHITEBOX_REALTIME_MASK"
iniset $TEMPEST_CONFIG whitebox-hardware configured_hugepage_sizes "$WHITEBOX_CONFIGURED_HUGEPAGES"
iniset $TEMPEST_CONFIG compute-feature-enabled virtio_rng "$COMPUTE_FEATURE_VIRTIO_RNG"

View File

@ -12,6 +12,7 @@ WHITEBOX_HUGEPAGE_GUEST_RAM_SIZE=${WHITEBOX_HUGEPAGE_GUEST_RAM_SIZE:-1024}
WHITEBOX_CPU_TOPOLOGY=${WHITEBOX_CPU_TOPOLOGY:-''}
WHITEBOX_DEDICATED_CPUS_PER_NUMA=${WHITEBOX_DEDICATED_CPUS_PER_NUMA:-4}
WHITEBOX_SHARED_CPUS_PER_NUMA=${WHITEBOX_SHARED_CPUS_PER_NUMA:-2}
WHITEBOX_REALTIME_MASK=${WHITEBOX_REALTIME_MASK:-'1-2'}
WHITEBOX_CONFIGURED_HUGEPAGES=${WHITEBOX_CONFIGURED_HUGEPAGES:-'2048,1048576'}
COMPUTE_FEATURE_VIRTIO_RNG=${COMPUTE_FEATURE_VIRTIO_RNG:-'True'}

View File

@ -235,8 +235,12 @@ class CPUPolicyTest(BasePinningTest):
cpu_pinnings_a,
cpu_pinnings_b))
@testtools.skipUnless(CONF.whitebox_hardware.realtime_mask,
'Realtime mask was not provided.')
def test_realtime_cpu(self):
realtime_mask = '1-2'
realtime_mask = CONF.whitebox_hardware.realtime_mask
realtime_set = hardware.parse_cpu_spec(realtime_mask)
vcpu_count = len(realtime_set) + 1
specs = self.dedicated_cpu_policy.copy()
specs.update({
@ -244,7 +248,7 @@ class CPUPolicyTest(BasePinningTest):
'hw:cpu_realtime_mask': realtime_mask,
})
flavor = self.create_flavor(vcpus=3, extra_specs=specs)
flavor = self.create_flavor(vcpus=vcpu_count, extra_specs=specs)
server = self.create_test_server(
flavor=flavor['id'], wait_until='ACTIVE')

View File

@ -243,6 +243,10 @@ hardware_opts = [
'shared_cpus_per_numa',
default=0,
help='Number of pCPUs allocated for cpu_shared_set per NUMA'),
cfg.StrOpt(
'realtime_mask',
default=None,
help='CPU mask used when configuring hw:cpu_realtime_mask'),
cfg.StrOpt(
'sriov_physnet',
default=None,