Remove the PowerVM Live Migration Object
Recently the PowerVM live migration object merged into Nova proper via review: https://review.openstack.org/#/c/391284/ This removes the need for the PowerVM driver to have its own live migration object, allowing us to remove a bunch of code and hacks around this. Change-Id: Ic61eefc0086c5b3954a8986d0fb9699d039f25f9
This commit is contained in:
parent
c5f5c10283
commit
45d7d74dee
25
README.rst
25
README.rst
|
@ -155,31 +155,6 @@ It is the goal of the project to only require minimal additional attributes.
|
||||||
The deployer may specify additional attributes to fit their configuration.
|
The deployer may specify additional attributes to fit their configuration.
|
||||||
|
|
||||||
|
|
||||||
Live Migration
|
|
||||||
--------------
|
|
||||||
|
|
||||||
In the Mitaka release, the Nova project moved to using conductor-based objects
|
|
||||||
for the live migration flow. These objects exist in
|
|
||||||
nova/objects/migrate_data.py.
|
|
||||||
|
|
||||||
While the PowerVM driver supports live migration, it can not register its own
|
|
||||||
live migration object due to being out of tree. The team is working with the
|
|
||||||
nova core team to bring the PowerVM driver in tree. However until that time,
|
|
||||||
the use of live migration with the PowerVM driver requires starting a
|
|
||||||
PowerVM-specific conductor.
|
|
||||||
|
|
||||||
This conductor does not limit the OpenStack cloud to only supporting PowerVM.
|
|
||||||
Rather, it simply allows an existing cloud to include PowerVM support within
|
|
||||||
it.
|
|
||||||
|
|
||||||
To use the conductor, install the nova-powervm project on the node running the
|
|
||||||
nova conductor. Then start the 'nova-conductor-powervm' process. This will
|
|
||||||
support ALL of the hypervisors, including PowerVM.
|
|
||||||
|
|
||||||
To reiterate, this is only needed if you plan to use PowerVM's live migrate
|
|
||||||
functionality.
|
|
||||||
|
|
||||||
|
|
||||||
Developer Impact
|
Developer Impact
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
# Copyright 2016 IBM Corp.
|
|
||||||
#
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
|
|
||||||
"""Starter script for PowerVM Nova Conductor service."""
|
|
||||||
|
|
||||||
from nova.cmd import conductor
|
|
||||||
|
|
||||||
from nova_powervm import objects
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
# The only reason we need this module is to ensure the PowerVM version of
|
|
||||||
# the migrate data object is registered. See:
|
|
||||||
# http://eavesdrop.openstack.org/irclogs/%23openstack-nova/
|
|
||||||
# %23openstack-nova.2016-02-24.log.html
|
|
||||||
objects.register_all()
|
|
||||||
conductor.main()
|
|
|
@ -1,19 +0,0 @@
|
||||||
# Copyright 2016 IBM Corp.
|
|
||||||
#
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
|
|
||||||
def register_all():
|
|
||||||
__import__('nova_powervm.objects.migrate_data')
|
|
|
@ -1,38 +0,0 @@
|
||||||
# Copyright 2016 IBM Corp.
|
|
||||||
#
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# 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.objects import base as obj_base
|
|
||||||
from nova.objects import fields
|
|
||||||
from nova.objects import migrate_data
|
|
||||||
|
|
||||||
|
|
||||||
@obj_base.NovaObjectRegistry.register
|
|
||||||
class PowerVMLiveMigrateData(migrate_data.LiveMigrateData):
|
|
||||||
# Version 1.0: Initial version
|
|
||||||
# Version 1.1: Added the Virtual Ethernet Adapter VLAN mappings.
|
|
||||||
VERSION = '1.1'
|
|
||||||
|
|
||||||
fields = {
|
|
||||||
'host_mig_data': fields.DictOfNullableStringsField(),
|
|
||||||
'dest_ip': fields.StringField(),
|
|
||||||
'dest_user_id': fields.StringField(),
|
|
||||||
'dest_sys_name': fields.StringField(),
|
|
||||||
'public_key': fields.StringField(),
|
|
||||||
'dest_proc_compat': fields.StringField(),
|
|
||||||
'vol_data': fields.DictOfNullableStringsField(),
|
|
||||||
'vea_vlan_mappings': fields.DictOfNullableStringsField(),
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
# Copyright 2016 IBM Corp.
|
|
||||||
#
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
import mock
|
|
||||||
|
|
||||||
from nova.cmd import conductor as nova_cond
|
|
||||||
from nova import test
|
|
||||||
|
|
||||||
from nova_powervm.cmd import conductor
|
|
||||||
from nova_powervm import objects
|
|
||||||
|
|
||||||
|
|
||||||
class TestConductor(test.TestCase):
|
|
||||||
|
|
||||||
@mock.patch.object(objects, 'register_all')
|
|
||||||
@mock.patch.object(nova_cond, 'main')
|
|
||||||
def test_conductor(self, mock_main, mock_reg):
|
|
||||||
|
|
||||||
# Call the main conductor
|
|
||||||
conductor.main()
|
|
||||||
mock_main.assert_called_once_with()
|
|
||||||
mock_reg.assert_called_once_with()
|
|
|
@ -1,28 +0,0 @@
|
||||||
# Copyright 2016 IBM Corp.
|
|
||||||
#
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# 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 test
|
|
||||||
|
|
||||||
from nova_powervm.objects import migrate_data
|
|
||||||
|
|
||||||
|
|
||||||
class TestMigrateData(test.TestCase):
|
|
||||||
|
|
||||||
def test_migrate_data(self):
|
|
||||||
|
|
||||||
data = migrate_data.PowerVMLiveMigrateData()
|
|
||||||
data.public_key = 'key'
|
|
||||||
self.assertEqual(data.public_key, 'key')
|
|
|
@ -22,10 +22,10 @@ import mock
|
||||||
|
|
||||||
from nova import exception
|
from nova import exception
|
||||||
from nova import objects
|
from nova import objects
|
||||||
|
from nova.objects import migrate_data as mig_obj
|
||||||
from nova import test
|
from nova import test
|
||||||
from nova.tests.unit import fake_network
|
from nova.tests.unit import fake_network
|
||||||
|
|
||||||
from nova_powervm.objects import migrate_data as mig_obj
|
|
||||||
from nova_powervm.tests.virt import powervm
|
from nova_powervm.tests.virt import powervm
|
||||||
from nova_powervm.tests.virt.powervm import fixtures as fx
|
from nova_powervm.tests.virt.powervm import fixtures as fx
|
||||||
from nova_powervm.virt.powervm import live_migration as lpm
|
from nova_powervm.virt.powervm import live_migration as lpm
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
from nova import exception
|
from nova import exception
|
||||||
|
from nova.objects import migrate_data as mig_obj
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
from pypowervm.tasks import management_console as mgmt_task
|
from pypowervm.tasks import management_console as mgmt_task
|
||||||
|
@ -27,7 +28,6 @@ from pypowervm import util
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from nova_powervm import conf as cfg
|
from nova_powervm import conf as cfg
|
||||||
from nova_powervm.objects import migrate_data as mig_obj
|
|
||||||
from nova_powervm.virt.powervm.i18n import _
|
from nova_powervm.virt.powervm.i18n import _
|
||||||
from nova_powervm.virt.powervm.i18n import _LE
|
from nova_powervm.virt.powervm.i18n import _LE
|
||||||
from nova_powervm.virt.powervm.i18n import _LI
|
from nova_powervm.virt.powervm.i18n import _LI
|
||||||
|
|
|
@ -47,5 +47,3 @@ output_file = nova_powervm/locale/nova-powervm.pot
|
||||||
[entry_points]
|
[entry_points]
|
||||||
oslo.config.opts =
|
oslo.config.opts =
|
||||||
nova_powervm = nova_powervm.conf.powervm:list_opts
|
nova_powervm = nova_powervm.conf.powervm:list_opts
|
||||||
console_scripts =
|
|
||||||
nova-conductor-powervm = nova_powervm.cmd.conductor:main
|
|
||||||
|
|
Loading…
Reference in New Issue