Commit Graph

29 Commits

Author SHA1 Message Date
arunmani 0738af993d Include project_id in QUOTAS.reserve call
Add project_id kwarg as part of the call to deduct quotas
during unregister volume. This will make sure the
deduction happens for the correct project to which
the volume actually belongs to in ICM.

Change-Id: Ib0596aef1b2fde4da0c8164141d39dae2ece4c94
Closes-Bug: #1712093
2017-08-22 02:35:46 -04:00
Jerry Cai 2e22ee2bab Test demo
test demo

Change-Id: I9b5217541b17cb34a10aeecca54bb072d0744f11
Closes-Bug: #1670591
2017-03-07 15:25:55 +08:00
Jerry Cai 95fd19527b Detach sync problem fix
Detach sync problem fix

Closes-Bug: #1647939
Change-Id: I91f31a6bc9730dcbc373406da52bc34349d0de15
2016-12-07 14:51:16 +08:00
Jerry Cai 49d1509c4e Fix for volume description(master)
Fix for volume description is moved from property "display_description"
to "description" for master Edit

Change-Id: I566fb3c18823552becc267be5f0dd31d52694df5
Closes-Bug: #1545973
2016-02-16 16:23:19 +08:00
Jerry Cai d0be0b27d7 List all resources across different service
List all resources across different service by adding "all-tenant"
when call restAPI

Change-Id: Ie29e0bac6fa4c3fe4b771489a722b6712edc3a28
Closes-Bug: #1496781
2015-09-17 18:05:06 +08:00
Jerry Cai 8ff2c0d8e7 Cinder duplicated volume deletion due to potential time window issue
Cinder duplicated volume deletion, which will cause multiple quota
deduction.

Change-Id: I5e970cdb682abac51599b4da93b325fc0707c8f5
Closes-Bug: #1494561
2015-09-11 11:20:28 +08:00
Jerry Cai 50d97fd983 quotas are not updated from powervc side
quotas are not updated when the volumes/instances are synced from
powervc side, this fix help to sync the quota during sync resources
from powervc side, increase quota when insert to local resource,
deduct quota when delete local resources.

Change-Id: Ic5a77e7d154b247d253db19d59ee66a7aa473995
Closes-Bug: 1493232
2015-09-09 11:14:28 +08:00
Jerry Cai 2c5f580f48 Volume sync and create/attach/detach implement for multiattach function
This bug tracks the implementation for volume sync and create/attach/detach
for multiattach function. Host status update also fixed along with this bug.

Change-Id: I45a776775473818c75388c3554664982849c4fae
Closes-Bug: #1491723
2015-09-03 16:16:38 +08:00
Jerry Cai d80d863743 Cinder duplicated volume sync due to potential time window issue
From PBC, the customer encounter below error:

1. Create a volume in ICM
2. Update PowerVC UUID in cinder volume metadata, in the mean time,
PowerVC volume created, end event comes.
3. Check if PowerVC UUID set in volume metadata, but there is
Time window issue here, sometimes db update not reflect
immediately, so no PVC UUID found , and create a duplicated
volume by mistake.

Change-Id: I4e5546034dbf3ff50c2db588e948818431a665c6
Closes-Bug: #1472126
2015-07-07 15:38:50 +08:00
Jenkins 96d9f55201 Merge "Fix cinder detach interface change mismatch problem" 2015-04-29 03:34:30 +00:00
Jerry Cai b0d3faeae4 Fix cinder detach interface change mismatch problem
Fix cinder detach interface change mismatch problem

Change-Id: I97a2319df08c90b55a9d16011e7a4da747fbc8a1
Closes-Bug: #1449826
2015-04-29 11:15:45 +08:00
Jerry Cai 9bb53746ce Fix cinder oslo_log updating from community
Fix cinder oslo_log updating from community

Change-Id: I0ee3851eb3e0820b94a9e95a2229f65bc2adcf72
Closes-Bug: #1439533
2015-04-02 14:18:41 +08:00
Jerry Cai 516eba24a7 cinder list shows multiple duplicate copies of each volume
This is due to get_local_volumes api changed from community, it always
cannot get local volume from db(empty list []), so driver attempts
to insert new volumes every time restarted or periodically sync.

Change-Id: I225394bfaff2229dbb93caa69e067154c608c15a
Closes-Bug: 1435121
2015-03-23 11:13:17 +08:00
Jerry Cai ecdc1066a7 powervc-glance fail to sync images due to glanceclient changed
This is due to glanceclient update. The glanceclient.common.http.HTTPClient
requires a string, but after the changes commited above,
the tuple is returned and causes the parameter mismatch.

Searched all related potential errors and found only this one. Will fix this on kilo release.

Change-Id: I3afef5ceee57b0c1aeb57696c7f73262f3bf16f1
Closes-Bug: 1407567
2015-01-05 07:43:35 +08:00
terryyao 9b9d3d05a7 Complete volume attachment until volume become to 'in-use'
1. Move the wait volume state logic from nova to cinder
2. Wait volume state to be "in-use", then complete volume attachment
3. Change volume sync code to not sync "attaching" or "detaching" state
as if sync code change such state, then volume attach/detach will be
broken



Closes-Bug: #1402467
Change-Id: I3640afe9ad4aba8788a932d05e94f55a3b8d6333
2014-12-15 09:45:29 +08:00
Terry Yao c780569e8c add pool name while register notification listener
oslo.messaging is exposing a new API allow creating listener by
supplying a pool name, then the listeners with that pool name will use
the queue name as the pool name, multiple listeners can be listening
with the same topic.

