Merge "replace chance with filter scheduler in func tests"

This commit is contained in:
Jenkins
2017-08-21 15:29:19 +00:00
committed by Gerrit Code Review
40 changed files with 34 additions and 50 deletions

View File

@@ -2,7 +2,7 @@
"host": [ "host": [
{ {
"resource": { "resource": {
"cpu": 1, "cpu": 2,
"disk_gb": 1028, "disk_gb": 1028,
"host": "c1a7de0ac9d94e4baceae031d05caae3", "host": "c1a7de0ac9d94e4baceae031d05caae3",
"memory_mb": 8192, "memory_mb": 8192,

View File

@@ -23,7 +23,7 @@
"id": 2, "id": 2,
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
] ]

View File

@@ -22,7 +22,7 @@
"id": 2, "id": 2,
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
} }

View File

@@ -10,7 +10,7 @@
"memory_mb": 8192, "memory_mb": 8192,
"memory_mb_used": 512, "memory_mb_used": 512,
"running_vms": 0, "running_vms": 0,
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
} }

View File

@@ -36,7 +36,7 @@
"id": 2, "id": 2,
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
] ]

View File

@@ -35,7 +35,7 @@
"id": 2, "id": 2,
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
} }

View File

@@ -10,7 +10,7 @@
"memory_mb": 8192, "memory_mb": 8192,
"memory_mb_used": 512, "memory_mb_used": 512,
"running_vms": 0, "running_vms": 0,
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
} }

View File

@@ -36,7 +36,7 @@
"id": 7, "id": 7,
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
], ],

View File

@@ -36,7 +36,7 @@
"id": "62f62f6e-a713-4cbe-87d3-3ecf8a1e0f8d", "id": "62f62f6e-a713-4cbe-87d3-3ecf8a1e0f8d",
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
], ],

View File

@@ -46,7 +46,7 @@
"id": "5d343e1d-938e-4284-b98b-6a2b5406ba76", "id": "5d343e1d-938e-4284-b98b-6a2b5406ba76",
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
] ]

View File

@@ -35,7 +35,7 @@
"id": "5d343e1d-938e-4284-b98b-6a2b5406ba76", "id": "5d343e1d-938e-4284-b98b-6a2b5406ba76",
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
} }

View File

@@ -45,7 +45,7 @@
"id": "5d343e1d-938e-4284-b98b-6a2b5406ba76", "id": "5d343e1d-938e-4284-b98b-6a2b5406ba76",
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
} }

View File

@@ -10,7 +10,7 @@
"memory_mb": 8192, "memory_mb": 8192,
"memory_mb_used": 512, "memory_mb_used": 512,
"running_vms": 0, "running_vms": 0,
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
} }

View File

@@ -2,7 +2,7 @@
"host": [ "host": [
{ {
"resource": { "resource": {
"cpu": 1, "cpu": 2,
"disk_gb": 1028, "disk_gb": 1028,
"host": "%(host_name)s", "host": "%(host_name)s",
"memory_mb": 8192, "memory_mb": 8192,

View File

@@ -23,7 +23,7 @@
"id": "%(int:service_id)s", "id": "%(int:service_id)s",
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
] ]

View File

@@ -22,7 +22,7 @@
"id": "%(int:service_id)s", "id": "%(int:service_id)s",
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
} }

View File

@@ -10,7 +10,7 @@
"memory_mb": 8192, "memory_mb": 8192,
"memory_mb_used": 512, "memory_mb_used": 512,
"running_vms": 0, "running_vms": 0,
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
} }

View File

@@ -36,7 +36,7 @@
"id": "%(int:service_id)s", "id": "%(int:service_id)s",
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
] ]

View File

@@ -35,7 +35,7 @@
"id": "%(int:service_id)s", "id": "%(int:service_id)s",
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
} }

View File

@@ -10,7 +10,7 @@
"memory_mb": 8192, "memory_mb": 8192,
"memory_mb_used": 512, "memory_mb_used": 512,
"running_vms": 0, "running_vms": 0,
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
} }

View File

@@ -36,7 +36,7 @@
"id": 7, "id": 7,
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
], ],

View File

@@ -36,7 +36,7 @@
"id": "%(service_id)s", "id": "%(service_id)s",
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
], ],

View File

@@ -46,7 +46,7 @@
"id": "%(service_id)s", "id": "%(service_id)s",
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
] ]

View File

@@ -35,7 +35,7 @@
"id": "%(service_id)s", "id": "%(service_id)s",
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
} }

View File

@@ -45,7 +45,7 @@
"id": "%(service_id)s", "id": "%(service_id)s",
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
} }

