summaryrefslogtreecommitdiffstats
path: root/nova/volume
Commit message (Collapse)AuthorAgeFilesLines
* Fix hacking N302 import only modulesJoe Gordon2013-01-241-2/+2
| | | | | | | | * Includes some general tools/hacking cleanup * Fix several N302 cases * Disable N302 until all cases are fixed Change-Id: Iddba07ff13e10dc41a6930749044bb8c0572d279
* Allow nova to use insecure cinderclient.Cory Stone2013-01-161-0/+4
| | | | | | | | Add an option cinder_api_insecure to pass on to cinderclient. Bug 1100459 Change-Id: Ifb31cc0df48d2345fa0a6ec440bdf9685254cbcd
* Adds a flag to allow configuring a regionRohit Karajgi2013-01-091-1/+13
| | | | | | | | | | If multiple regions contain an endpoint, extract the correct endpoint URL from the os_region_name parameter in nova.conf Fixes LP Bug #1087735 Change-Id: Id4e4f56f336cd2b092a173b3c8e695b173c76f2a
* Move api_class options to where they are usedMark McLoughlin2013-01-091-0/+9
| | | | | | | | The compute_api_class, network_api_class and volume_api_class options are only used in their respective modules, so move them there. blueprint: scope-config-opts Change-Id: Ib0497f46b44c4b3af7319550cc64c09d629ea362
* Support cinderclient http retries.Cory Stone2013-01-071-1/+5
| | | | | | | | HTTP retries were recently added to cinderclient. This adds the config option required to use it. The default (unchanged) behavior is 0 retries. Change-Id: Ia7ad831045e8df9ad9c22f0119ae3485d91ad949
* Extract image metadata from CinderNikola Dipanov2012-12-191-0/+4
| | | | | | | | | | | | | | | | This patch makes nova extract image metadata if it is present in the volume dict received from Cinder API. The volume image metadata is received from Cinder when the volume_image_metadata Cinder extension is loaded. This patch is part of the work done on blueprint improve-boot-from-volume as this metadata will be used when booting instances from volumes without the need to supply an image just for the metadata. Subsequent patches will make Nova consider this metadata when booting instances without and image id. Change-Id: I9e5925ea4147a41c41f9019933a47c5ccf756747
* Fixed deleting instance booted from invalid volUnmesh Gurjar2012-12-141-2/+19
| | | | | | | | | | 1. Translated the exception (NotFound) raised from Cinder client to Nova's native exception (VolumeNotFound). 2. Added unit test coverage. Fixes LP: #1087214. Change-Id: I3cee31a9fd068b65a4097f3f3054aebb69d9ba61
* Remove nova.config.CONFMark McLoughlin2012-11-202-4/+4
| | | | | | | | | | | | | | | Modules import nova.config for two reasons right now - firstly, to reference nova.config.CONF and, secondly, if they use one of the options defined in nova.config. Often modules import nova.openstack.common.cfg and nova.config which is a bit pointless since they could just use cfg.CONF if they just want to nova.config in order to reference CONF. Let's just use cfg.CONF everywhere and we can explicitly state where we actually require options defined in nova.config. Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
* Remove nova.flagsMark McLoughlin2012-11-172-2/+0
| | | | | | | | Now that options have all moved from nova.flags to nova.config, we can safely remove the nova.flags imports and replace them with nova.config imports. Change-Id: Ic077a72dd6419bbf1e1babe71acfa43c4e8b55c8
* Remove volume.driver and volume.iscsiJoe Gordon2012-11-122-1189/+0
| | | | | | | | Remaining flags moved to nova.virt.libvirt.volume Part of bp delete-nova-volume Change-Id: I1b96c773f0b5df73b04215a4afb350a5583b0101
* Fix misuse of exists()Yun Mao2012-11-121-1/+1
| | | | | | | | Should be os.path.exists not os.exists Part of bug 1078062 Change-Id: I8126c496b3089ab65ce3b8c7fdcd84944b8e259f
* Switch from FLAGS to CONF in misc modulesMark McLoughlin2012-11-044-59/+63
| | | | | | | | | | | Use the global CONF variable instead of FLAGS. This is purely a cleanup since FLAGS is already just another reference to CONF. We leave the nova.flags imports until a later cleanup commit since removing them may cause unpredictable problems due to config options not being registered. Change-Id: Ib110ba8d1837780e90b0d3fe13f8e6b68ed15f65
* removes the nova-volume code from novaVishvananda Ishaya2012-10-2814-5980/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the majority of the nova-volume code from the codebase. It updates relevent config options to default to cinder. It updates a number of existing tests that were depending on code that was removed. A few things still need to be removed: * volume/driver.py & volume/iscsi.py These files are used by the libvirt volume driver tests. These tests should be updated to mock the relevant calls. * scheduler/simple.py & scheduler/multi.py These files should no longer be necessary so they can be removed in a subsequent patch * exception.py cleanup Once the above files are removed there are a number of unused exceptions which can be removed * database calls and database tables The database calls have not been removed and the tables have not been dropped. This can be done in a separate migration * additional config options and nova.conf.sample There may be a few extra config options that can be removed and the conf sample can be regenerated Implements bp delete-nova-volume Change-Id: I0b540e54dbabd26901a7530035a38583bb521fda
* Merge "Migrate to fileutils and lockutils."Jenkins2012-10-261-1/+2
|\
| * Migrate to fileutils and lockutils.Michael Still2012-10-251-1/+2
| | | | | | | | | | | | | | Migrate nova to using openstack-common's file and lock utilities. Resolves bug 1063230. Change-Id: I1a4c87856bc08cd33b61d7098ed856baa4583654
* | SanISCSIDriver SSH execution fixes.Yuriy Taraday2012-10-231-3/+5
|/ | | | | | | | | | | | | | | | In ssh_execute methon in nova/utils there was a problem with cmd passed to it. From SanISCSIDriver and all other places it is called from cmd is a string. But in ssh_execute method cmd was processed as a list. This can make problems with SanISCSIdriver using. Also it may be useful to pass execute parameter to this SanISCSIDriver class to have the opportunity of overriding _execute method (as it is in VolumeDriver class, that is the root of this class hierarchy). That's why special checking was added. Fixes bug 1070489 Change-Id: I73f74f9d095a2c4316cab88148afe6a0bde44c5b
* remove deprecated connection_type flagSean Dague2012-10-011-2/+3
| | | | | | | | | | | | | | | Fixes bug #1025712 connection_type was deprecated in Folsom and should now be removed in Grizzly as early as possible to shake out any fallout. This removes all references to it, changes the config sample and tests appropriately. Remove old default fixtures for flavors that specify ephemeral disks if the connection_type flag was set to 'libvirt' Change-Id: I8af831600a1931ae92c6d06c5105bd1bd81debe3
* Replaced default hostname function from gethostname to getfqdnLuis Fernandez Alvarez2012-09-261-4/+4
| | | | | | | | | | | | | | Fixes bug 1055503 The standard behaviour of the 'gethostname' function in Python differs from Linux to Windows. A common Linux configuration returns the FQDN, while a Windows one returns only the host name. To resolve inconsistent node naming in deployments that mix windows and Linux, it is proposed to use 'getfqdn' as default function instead of 'gethostname'. This is function is more predictable in all cases. Change-Id: I3164d9a36df2b8484bbf9a57879c31fa0e342503
* Merge "Fixes remove_export for IetAdm"Jenkins2012-09-262-6/+4
|\
| * Fixes remove_export for IetAdmMotoKen2012-09-252-6/+4
| | | | | | | | | | | | | | | | | | * Corrects indentation. * Uses specific iqn as keyword argument. Fixes bug 1055401 Change-Id: I1267be37a7e7adcd2a18ffb719326c5f68296523
* | Merge "Fix NetAppCmodeISCSIDriver._get_lun_handle() method"Jenkins2012-09-251-1/+1
|\ \
| * | Fix NetAppCmodeISCSIDriver._get_lun_handle() methodBen Swartzlander2012-09-241-1/+1
| |/ | | | | | | | | | | bug 1055578 Change-Id: I06da6a9a59fa2320f1cae9698e5e63562e534916
* | Merge "Revert explicit usage of tgt-adm --conf option."Jenkins2012-09-251-3/+5
|\ \
| * | Revert explicit usage of tgt-adm --conf option.Eoghan Glynn2012-09-251-3/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | Fixes bug 1056246. Reverts commit 0a09bf5faeb30b675fdb8f517c61166ef794bad3. This ensures that we fail-fast if the tgtd configuration does not include the directory for volume iscsi target configs, instead of only blowing up when tgtd is restarted. Change-Id: I3c9f0d97e411560e5c0fd058671f8c834e9bed1e
* | Merge "Fix config opts for Storwize/SVC volume driver."Jenkins2012-09-251-60/+44
|\ \ | |/ |/|
| * Fix config opts for Storwize/SVC volume driver.Avishay Traeger2012-09-211-60/+44
| | | | | | | | | | | | | | | | | | | | | | Removed the "vtype" option which did not work in the driver, and added the "easytier" option. Added another check to _check_flags and made sure -warning flag is passed properly. Added unit tests to check all option variations. Fixes bug 1049446. Change-Id: I135ed85ad1b9d60e6a8cc406aa49360e0f080039
* | Merge "Fixes to the SolarisISCSI Driver"Jenkins2012-09-211-6/+5
|\ \
| * | Fixes to the SolarisISCSI DriverYosef Berman2012-09-201-6/+5
| |/ | | | | | | | | | | | | | | | | | | Even when the san_is_local config option was set to false, the SolarisISCSIDriver's _execute method was accidentally set to util.execute by the VolumeDriver's __init__ method. Fix bug 1053041 Change-Id: Ifd8436874759d75633da3dbbfa01bd99f979ddea
* / Add lun number (0) to model_update in HpSanDriverJohn Griffith2012-09-201-2/+5
|/ | | | | | | | | | | The HpSanDriver was not setting the lun number in model_update and as a result default value of 1 was being used. Trouble is the Lun number used by LeftHand is 0, so the connect info would be wrong and fail when trying to attach the volume. Fixes bug #1053717 Change-Id: I2391db062dff35365030e33c3eb0569fdd397949
* Merge "Fix solidfire option declaration"Jenkins2012-09-201-3/+3
|\
| * Fix solidfire option declarationMark McLoughlin2012-09-201-3/+3
| | | | | | | | | | | | | | | | Fixes bug #1053427 The sf_allow_tenant_qos option is a boolean, not a string. Change-Id: I7d1e8c7e8f545710314395c91e269f08cc110c36
* | Replace builtin hash with MD5 to solve 32/64-bit issues.Ben Swartzlander2012-09-191-2/+2
| | | | | | | | | | | | | | | | | | | | It seems that Python's builtin hash returns different values on 32-bit and 64-bit architectures, so it's safer to use a well-defined hash like MD5. bug 1050359 Change-Id: Ibb49f7b9028085d2aedaf05b94e1e1dcdf5e4cb4
* | Correct IetAdm remove_iscsi_targetMotoKen2012-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | Remove logical units should be done before delete the target while unexport iSCSI volume. Or ietd will show "No such file or directory" error. Fix bug 1043107 Change-Id: I06ac561898dbcee078c807ea5368c03e558b4fa9
* | Update quota when deleting volume that failed to be scheduledZhiteng Huang2012-09-182-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If one volume was failed to get scheduled, removing such volume should also clean up reservation. Also when create_volume is ready to send to scheduler, reservation should be committed no matter backend can successfully create that volume or not since deleting volume call will do a minus reservation even on volume with 'error' status. This change updates RPC API to version 2.2 Fix bug 1052052 Change-Id: Ia632a0e49318d534f0acbd3df5c9f6bb86eefa2a
* | add ability to clone imagesJosh Durgin2012-09-182-7/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the backend location from Glance, drivers can determine whether they can clone or otherwise efficiently create a volume from the image without downloading all the data from Glance. For now implement cloning for the RBD driver. There's already a Glance backend that stores images as RBD snapshots, so they're ready to be cloned into volumes. Fall back to copying all the data if cloning is not possible. Implements: blueprint efficient-volumes-from-images Signed-off-by: Josh Durgin <josh.durgin@inktank.com> Conflicts: nova/volume/api.py nova/volume/driver.py This is based on a cherry-pick of cinder commit edc11101cbc06bdce95b10cfd00a4849f6c01b33 Change-Id: I71a8172bd22a5bbf64d4c68631630125fcc7fd34
* | Adds new volume API extensionsUnmesh Gurjar2012-09-184-21/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds following extensions: 1. Create volume from image 2. Copy volume to image Added unit tests. Implements: blueprint create-volume-from-image Conflicts: cinder/api/openstack/volume/contrib/volume_actions.py cinder/tests/api/openstack/fakes.py cinder/tests/api/openstack/volume/contrib/test_volume_actions.py cinder/tests/policy.json nova/api/openstack/volume/volumes.py nova/flags.py nova/tests/api/openstack/volume/test_volumes.py nova/tests/test_volume.py nova/utils.py nova/volume/api.py nova/volume/manager.py This is based on a cherry-pick of cinder commit 2f5360753308eb8b10581fc3c026c1b66f42ebdc with bug fixes 8c30edff982042d2533a810709308b586267c0e9 and ffe5036fa0e63ccde2d19aa0f425ec43de338dd7 squashed in. Change-Id: I9c73bd3fa2fa2e0648c01ff3f4fc66f757d7bc3f
* | Merge "Fix volume deletion when device mapper is used"Jenkins2012-09-181-0/+4
|\ \
| * | Fix volume deletion when device mapper is usedRafi Khardalian2012-09-171-0/+4
| |/ | | | | | | | | | | | | | | | | Call dmsetup remove if there is a /dev/mapper/nova--volumes- element present. Resolves bug 979020 Change-Id: Iddaaed411a77dda4bd32f9a97687ff17744119eb
* / Add admin actions extensionClay Gerrard2012-09-141-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The optional os-admin-actions extension adds new wsgi_actions to the volumes/action resource and a new snapshots/action endpoint. With this extension both controllers will support an os-reset_status action to force a database update of a volume or snapshot that is stuck in a failed/incorrect status. The os-reset_status action works similarly to the compute api's os-reset_state action for instances. The os-force_delete action behaves similarly to the "cinder-manage volume delete" command and allows operators/admins to retry the delete operation after it has gone into an error_deleting status with an admin api call. The os-admin-actions extension is enabled by default, but limited to the admin api by the default policy.json rules. Individual admin actions can be disabled with policy rules as well. Example of os-reset_status action on a volume: curl http://localhost:8776/v1/${PROJECT_ID}/volumes/${VOLUME_ID}/action \ -H "x-auth-token: ${ADMIN_AUTH_TOKEN}" \ -H 'content-type: application/json' \ -d '{"os-reset_status": {"status": "error"}}' The new admin only api can assist deployers who encounter bugs or operational issues that result in failed actions. It can also be used by future storage backends to support async callback style status updates from long running actions or operations which have encountered an error will be retried. Also updates the api.openstack.wsgi.ControllerMetaclass to support sub-classing wsgi.Controllers that define wsgi_actions. Partial fix for bug #1039706 Change-Id: If795599d5150dea362279d75a75276f3166d0149
* Add a resume delete on volume manager startupJohn Griffith2012-09-131-0/+6
| | | | | | | | | | | | | | | Currently if for some reason the volume service was stopped during the zero out operation of a volume delete there was no way to get the volume removed from the system (it would be present in deleting status forever). This change adds a simple check of volumes in the DB with status of deleting, and if any are found it restarts the delete process on them. addresses bug #1011150 Change-Id: I6aa26e9eaa94da4b620f01160931cbfcad9dadf7
* Merge "Backport changes from Cinder to Nova-Volume"Jenkins2012-09-133-0/+854
|\
| * Backport changes from Cinder to Nova-VolumeBen Swartzlander2012-09-123-0/+854
| | | | | | | | | | | | | | | | | | | | | | | | | | | | NetApp C-mode driver. Generic NFS-based block device driver. NetApp NFS-based block device driver. blueprint netapp-volume-driver-cmode blueprint nfs-files-as-virtual-block-devices blueprint netapp-nfs-cinder-driver bug 1037619 bug 1037622 Change-Id: I513c3f88bcb03f3b71a453f92f5912d7730a8bbc
* | Merge "Add reservations parameter when cast "create_volume" to volume manager"Jenkins2012-09-131-1/+2
|\ \
| * | Add reservations parameter when cast "create_volume" to volume managerRongze Zhu2012-09-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug #1050192 Add reservations parameter when _cast_create_volume cast "create_volume" to volume manager. So VolumeManager.create_volume() can commit the reservations in volume quota. Change-Id: I8f3104d53bde55d4d83f39253869cc78a8511750
* | | Merge "Fix FLAGS.volumes_dir help message"Jenkins2012-09-131-3/+3
|\ \ \ | |/ / |/| |
| * | Fix FLAGS.volumes_dir help messageJoe Gordon2012-09-121-3/+3
| | | | | | | | | | | | | | | | | | And other nova/volume/iscsi.py typos Change-Id: I08e7d4379f6a455273df999b621f8a89e73e0aef
* | | Merge "Add flag cinder_endpoint_template to volume.cinder"Jenkins2012-09-131-7/+16
|\ \ \
| * | | Add flag cinder_endpoint_template to volume.cinderClay Gerrard2012-09-101-7/+16
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add optional flag to allow cinder endpoint to be defined by flag rather than extracted from the request context's service catalog. No change to default behavior. This flag allows deployers to use a seperate management endpoint for cinder which compute can use exclusively to send messages to cinder, or just use an auth system that doesn't add/forward the catalog along with the request (e.g. noauth). Add python-cinderclient to tools/test-requires fix lp bug #1048798 Change-Id: Icb416bf4df2a6e37024f1fbc866006d46d30bcf2
* | | Merge "Update SolidFire volume driver"Jenkins2012-09-132-244/+424
|\ \ \
| * | | Update SolidFire volume driverJohn Griffith2012-09-092-244/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements blueprint update-solidfire-driver * Updates driver to reflect changes in the release version of SF API * Modify SF naming scheme * Implement snapshot functionality * Implement setting qos on create via metadata * Update/Add tests (cherry picked from cinder commit df5c4ba) Change-Id: I08f7aac31e9d95f971d297a19c285dfa7151b931