Change-Id: I220d50fad8cda6f6f50f31215a7a6b98523c35dc
Closes-Bug: #1388663
2014-11-06 16:39:36 +08:00
terryyao 7b84b07f0b move to use oslo.i18/utils/serialization
nova is switching to use oslo.i18n, oslo.utils, oslo.serialization with
change
d0e0ade702
nova.openstack.common removed some modules that has been replaced by the
ones from oslo.i18n, oslo.utils, oslo.serialization.

Closes-Bug: #1384039
Change-Id: I9fae9b61599a50b54fc40552b2c90fceb75d8522
2014-10-23 00:07:25 +08:00
Jenkins eae4668ba3 Merge "Upstart process daemon scripts need to change." 2014-09-17 08:07:14 +00:00
Le Tian Ren 175cd1810d Upstart process daemon scripts need to change.
To adapt to new configuration files.

Check blueprint new-configuration-strategy-needed-to-adapt-to-oslo-messaging

Closes-Bug: 1370337
Change-Id: Ic8e624206490680de07827613d4474bac62686a9
(cherry picked from commit ba29f897db)
2014-09-17 07:48:14 +00:00
Le Tian Ren 0eefba3f77 Add support for multiple AMQP rpc backends
This is based on Oslo messaging API that supports RPC and notifications over a
number of different messsaging transports.

* remove old powervc.common.messaging and create a new one to adapt to Oslo
messaging

* adapt all sync service managers to new messaging model

Change-Id: I0c9b4a9fa5bb5d0eaac1433e768a110871d8dab8
Closes-Bug: 1363618
2014-09-16 17:53:08 +08:00
Le Tian Ren 05a8443e12 New config strategy to adapt to oslo-messaging
* Extract and remove --config-file amqp_openstack.conf(or
  amqp-openstack-neutron and --config-file amqp-powervc.conf from sys.argv to
  create 2 AMQP cfg.ConfigOpts objects without conflicting with other options
  parsing as before, particularly those OpenStack AMQP configurations in
  [DEFAULT] section of nova.conf, cinder.conf.

* adapt all affected code to the new config strategy

Implements: blueprint
https://blueprints.launchpad.net/powervc-driver/+spec/new-configuration-strategy-needed-to-adapt-to-oslo-messaging

Closes-Bug: 1356225
Change-Id: I61a4fd0c28148e31a8cb85acea3793f40028dfb4
2014-09-16 17:53:07 +08:00
Jerry Cai aef2b5095d Temp fix for powervc side volumes operation not synced to local
Openstack in cinder-powervc

Currently cinder service uses threading instead of eventlet's event,
This causes if you don't monkey patch threading, it will hang there
all the time. For detail, check this fix in incubator project:
https://github.com/openstack/oslo-incubator/commit/\
1e7007824374842bc8108dff5e5e2694e12932b2
Will create a bug to cinder to fix this. Temporarily fix is to replace
cinder service instead of nova service in 1365373.

Change-Id: Ibe770e51563f43495228d84dd6d0284a62bba9e8
Closes-Bug: #1365373
2014-09-04 17:29:27 +08:00
Terry Yao 1e8cddd0a7 fix the failure to start cinder-volume for powervc driver
PowerVC cinder driver __init__ does not call it's super's __init__,
and latest cinder driver change result in cinder-volume can not be
started due to this reason.

Closes-Bug: #1363846
Change-Id: I4743513b115fd02521fac546985981ea5197527c
2014-09-04 11:02:44 +08:00
Jerry Cai a41ee280aa The display name of volume which synchronized form PowerVC is None
To enhance the code to fetch volume display_name for latest PowerVC
If fetched "display_name" is empty then fetch "name" instead, if
still empty then just display local os as empty as previous.

Change-Id: I43161b50d153d9ed3750f8a2ea740c0dce633e35
Closes-Bug: #1363846
2014-09-02 15:50:34 +08:00
Eric_Zhao 5de8b9d735 Fix flake8 checking issue in powervc-driver and Unittest
There are some flake8 issues in each component that are not based
 on coding style rules .
And There are some unittest issues in some component that need to
 be fixed

Change-Id: Ic9a3f2c3b779ced225a42f69a495a606cb62517e
Closes-Bug: #1350160
2014-08-24 23:14:44 -04:00
Jerry Cai 25e1c6ee02 Fix cinder testcase error and flake8 issue
Fix these 2 issues:
1) Test fail error.
2) Flake8 issue

Change-Id: I72c116d1d7295672f1de5f39151424ed8b2a590f
Closes-Bug: #1347460
2014-07-24 13:38:11 +08:00
yinym 8f6cb9fd23 Fix flake8 warning and error report
All the flake8 issues have been resolved with this commit.

Change-Id: I637f82c484b3dbecc4827731a13f79c2ba2b9240
Closes-Bug: #1346759
2014-07-22 14:35:24 +08:00
Le Tian Ren bb7da09624 Fix copyright headline in the source files
Change-Id: Ie1b0dac8a8ec1e6d02217fe03159c78a69f6dc5d
Closes-Bug: #1317657
2014-05-09 13:05:20 +08:00
Le Tian Ren 5e1c266859 Initial code base commit.
Change-Id: Id1e336028fa662ddee865841ac7b6c31a316f854
Closes-Bug: #1317383
2014-05-08 22:00:29 +08:00