View File

@@ -10,7 +10,7 @@
"memory_mb": 8192, "memory_mb": 8192,
"memory_mb_used": 512, "memory_mb_used": 512,
"running_vms": 0, "running_vms": 0,
"vcpus": 1, "vcpus": 2,
"vcpus_used": 0 "vcpus_used": 0
} }
} }

View File

@@ -77,18 +77,18 @@ class _IntegratedTestBase(test.TestCase):
self.flags(use_neutron=self.USE_NEUTRON) self.flags(use_neutron=self.USE_NEUTRON)
nova.tests.unit.image.fake.stub_out_image_service(self) nova.tests.unit.image.fake.stub_out_image_service(self)
self._setup_services()
self.useFixture(cast_as_call.CastAsCall(self)) self.useFixture(cast_as_call.CastAsCall(self))
self.useFixture(nova_fixtures.PlacementFixture()) self.useFixture(nova_fixtures.PlacementFixture())
self._setup_services()
self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset) self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)
def _setup_compute_service(self): def _setup_compute_service(self):
return self.start_service('compute') return self.start_service('compute')
def _setup_scheduler_service(self): def _setup_scheduler_service(self):
self.flags(group='scheduler', driver='chance_scheduler')
return self.start_service('scheduler') return self.start_service('scheduler')
def _setup_services(self): def _setup_services(self):

View File

@@ -78,7 +78,6 @@ class NotificationSampleTestBase(test.TestCase,
self.useFixture(utils_fixture.TimeFixture(test_services.fake_utcnow())) self.useFixture(utils_fixture.TimeFixture(test_services.fake_utcnow()))
self.flags(driver='chance_scheduler', group='scheduler')
# the image fake backend needed for image discovery # the image fake backend needed for image discovery
nova.tests.unit.image.fake.stub_out_image_service(self) nova.tests.unit.image.fake.stub_out_image_service(self)
self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset) self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)

View File

@@ -38,7 +38,6 @@ class TestServerGet(test.TestCase):
nova.tests.unit.image.fake.stub_out_image_service(self) nova.tests.unit.image.fake.stub_out_image_service(self)
self.start_service('conductor') self.start_service('conductor')
self.flags(driver='chance_scheduler', group='scheduler')
self.start_service('scheduler') self.start_service('scheduler')
self.compute = self.start_service('compute') self.compute = self.start_service('compute')

View File

@@ -46,7 +46,6 @@ class TestServerGet(test.TestCase):
nova.tests.unit.image.fake.stub_out_image_service(self) nova.tests.unit.image.fake.stub_out_image_service(self)
self.start_service('conductor') self.start_service('conductor')
self.flags(driver='chance_scheduler', group='scheduler')
self.start_service('scheduler') self.start_service('scheduler')
self.compute = self.start_service('compute') self.compute = self.start_service('compute')
self.consoleauth = self.start_service('consoleauth') self.consoleauth = self.start_service('consoleauth')

View File

@@ -67,7 +67,6 @@ class TestSerialConsoleLiveMigrate(test.TestCase):
self.flags(host="test_compute1") self.flags(host="test_compute1")
self.start_service('conductor') self.start_service('conductor')
self.flags(driver='chance_scheduler', group='scheduler')
self.start_service('scheduler') self.start_service('scheduler')
self.compute = self.start_service('compute', host='test_compute1') self.compute = self.start_service('compute', host='test_compute1')
self.consoleauth = self.start_service('consoleauth') self.consoleauth = self.start_service('consoleauth')

View File

@@ -63,10 +63,6 @@ class TestRetryBetweenComputeNodeBuilds(test.TestCase):
self.start_service('conductor') self.start_service('conductor')
self.start_service('consoleauth') self.start_service('consoleauth')
# Configure a minimal filter scheduler setup.
self.flags(enabled_filters=['ComputeFilter', 'RetryFilter'],
group='filter_scheduler')
self.start_service('scheduler') self.start_service('scheduler')
# We start two compute services because we're going to fake one # We start two compute services because we're going to fake one

View File

@@ -61,7 +61,6 @@ class TestLocalDeleteAttachedVolumes(test.TestCase):
nova.tests.unit.image.fake.stub_out_image_service(self) nova.tests.unit.image.fake.stub_out_image_service(self)
self.start_service('conductor') self.start_service('conductor')
self.flags(driver='chance_scheduler', group='scheduler')
self.start_service('scheduler') self.start_service('scheduler')
self.start_service('compute') self.start_service('compute')
# The consoleauth service is needed for deleting console tokens. # The consoleauth service is needed for deleting console tokens.

