Commit Graph

291 Commits

Author SHA1 Message Date
Huang Rui 6fea79d689 switch to sdk
zvmsdk is a library that enables zvm cloud management.
This patch switch from calling xcat client directly to importing
zvmsdk to call zvmsdk API, to manage zvm host and virtual machines.

Change-Id: I74406a618a4a8b2d80a905c56621c1acd46f1c08
2017-08-22 10:14:23 +08:00
Huang Rui 2e3d781d86 Move nova zvm virt driver to separate namespace
Currently, nova zvm virt driver is in nova namespace. This result
in some troubles when generating config file, generating docs and
packaging.

All changes in this commit are trying to move nova zvm virt driver
code into new namespace - nova_zvm .

Change-Id: I5251069dfd24ff4e337e9308439415482eb2234c
2017-03-23 12:51:13 +08:00
Jenkins cee0d80f1b Merge "Updating instance_fcp_map correctly when boot-from-volume fails" 2017-03-22 05:01:57 +00:00
Yi Chun Huang 551d81809b Updating instance_fcp_map correctly when boot-from-volume fails
When boot-from-volume fails, its instance_fcp_map should be updated
correctly. Unfortunately, current code is wrong and will lead to an
error raised.

Change-Id: I7aa65d551b435e0600a40e652478a1fb775d5ca1
2017-03-21 15:56:12 +08:00
Jenkins 603aabbf82 Merge "Do not punch xcat key file to instance" 2017-03-21 01:46:21 +00:00
Jenkins a575b77d61 Merge "Update root_disk_units with CYL or BLK units" 2017-03-20 10:17:38 +00:00
Jenkins 106da7774e Merge "Add zvm_default_admin_userid conf option" 2017-03-20 10:10:33 +00:00
Jenkins 8ef9ecb427 Merge "Try to do unlock when delete userid failed" 2017-03-20 08:26:27 +00:00
Huang Rui 576861d24c Try to do unlock when delete userid failed
Right now, if delete userid failed due to image lock or device
lock, zvm driver has a looping call to check lock status with 10
minutes timeout.

Normaly, the image or device was locked by disk related actions
which could not be unlocked in short time. So turn to call
image_unlock_dm try to unlock it. Then try to delete the vm again.

Change-Id: I848d042231757d8673700e3db2b46f8fc9757596
2017-03-20 16:13:15 +08:00
nafei yang a6bd227ead Update root_disk_units with CYL or BLK units
Now the root_disk_units just has disk size in it. It doesn't have
units. So if customer specify a dismatch disk type, the driver
will not detect it until the create disk prompt the space is not
enough. This patch add units to root_disk_units, so it can give
customer clearly advise if error happens.

Change-Id: I1a31aa4bf77b774092fd04cc7174599252757538
2017-03-16 15:16:22 +08:00
jichenjc 47c92666e5 Add zvm_default_admin_userid conf option
zvm_default_admin_userid will be added and user is able to
log on cloud created user through this ID.

the old zvm_user_default_password will be removed in the near future.

part of blueprint:add_zvm_default_admin_userid

Change-Id: I8938669af3103df2e6f51cee1de458a6be339154
2017-03-15 13:15:01 +08:00
jichenjc 36895437c5 Add handle 503 error from REST layer
REST API layer might return 503 error, this means server is
temply not available, instead just fail, we can retry the work
as our REST calls are sync call, so no harm to retry it

as we can't retry forever, add a retry max count so that at
last we will still fail out.

Change-Id: I1e484265d241c87d2f0060f0aaef19cb6314ed4f
2017-03-13 21:21:06 +08:00
Jenkins ca90ca4306 Merge "For SLES system, to keep the NIC setting persistent When boot a system with a NIC which is different from the master system, NIC qeth device will not be initialized when system re-ipl." 2017-02-27 06:17:59 +00:00
songqianxia 087bfe7599 Do not punch xcat key file to instance
After Newton sp1 release, not punch xcat key for new deployed VM.

Change-Id: I3d48cc38818b5a518f3a054c68703ed0543defbd
2017-02-23 16:50:51 +08:00
Jenkins c02a5096d9 Merge "Insert os_version into instance obj when boot-from-volume" 2017-02-23 08:25:46 +00:00
Yi Chun Huang 7421b60832 Insert os_version into instance obj when boot-from-volume
An instance object should have the os and version information so
that a volume can be attached to it when it's inactive.

