Merge "For resize, we should copy and use orignal image's status" into stable/newton
This commit is contained in:
@@ -1482,7 +1482,7 @@ class ZVMDriverTestCases(ZVMTestCase):
|
|||||||
self.flags(zvm_xcat_server="10.10.10.10")
|
self.flags(zvm_xcat_server="10.10.10.10")
|
||||||
self.stubs.Set(instance.ZVMInstance, 'copy_xcat_node',
|
self.stubs.Set(instance.ZVMInstance, 'copy_xcat_node',
|
||||||
self._fake_fun())
|
self._fake_fun())
|
||||||
self.stubs.Set(zvmutils, 'add_iucv_in_zvm_table',
|
self.stubs.Set(zvmutils, 'copy_zvm_table_status',
|
||||||
self._fake_fun())
|
self._fake_fun())
|
||||||
self.stubs.Set(instance.ZVMInstance, 'delete_xcat_node',
|
self.stubs.Set(instance.ZVMInstance, 'delete_xcat_node',
|
||||||
self._fake_fun())
|
self._fake_fun())
|
||||||
|
|||||||
@@ -1743,7 +1743,8 @@ class ZVMDriver(driver.ComputeDriver):
|
|||||||
old_inst = ZVMInstance(self, instance)
|
old_inst = ZVMInstance(self, instance)
|
||||||
old_inst.copy_xcat_node(new_instance['name'])
|
old_inst.copy_xcat_node(new_instance['name'])
|
||||||
if zvmutils.xcat_support_iucv(self._xcat_version):
|
if zvmutils.xcat_support_iucv(self._xcat_version):
|
||||||
zvmutils.add_iucv_in_zvm_table(instance['name'])
|
zvmutils.copy_zvm_table_status(instance['name'],
|
||||||
|
new_instance['name'])
|
||||||
zvm_inst.delete_xcat_node()
|
zvm_inst.delete_xcat_node()
|
||||||
|
|
||||||
self._reconfigure_networking(instance['name'], network_info,
|
self._reconfigure_networking(instance['name'], network_info,
|
||||||
|
|||||||
@@ -728,6 +728,11 @@ def add_iucv_in_zvm_table(instance_name):
|
|||||||
xcat_cmd_settab('zvm', 'node', instance_name, "status", status)
|
xcat_cmd_settab('zvm', 'node', instance_name, "status", status)
|
||||||
|
|
||||||
|
|
||||||
|
def copy_zvm_table_status(des_inst_name, src_inst_name):
|
||||||
|
status = xcat_cmd_gettab('zvm', 'node', src_inst_name, "status")
|
||||||
|
xcat_cmd_settab('zvm', 'node', des_inst_name, "status", status)
|
||||||
|
|
||||||
|
|
||||||
def punch_iucv_file(os_ver, zhcp, zhcp_userid, instance_name,
|
def punch_iucv_file(os_ver, zhcp, zhcp_userid, instance_name,
|
||||||
instance_path):
|
instance_path):
|
||||||
"""put iucv server and service files to reader."""
|
"""put iucv server and service files to reader."""
|
||||||
@@ -789,8 +794,9 @@ def punch_iucv_authorized_file(old_inst_name, new_inst_name, zhcp_userid):
|
|||||||
iucv_cmd_file_path = '/tmp/%s.sh' % new_inst_name[-8:]
|
iucv_cmd_file_path = '/tmp/%s.sh' % new_inst_name[-8:]
|
||||||
_generate_iucv_cmd_file(iucv_cmd_file_path, cmd)
|
_generate_iucv_cmd_file(iucv_cmd_file_path, cmd)
|
||||||
punch_file(new_inst_name, iucv_cmd_file_path, 'X', remote_host=get_host())
|
punch_file(new_inst_name, iucv_cmd_file_path, 'X', remote_host=get_host())
|
||||||
# set VM's communicate type is IUCV
|
if old_inst_name != new_inst_name:
|
||||||
add_iucv_in_zvm_table(old_inst_name)
|
# set VM's communicate type the same as original VM
|
||||||
|
copy_zvm_table_status(old_inst_name, new_inst_name)
|
||||||
|
|
||||||
|
|
||||||
def process_eph_disk(instance_name, vdev=None, fmt=None, mntdir=None):
|
def process_eph_disk(instance_name, vdev=None, fmt=None, mntdir=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user