Merge "Conductor changes to register nova-powervm objects"
This commit is contained in:
commit
72edcb2424
25
README.rst
25
README.rst
|
@ -155,6 +155,31 @@ It is the goal of the project to only require minimal additional attributes.
|
|||
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
|
||||
----------------
|
||||
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
# 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()
|
|
@ -0,0 +1,36 @@
|
|||
# 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()
|
Loading…
Reference in New Issue