Change-Id: I232f743a446dbfcaaf3794df02c084515bdd45fe
2017-02-23 16:06:50 +08:00
Jenkins 633d7f94c2 Merge "Revert "Remove the restriction to disable selinux for rhel7.x"" 2017-02-20 07:25:54 +00:00
songqianxia 048011d17f Revert "Remove the restriction to disable selinux for rhel7.x"
This reverts commit b73dd7bbab.

Change-Id: I24ad4db7c5a86de78fdc495a4bac7e8220619b87
2017-02-20 03:22:12 +00:00
Jenkins 2bfd68c24e Merge "Remove the restriction to disable selinux for rhel7.x" 2017-02-17 10:00:46 +00:00
Anh Tran e0b667ad60 Remove unused logging import
Change-Id: I7f5008295ca03cb801c2d00ade405e92f6ed697a
2017-02-17 11:17:32 +07:00
songqianxia 9bb1592fba For SLES system, to keep the NIC setting persistent
When boot a system with a NIC which is different from the master system,
NIC qeth device will not be initialized when system re-ipl.

Change-Id: I3afd2b7bef51db113212fde039cb32e902d6f81a
2017-02-16 15:36:53 +08:00
caobiao dbcf0f53ac now can capture instances with chinese characters
remove prefix('\u') of chinese unicode when snapshotting
or booting an instance
the image name will store as the format without prefix,like:
'\u6d4b\u8bd5\u7528\u4f8b' --> '6d4b8bd575284f8b'
add a function in util.py for code reuse
add a test for this function

Change-Id: I1bfc6ace2b74e4cfab3a6c6a36c31629e4290bf4
2017-02-13 17:04:02 +08:00
Yi Chun Huang c91759e280 Enable boot from volume for Ubuntu 16
Begin to support to boot from volume for Ubuntu distro.

Change-Id: I001a3bf439c579697f57fcaa33940f5803391cfd
2017-02-07 17:22:34 +08:00
Yi Chun Huang c96a83c752 Correct the hostname when booting from volume
The hostname of the instance is not set correct when booting from
volume. It's caused by redundant data in network_metadata in
instance_metadata, so the data will be cleaned.

Change-Id: Id6c847cae4442fa70f2de212c22968973f139601
2017-01-19 18:53:49 +08:00
Yi Chun Huang d61e0d0879 Remove redundant WWPN when preparing boot-from-volume
We use one WWPN to do boot-from-volume, but SVC driver always
returns a WWPN list from Newton. So we have to remove the
redundant ones.

Change-Id: I6c43eb8f057c79b3f9f75a8532608e5f42e924b1
2017-01-19 16:29:37 +08:00
Jenkins 4d0d01a79a Merge "Modify to set root device earlier in spawn" 2017-01-18 08:13:18 +00:00
nafei yang 1d4b8a303e Modify to set root device earlier in spawn
In current spawn, at the beginning of spawn the root device is
set to /dev/sda automatically, that is not correct for a normal
spawn vm which should be /dev/dasda, so change to update the root
device in earlier stage of spawn, this change has no effect to
the function.

Change-Id: I7d83bad7844d56cc4bcbfd88b8f947c1a6d99ec1
2017-01-18 15:28:31 +08:00
nafei yang 6cc8bc12a2 Modify to use one same command to change password
Previously, we use different commands to set admin password for
different linux distros. However, we found this can be done by
chpasswd command on all distros, so change to use it.

Change-Id: I0cbbb4644e12fe8fb773fefbfe112b7bc2b0444d
2017-01-18 13:43:14 +08:00
caobiao 6bbebe3f3e a following path for fix_failure_of_deploy_multi_instances patch
add comments to describe the reason of adding semaphore and simply
introduce the problem to solve for future reference

Change-Id: I5dd03f5d47264df8a1bb8c3ed21b79407f867210
2017-01-16 14:17:48 +08:00
Jenkins f4e1b766db Merge "Fix the image_meta problem for boot from volume." 2017-01-16 05:30:04 +00:00
Jenkins e26c7a7345 Merge "avoid import_image_to_nova called by multi threads at a time" 2017-01-12 03:49:19 +00:00
Jenkins ebb24aa00b Merge "Add conf description for live migration" 2017-01-11 01:55:38 +00:00
Jenkins d506b18a06 Merge "follow up of configuration changes" 2017-01-11 01:55:31 +00:00
caobiao 54d03c6719 avoid import_image_to_nova called by multi threads at a time
use a semaphore from eventlet to syschronize the image shared
between instances while booting an instance