View File

@@ -41,8 +41,6 @@ class TestLocalDeleteAllocations(test.TestCase,
self.start_service('conductor') self.start_service('conductor')
self.start_service('consoleauth') self.start_service('consoleauth')
self.flags(enabled_filters=['RetryFilter', 'ComputeFilter'],
group='filter_scheduler')
self.start_service('scheduler') self.start_service('scheduler')
self.compute = self.start_service('compute') self.compute = self.start_service('compute')

View File

@@ -50,7 +50,6 @@ class ServerTagsFilteringTest(test.TestCase,
self.api.microversion = 'latest' self.api.microversion = 'latest'
self.start_service('conductor') self.start_service('conductor')
self.flags(driver='chance_scheduler', group='scheduler')
self.start_service('scheduler') self.start_service('scheduler')
self.start_service('compute') self.start_service('compute')
# The consoleauth service is needed for deleting console tokens when # The consoleauth service is needed for deleting console tokens when

View File

@@ -52,7 +52,6 @@ class ServerListLimitMarkerCell0Test(test.TestCase,
self.api.microversion = 'latest' self.api.microversion = 'latest'
self.start_service('conductor') self.start_service('conductor')
self.flags(driver='chance_scheduler', group='scheduler')
self.start_service('scheduler') self.start_service('scheduler')
# We don't start the compute service because we want NoValidHost so # We don't start the compute service because we want NoValidHost so
# all of the instances go into ERROR state and get put into cell0. # all of the instances go into ERROR state and get put into cell0.

View File

@@ -37,10 +37,11 @@ class TestListServersIpFilter(test.TestCase):
# the image fake backend needed for image discovery # the image fake backend needed for image discovery
nova.tests.unit.image.fake.stub_out_image_service(self) nova.tests.unit.image.fake.stub_out_image_service(self)
self.useFixture(nova_fixtures.PlacementFixture())
self.start_service('conductor') self.start_service('conductor')
# Use the chance scheduler to bypass filtering and just pick the single self.flags(enabled_filters=['ComputeFilter'],
# compute host that we have. group='filter_scheduler')
self.flags(driver='chance_scheduler', group='scheduler')
self.start_service('scheduler') self.start_service('scheduler')
self.start_service('compute') self.start_service('compute')
self.start_service('consoleauth') self.start_service('consoleauth')

View File

@@ -1068,15 +1068,11 @@ class ServerMovingTests(test.TestCase, integrated_helpers.InstanceHelperMixin):
REQUIRES_LOCKING = True REQUIRES_LOCKING = True
microversion = 'latest' microversion = 'latest'
_enabled_filters = ['RetryFilter', 'ComputeFilter']
def setUp(self): def setUp(self):
# NOTE(danms): The test defaults to using SmallFakeDriver, # NOTE(danms): The test defaults to using SmallFakeDriver,
# which only has one vcpu, which can't take the doubled allocation # which only has one vcpu, which can't take the doubled allocation
# we're now giving it. So, use the bigger MediumFakeDriver here. # we're now giving it. So, use the bigger MediumFakeDriver here.
self.flags(compute_driver='fake.MediumFakeDriver') self.flags(compute_driver='fake.MediumFakeDriver')
self.flags(enabled_filters=self._enabled_filters,
group='filter_scheduler')
super(ServerMovingTests, self).setUp() super(ServerMovingTests, self).setUp()
self.useFixture(policy_fixture.RealPolicyFixture()) self.useFixture(policy_fixture.RealPolicyFixture())

View File

@@ -1700,7 +1700,7 @@ class ComputeTestCase(BaseTestCase,
# get total memory as reported by virt driver: # get total memory as reported by virt driver:
resources = self.compute.driver.get_available_resource(NODENAME) resources = self.compute.driver.get_available_resource(NODENAME)
self.assertEqual(1, resources['vcpus']) self.assertEqual(2, resources['vcpus'])
# build an instance, specifying an amount of memory that exceeds # build an instance, specifying an amount of memory that exceeds
# total_mem_mb, but is less than the oversubscribed limit: # total_mem_mb, but is less than the oversubscribed limit:

View File

@@ -596,7 +596,7 @@ class SmallFakeDriver(FakeDriver):
# instead of requiring new samples every time those # instead of requiring new samples every time those
# values are adjusted allow them to be overwritten here. # values are adjusted allow them to be overwritten here.
vcpus = 1 vcpus = 2
memory_mb = 8192 memory_mb = 8192
local_gb = 1028 local_gb = 1028