Merged changes :
Add image type capability flags: "https://github.com/openstack/nova/commit/ aafd873e2176076609ff17d63137dd6f84ddf8d3# diff-98d1a06e0feb7e5ff43a21433afd9f34" Use new ``initial_xxx_allocation_ratio`` CONF "https://github.com/openstack/nova/commit/ 08f3ae960623c94bdd997cacb3e81f04b4bbba69# diff-46d49d172cae6b899c1be3628dede5d1" Change-Id: I5032682068394c2d3f99e06f9e33aee8a273b872
This commit is contained in:
parent
bf68706a83
commit
a52741997b
|
@ -1,3 +1,5 @@
|
||||||
|
libxml2-python==2.6.21
|
||||||
|
lxml==4.3.4
|
||||||
alembic==0.9.8
|
alembic==0.9.8
|
||||||
amqp==2.2.2
|
amqp==2.2.2
|
||||||
appdirs==1.4.3
|
appdirs==1.4.3
|
||||||
|
@ -6,7 +8,6 @@ attrs==17.4.0
|
||||||
automaton==1.14.0
|
automaton==1.14.0
|
||||||
Babel==2.3.4
|
Babel==2.3.4
|
||||||
bashate==0.5.1
|
bashate==0.5.1
|
||||||
enum34==1.0.4
|
|
||||||
bandit==1.1.0
|
bandit==1.1.0
|
||||||
bcrypt==3.1.4
|
bcrypt==3.1.4
|
||||||
cachetools==2.0.1
|
cachetools==2.0.1
|
||||||
|
@ -19,21 +20,22 @@ cmd2==0.8.1
|
||||||
colorama==0.3.9
|
colorama==0.3.9
|
||||||
contextlib2==0.5.5
|
contextlib2==0.5.5
|
||||||
coverage==4.0
|
coverage==4.0
|
||||||
cryptography==2.1
|
cryptography==2.1.4
|
||||||
cursive==0.2.1
|
cursive==0.2.1
|
||||||
ddt==1.0.1
|
ddt==1.0.1
|
||||||
debtcollector==1.19.0
|
debtcollector==1.19.0
|
||||||
decorator==3.4.0
|
decorator==3.4.0
|
||||||
deprecation==2.0
|
deprecation==2.0
|
||||||
dogpile.cache==0.6.5
|
dogpile.cache==0.6.5
|
||||||
|
enum34==1.0.4
|
||||||
enum-compat==0.0.2
|
enum-compat==0.0.2
|
||||||
eventlet==0.18.2
|
eventlet==0.20.0
|
||||||
extras==1.0.0
|
extras==1.0.0
|
||||||
fasteners==0.14.1
|
fasteners==0.14.1
|
||||||
fixtures==3.0.0
|
fixtures==3.0.0
|
||||||
flake8==2.5.5
|
flake8==2.5.5
|
||||||
future==0.16.0
|
future==0.16.0
|
||||||
futurist==1.6.0
|
futurist==1.8.0
|
||||||
gabbi==1.35.0
|
gabbi==1.35.0
|
||||||
gitdb2==2.0.3
|
gitdb2==2.0.3
|
||||||
GitPython==2.1.8
|
GitPython==2.1.8
|
||||||
|
@ -44,12 +46,12 @@ iso8601==0.1.11
|
||||||
Jinja2==2.10
|
Jinja2==2.10
|
||||||
jmespath==0.9.3
|
jmespath==0.9.3
|
||||||
jsonpatch==1.21
|
jsonpatch==1.21
|
||||||
jsonpath-rw-ext==1.1.3
|
|
||||||
jsonpath-rw==1.4.0
|
jsonpath-rw==1.4.0
|
||||||
|
jsonpath-rw-ext==1.1.3
|
||||||
jsonpointer==2.0
|
jsonpointer==2.0
|
||||||
jsonschema==2.6.0
|
jsonschema==2.6.0
|
||||||
keystoneauth1==3.9.0
|
keystoneauth1==3.9.0
|
||||||
keystonemiddleware==4.17.0
|
keystonemiddleware==4.20.0
|
||||||
kombu==4.1.0
|
kombu==4.1.0
|
||||||
linecache2==1.0.0
|
linecache2==1.0.0
|
||||||
lxml==3.4.1
|
lxml==3.4.1
|
||||||
|
@ -61,41 +63,45 @@ mock==2.0.0
|
||||||
monotonic==1.4
|
monotonic==1.4
|
||||||
mox3==0.20.0
|
mox3==0.20.0
|
||||||
msgpack==0.5.6
|
msgpack==0.5.6
|
||||||
|
msgpack-python==0.5.6
|
||||||
munch==2.2.0
|
munch==2.2.0
|
||||||
netaddr==0.7.18
|
netaddr==0.7.18
|
||||||
netifaces==0.10.4
|
netifaces==0.10.4
|
||||||
networkx==1.11
|
networkx==1.11
|
||||||
numpy==1.14.2
|
numpy==1.14.2
|
||||||
openstacksdk==0.12.0
|
openstacksdk==0.12.0
|
||||||
os-brick==2.5.0
|
os-brick==2.6.1
|
||||||
os-client-config==1.29.0
|
os-client-config==1.29.0
|
||||||
os-resource-classes==0.1.0 # Apache-2.0
|
os-resource-classes==0.1.0
|
||||||
os-service-types==1.2.0
|
os-service-types==1.2.0
|
||||||
os-traits==0.4.0
|
os-traits==0.12.0
|
||||||
os-vif==1.7.0
|
os-vif==1.14.0
|
||||||
os-win==3.0.0
|
os-win==3.0.0
|
||||||
os-xenapi==0.3.3
|
os-xenapi==0.3.3
|
||||||
osc-lib==1.10.0
|
osc-lib==1.10.0
|
||||||
oslo.cache==1.26.0
|
oslo.cache==1.26.0
|
||||||
oslo.concurrency==3.26.0
|
oslo.concurrency==3.26.0
|
||||||
oslo.config==5.2.0
|
oslo.config==6.1.0
|
||||||
oslo.context==2.19.2
|
oslo.context==2.19.2
|
||||||
oslo.db==4.27.0
|
oslo.db==4.44.0
|
||||||
oslo.i18n==3.15.3
|
oslo.i18n==3.15.3
|
||||||
oslo.log==3.36.0
|
oslo.log==3.36.0
|
||||||
oslo.messaging==6.3.0
|
oslo.messaging==7.0.0
|
||||||
oslo.middleware==3.31.0
|
oslo.middleware==3.31.0
|
||||||
oslo.policy==1.35.0
|
oslo.policy==1.35.0
|
||||||
oslo.privsep==1.23.0
|
oslo.privsep==1.32.0
|
||||||
oslo.reports==1.18.0
|
oslo.reports==1.18.0
|
||||||
oslo.rootwrap==5.8.0
|
oslo.rootwrap==5.8.0
|
||||||
oslo.serialization==2.18.0
|
oslo.serialization==2.21.1
|
||||||
oslo.service==1.24.0
|
oslo.service==1.34.0
|
||||||
|
oslo.upgradecheck==0.1.1
|
||||||
oslo.utils==3.37.0
|
oslo.utils==3.37.0
|
||||||
oslo.versionedobjects==1.31.2
|
oslo.versionedobjects==1.35.0
|
||||||
oslo.vmware==2.17.0
|
oslo.vmware==2.17.0
|
||||||
oslotest==3.2.0
|
oslotest==3.2.0
|
||||||
osprofiler==1.4.0
|
osprofiler==1.4.0
|
||||||
|
ovs==2.10.0
|
||||||
|
ovsdbapp==0.15.0
|
||||||
packaging==17.1
|
packaging==17.1
|
||||||
paramiko==2.0.0
|
paramiko==2.0.0
|
||||||
Paste==2.0.2
|
Paste==2.0.2
|
||||||
|
@ -110,27 +116,28 @@ prettytable==0.7.1
|
||||||
psutil==3.2.2
|
psutil==3.2.2
|
||||||
psycopg2==2.7
|
psycopg2==2.7
|
||||||
py==1.5.2
|
py==1.5.2
|
||||||
pyasn1-modules==0.2.1
|
|
||||||
pyasn1==0.4.2
|
pyasn1==0.4.2
|
||||||
|
pyasn1-modules==0.2.1
|
||||||
pycadf==2.7.0
|
pycadf==2.7.0
|
||||||
pycodestyle==2.0.0
|
|
||||||
pycparser==2.18
|
pycparser==2.18
|
||||||
pyflakes==0.8.1
|
pyflakes==0.8.1
|
||||||
|
pycodestyle==2.0.0
|
||||||
pyinotify==0.9.6
|
pyinotify==0.9.6
|
||||||
|
pyroute2==0.5.4
|
||||||
|
PyJWT==1.7.0
|
||||||
PyMySQL==0.7.6
|
PyMySQL==0.7.6
|
||||||
PyNaCl==1.2.1
|
PyNaCl==1.2.1
|
||||||
pyOpenSSL==17.5.0
|
pyOpenSSL==17.5.0
|
||||||
pyparsing==2.2.0
|
pyparsing==2.2.0
|
||||||
pyperclip==1.6.0
|
pyperclip==1.6.0
|
||||||
pypowervm==1.1.20
|
pypowervm==1.1.20
|
||||||
pyroute2==0.4.21
|
|
||||||
pytest==3.4.2
|
pytest==3.4.2
|
||||||
python-barbicanclient==4.5.2
|
python-barbicanclient==4.5.2
|
||||||
python-cinderclient==3.3.0
|
python-cinderclient==3.3.0
|
||||||
python-dateutil==2.5.3
|
python-dateutil==2.5.3
|
||||||
python-editor==1.0.3
|
python-editor==1.0.3
|
||||||
python-glanceclient==2.8.0
|
python-glanceclient==2.8.0
|
||||||
python-ironicclient==2.3.0
|
python-ironicclient==2.7.0
|
||||||
python-keystoneclient==3.15.0
|
python-keystoneclient==3.15.0
|
||||||
python-mimeparse==1.6.0
|
python-mimeparse==1.6.0
|
||||||
python-neutronclient==6.7.0
|
python-neutronclient==6.7.0
|
||||||
|
@ -139,18 +146,19 @@ python-swiftclient==3.2.0
|
||||||
pytz==2018.3
|
pytz==2018.3
|
||||||
PyYAML==3.12
|
PyYAML==3.12
|
||||||
repoze.lru==0.7
|
repoze.lru==0.7
|
||||||
requests-mock==1.2.0
|
|
||||||
requests==2.14.2
|
requests==2.14.2
|
||||||
|
requests-mock==1.2.0
|
||||||
requestsexceptions==1.4.0
|
requestsexceptions==1.4.0
|
||||||
retrying==1.3.3
|
retrying==1.3.3
|
||||||
rfc3986==0.3.1
|
rfc3986==1.1.0
|
||||||
Routes==2.3.1
|
Routes==2.3.1
|
||||||
simplejson==3.13.2
|
simplejson==3.13.2
|
||||||
six==1.10.0
|
six==1.10.0
|
||||||
smmap2==2.0.3
|
smmap2==2.0.3
|
||||||
|
sortedcontainers==2.1.0
|
||||||
|
SQLAlchemy==1.0.10
|
||||||
Sphinx==1.6.2
|
Sphinx==1.6.2
|
||||||
sqlalchemy-migrate==0.11.0
|
sqlalchemy-migrate==0.11.0
|
||||||
SQLAlchemy==1.0.10
|
|
||||||
sqlparse==0.2.4
|
sqlparse==0.2.4
|
||||||
statsd==3.2.2
|
statsd==3.2.2
|
||||||
stestr==1.0.0
|
stestr==1.0.0
|
||||||
|
|
|
@ -78,7 +78,7 @@ class TestPowerVMDriverInit(test.NoDBTestCase):
|
||||||
self.assertFalse(test_driver.capabilities['supports_multiattach'])
|
self.assertFalse(test_driver.capabilities['supports_multiattach'])
|
||||||
self.assertTrue(test_driver.capabilities['supports_evacuate'])
|
self.assertTrue(test_driver.capabilities['supports_evacuate'])
|
||||||
self.assertNotIn('has_imagecache', test_driver.capabilities)
|
self.assertNotIn('has_imagecache', test_driver.capabilities)
|
||||||
self.assertEqual(8, len(test_driver.capabilities))
|
self.assertEqual(19, len(test_driver.capabilities))
|
||||||
|
|
||||||
@mock.patch('pypowervm.tasks.storage.find_vg',
|
@mock.patch('pypowervm.tasks.storage.find_vg',
|
||||||
new=mock.Mock(return_value=(mock.Mock(), mock.Mock())))
|
new=mock.Mock(return_value=(mock.Mock(), mock.Mock())))
|
||||||
|
@ -92,7 +92,7 @@ class TestPowerVMDriverInit(test.NoDBTestCase):
|
||||||
test_driver._setup_disk_adapter()
|
test_driver._setup_disk_adapter()
|
||||||
# Localdisk driver has the image cache capability
|
# Localdisk driver has the image cache capability
|
||||||
self.assertTrue(test_driver.capabilities['has_imagecache'])
|
self.assertTrue(test_driver.capabilities['has_imagecache'])
|
||||||
self.assertEqual(9, len(test_driver.capabilities))
|
self.assertEqual(20, len(test_driver.capabilities))
|
||||||
|
|
||||||
@mock.patch('nova_powervm.virt.powervm.disk.ssp.SSPDiskAdapter.'
|
@mock.patch('nova_powervm.virt.powervm.disk.ssp.SSPDiskAdapter.'
|
||||||
'_fetch_cluster', new=mock.Mock())
|
'_fetch_cluster', new=mock.Mock())
|
||||||
|
@ -109,7 +109,7 @@ class TestPowerVMDriverInit(test.NoDBTestCase):
|
||||||
test_driver._setup_disk_adapter()
|
test_driver._setup_disk_adapter()
|
||||||
# SSP driver doesn't have image cache capability
|
# SSP driver doesn't have image cache capability
|
||||||
self.assertFalse(test_driver.capabilities['has_imagecache'])
|
self.assertFalse(test_driver.capabilities['has_imagecache'])
|
||||||
self.assertEqual(9, len(test_driver.capabilities))
|
self.assertEqual(20, len(test_driver.capabilities))
|
||||||
|
|
||||||
@mock.patch('nova_powervm.virt.powervm.event.PowerVMNovaEventHandler',
|
@mock.patch('nova_powervm.virt.powervm.event.PowerVMNovaEventHandler',
|
||||||
autospec=True)
|
autospec=True)
|
||||||
|
@ -1668,7 +1668,7 @@ class TestPowerVMDriver(test.NoDBTestCase):
|
||||||
def test_update_provider_tree_complex_ptree(self):
|
def test_update_provider_tree_complex_ptree(self):
|
||||||
# Overrides inventory already on the provider; leaves other providers
|
# Overrides inventory already on the provider; leaves other providers
|
||||||
# and aggregates/traits alone.
|
# and aggregates/traits alone.
|
||||||
with self._update_provider_tree() as (ptree, _):
|
with self._update_provider_tree() as (ptree, exp_inv):
|
||||||
ptree.update_inventory('compute_host', {
|
ptree.update_inventory('compute_host', {
|
||||||
# these should get blown away
|
# these should get blown away
|
||||||
'VCPU': {
|
'VCPU': {
|
||||||
|
@ -1689,7 +1689,11 @@ class TestPowerVMDriver(test.NoDBTestCase):
|
||||||
'for': 'ssp'})
|
'for': 'ssp'})
|
||||||
ptree.update_aggregates('ssp', [uuids.ss_agg])
|
ptree.update_aggregates('ssp', [uuids.ss_agg])
|
||||||
ptree.new_child('sriov', 'compute_host', uuid=uuids.sriov)
|
ptree.new_child('sriov', 'compute_host', uuid=uuids.sriov)
|
||||||
|
# Since CONF.cpu_allocation_ratio is not set and this is not
|
||||||
|
# the initial upt call (so CONF.initial_cpu_allocation_ratio would
|
||||||
|
# be used), the existing allocation ratio value from the tree is
|
||||||
|
# used.
|
||||||
|
exp_inv['VCPU']['allocation_ratio'] = 1.0
|
||||||
# Make sure the compute's agg and traits were left alone
|
# Make sure the compute's agg and traits were left alone
|
||||||
cndata = ptree.data('compute_host')
|
cndata = ptree.data('compute_host')
|
||||||
self.assertEqual(set([uuids.ss_agg, uuids.other_agg]),
|
self.assertEqual(set([uuids.ss_agg, uuids.other_agg]),
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from nova import block_device
|
from nova import block_device
|
||||||
from nova.compute import task_states
|
from nova.compute import task_states
|
||||||
from nova.compute import utils as compute_utils
|
from nova.compute import utils as compute_utils
|
||||||
|
@ -102,6 +101,19 @@ class PowerVMDriver(driver.ComputeDriver):
|
||||||
"supports_extend_volume": True,
|
"supports_extend_volume": True,
|
||||||
"supports_multiattach": False,
|
"supports_multiattach": False,
|
||||||
"supports_evacuate": True,
|
"supports_evacuate": True,
|
||||||
|
"supports_trusted_certs": False,
|
||||||
|
|
||||||
|
# Supported image types
|
||||||
|
"supports_image_type_aki": False,
|
||||||
|
"supports_image_type_ami": False,
|
||||||
|
"supports_image_type_ari": False,
|
||||||
|
"supports_image_type_iso": False,
|
||||||
|
"supports_image_type_qcow2": False,
|
||||||
|
"supports_image_type_raw": True,
|
||||||
|
"supports_image_type_vdi": False,
|
||||||
|
"supports_image_type_vhd": False,
|
||||||
|
"supports_image_type_vhdx": False,
|
||||||
|
"supports_image_type_vmdk": False,
|
||||||
}
|
}
|
||||||
super(PowerVMDriver, self).__init__(virtapi)
|
super(PowerVMDriver, self).__init__(virtapi)
|
||||||
|
|
||||||
|
@ -1010,35 +1022,34 @@ class PowerVMDriver(driver.ComputeDriver):
|
||||||
# update_available_resource flow.
|
# update_available_resource flow.
|
||||||
data = self._get_available_resource()
|
data = self._get_available_resource()
|
||||||
|
|
||||||
# TODO(efried): Fix these to reflect something like reality
|
# NOTE(yikun): If the inv record does not exists, the allocation_ratio
|
||||||
# For now, duplicate the logic the resource tracker uses via
|
# will use the CONF.xxx_allocation_ratio value if xxx_allocation_ratio
|
||||||
# update_compute_node when get_inventory/update_provider_tree is not
|
# is set, and fallback to use the initial_xxx_allocation_ratio
|
||||||
# implemented.
|
# otherwise.
|
||||||
cpu_alloc_ratio = CONF.cpu_allocation_ratio or 16.0
|
inv = provider_tree.data(nodename).inventory
|
||||||
|
ratios = self._get_allocation_ratios(inv)
|
||||||
cpu_reserved = CONF.reserved_host_cpus
|
cpu_reserved = CONF.reserved_host_cpus
|
||||||
mem_alloc_ratio = CONF.ram_allocation_ratio or 1.5
|
|
||||||
mem_reserved = CONF.reserved_host_memory_mb
|
mem_reserved = CONF.reserved_host_memory_mb
|
||||||
disk_alloc_ratio = CONF.disk_allocation_ratio or 1.0
|
|
||||||
disk_reserved = self._get_reserved_host_disk_gb_from_config()
|
disk_reserved = self._get_reserved_host_disk_gb_from_config()
|
||||||
|
|
||||||
inventory = {
|
inventory = {
|
||||||
orc.VCPU: {
|
orc.VCPU: {
|
||||||
'total': data['vcpus'],
|
'total': data['vcpus'],
|
||||||
'max_unit': data['vcpus'],
|
'max_unit': data['vcpus'],
|
||||||
'allocation_ratio': cpu_alloc_ratio,
|
'allocation_ratio': ratios[orc.VCPU],
|
||||||
'reserved': cpu_reserved,
|
'reserved': cpu_reserved,
|
||||||
},
|
},
|
||||||
orc.MEMORY_MB: {
|
orc.MEMORY_MB: {
|
||||||
'total': data['memory_mb'],
|
'total': data['memory_mb'],
|
||||||
'max_unit': data['memory_mb'],
|
'max_unit': data['memory_mb'],
|
||||||
'allocation_ratio': mem_alloc_ratio,
|
'allocation_ratio': ratios[orc.MEMORY_MB],
|
||||||
'reserved': mem_reserved,
|
'reserved': mem_reserved,
|
||||||
},
|
},
|
||||||
orc.DISK_GB: {
|
orc.DISK_GB: {
|
||||||
# TODO(efried): Proper DISK_GB sharing when SSP driver in play
|
# TODO(efried): Proper DISK_GB sharing when SSP driver in play
|
||||||
'total': int(data['local_gb']),
|
'total': int(data['local_gb']),
|
||||||
'max_unit': int(data['local_gb']),
|
'max_unit': int(data['local_gb']),
|
||||||
'allocation_ratio': disk_alloc_ratio,
|
'allocation_ratio': ratios[orc.DISK_GB],
|
||||||
'reserved': disk_reserved,
|
'reserved': disk_reserved,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||||
Babel!=2.4.0,>=2.3.4 # BSD
|
Babel!=2.4.0,>=2.3.4 # BSD
|
||||||
six>=1.10.0 # MIT
|
six>=1.10.0 # MIT
|
||||||
oslo.config>=5.2.0 # Apache-2.0
|
oslo.config>=6.1.0 # Apache-2.0
|
||||||
oslo.log>=3.36.0 # Apache-2.0
|
oslo.log>=3.36.0 # Apache-2.0
|
||||||
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
|
oslo.serialization!=2.19.1,>=2.21.1 # Apache-2.0
|
||||||
oslo.utils>=3.37.0 # Apache-2.0
|
oslo.utils>=3.37.0 # Apache-2.0
|
||||||
os-resource-classes>=0.1.0 # Apache-2.0
|
os-resource-classes>=0.1.0 # Apache-2.0
|
||||||
pypowervm>=1.1.20 # Apache-2.0
|
pypowervm>=1.1.20 # Apache-2.0
|
||||||
|
|
Loading…
Reference in New Issue