Change-Id: I115e4f0c1686aa999a549d918df267c0459766a3
2017-01-10 16:03:43 +08:00
nafei yang 301a6ca203 Fix the image_meta problem for boot from volume.
When boot from volume, image_meta has no id or other properties
it will cause the error like bug 1657 described. Submit this patch
to solve it.

Change-Id: Ie513ad7003b391d7012df946c3b660ae127aca1c
2017-01-09 15:56:50 +08:00
songqianxia b73dd7bbab Remove the restriction to disable selinux for rhel7.x
When make deployment, openstack will punch the policy files to set selinux policy
to allow socket communication to VMs.
Should work with zhcp's patch which include the policy file

Change-Id: Ia687b2f8341f541437e0e8f8103d8d07834f8075
2017-01-05 19:49:56 +08:00
jichenjc d80c892db8 Add conf description for live migration
Add better description for live migration support

part of blueprint: conf-enhancement

Change-Id: Ia748380d6dbd9a71de556e4e213db998e6b33320
2017-01-05 15:14:08 +08:00
jichenjc 1cd0ff5ee2 follow up of configuration changes
some wording need some changes for conf file, this patch added the
changes accordingly.

Change-Id: I2631127850532af034a4a7bf6357a1ad12371c37
2017-01-05 11:15:42 +08:00
jichenjc cb51d39338 change default value for zvm_vmrelocate_immediate
zvm_vmrelocate_immediate = yes will give benefit to total migration
time but will increase the quiesence time, so we need set it to
no to get more benefit to end user.

Change-Id: Ib2091067e297a15a3409bf2dd6f9aa8a06ba7df4
2017-01-05 03:02:07 +08:00
Jenkins bf0be323d2 Merge "ignore error 6312" 2016-12-21 16:18:47 +00:00
biao cao 97a889ef62 ignore error 6312
6312 means dirmaint limit reached, we need ignore this error
and proceed further operations.

Change-Id: Ic84b496ea8dce3d427d705eac487e3016cf916f1
2016-12-21 00:58:31 +08:00
songqianxia fda8be04dd For resize, we should copy and use orignal image's status
This patch is for VM migrated from liberty, some of them can't setup IUCV,
so use SSH to make communication. We should keep the status as original VM.

Change-Id: I052ab748f61b1c05dbe8780e368b2d62aadaee60
2016-12-20 03:27:48 +00:00
caobiao ff27679742 use uuidutils to generate UUID instead of uuid4
using uuid4 will get pep8 error when submit,so change to uuidutils

Change-Id: I3babf1f81132fae0bdb5b5aabd06427f80f8e678
2016-12-20 10:23:33 +08:00
songqianxia e60b54fdba Fix issue in resize function that iucv_authrized_userid is not changed
Change-Id: I3dc8ac93d140a6012ecf5c5267229d406fb06f68
2016-12-06 10:14:18 +00:00
jichenjc 4bcc7b1ca1 Fix vm_mode exception
https://review.openstack.org/#/c/356553 changed vm_mode to objects
we need do same changes as well

Change-Id: I5ce52a03b33dc39d2a5d34007dcccc85271d5a81
2016-11-28 14:41:00 +08:00
jichenjc b5831e1148 riase correct exception if image prop not valid
we should raise nova exception so during build, nova
compute know it's a invalid image and stop retry

Change-Id: Id106d2c70fd12ffbd924ab20cd4022a3a9899f17
2016-11-27 22:15:44 +08:00
jichenjc dd93fccf35 Bump xcat requirement version
bump to minimum 2.8.3.16

Change-Id: Ie9e5e5b67e80f4eb09bc04a9da56ac1036ce560e
2016-11-27 14:21:53 +08:00
Yi Chun Huang 10149b9702 Print exception in driver._detach_volume_from_instance
Print the details of the error which raised in processing of
driver._detach_volume_from_instance, instead of just return a
simple message.

Change-Id: I7b4353847e024a8de96ec6810c24dd2e1e51bb3c
2016-11-30 10:59:33 +08:00
Jenkins 49923a112a Merge "I fixed two bugs in this patch. 1) the code in the dist.py correct a display format of content in ifcfg-xxx file to let user easy to grep and show the file content in one line." 2016-11-28 11:10:17 +00:00
Jenkins 45346c47a8 Merge "add context param to confirm_migration" 2016-11-25 10:41:59 +00:00