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