This patch implements the managed side of v2 replication in the HPE
3PAR driver.
Both sync and periodic replication modes are supported. Each
replication_device entry should have a replication_mode value set
to sync|periodic.
A volume type extra_spec value of replication:mode
should also be set. If replication:mode is periodic,
replication:sync_period should be set as well. Which replication_device
entry(s) are used is determined by the value of replication:mode set for
each volume type.
cinder.conf should have the replication config group (3parfcrep)
and at least one other target group (3parfc) as such:
[3parfcrep]
hpe3par_api_url = http://10.10.10.10:8008/api/v1
hpe3par_username = user
hpe3par_password = pass
hpe3par_debug = False
san_ip = 10.10.10.10
san_login = user
san_password = pass
volume_backend_name = 3parfcrep
hpe3par_cpg = REMOTE_COPY_CPG2
volume_driver = cinder.volume.drivers.hpe.hpe_3par_fc.HPE3PARFCDriver
replication_device = managed_backend_name:alex-devstack@3parfc#REMOTE_COPY_DEST2,
replication_mode:periodic,target_device_id:eos7,
cpg_map:REMOTE_COPY_CPG2:REMOTE_COPY_DEST2,
hpe3par_api_url:http://11.11.11.11:8008/api/v1,hpe3par_username:user,
hpe3par_password:pass,san_ip:11.11.11.11,san_login:user,
san_password:pass
[3parfc]
hpe3par_api_url = http://11.11.11.11:8008/api/v1
hpe3par_username = user
hpe3par_password = pass
hpe3par_debug = False
san_ip = 11.11.11.11
san_login = user
san_password = pass
volume_backend_name = 3parfc
hpe3par_cpg = REMOTE_COPY_DEST2
volume_driver = cinder.volume.drivers.hpe.hpe_3par_fc.HPE3PARFCDriver
Change-Id: Ie965349af719eaacc287a17c9720ad65464002c0
Implements: blueprint hp-3par-v2-replication
DocImpact
Cinder API v1 is deprecated so it feels good to test API v2 only to
decrease gating time.
Closes-Bug: #1523583
Change-Id: I91a233e8423ba878ed33b7d89812a416cbacdc95
As of this commit, the following tests should now be working with Python 3:
- cinder.tests.unit.api.contrib.test_cgsnapshots
- cinder.tests.unit.api.contrib.test_scheduler_hints
- cinder.tests.unit.api.contrib.test_snapshot_actions
- cinder.tests.unit.api.contrib.test_snapshot_manage
- cinder.tests.unit.api.contrib.test_snapshot_unmanage
- cinder.tests.unit.api.contrib.test_volume_encryption_metadata
- cinder.tests.unit.api.contrib.test_volume_host_attribute
- cinder.tests.unit.api.contrib.test_volume_manage
- cinder.tests.unit.api.contrib.test_volume_migration_status_attribute
- cinder.tests.unit.api.contrib.test_volume_tenant_attribute
- cinder.tests.unit.api.contrib.test_volume_unmanage
- cinder.tests.unit.api.v2.test_volumes
Most changes in this patch:
- make sure that Request.body is set to bytes;
- replace jsonutils.dumps with jsonutils.dump_as_bytes;
- replace json.loads with oslo_serialization.jsonutils.loads;
- replace dict.iteritems with dict.items.
Partial-Implements: blueprint cinder-python3
Change-Id: Icbb96ff84b7012b58f7296eea4fbcd620e081614
This patch introduces Coho Data volume driver along with unit tests.
Implements: blueprint coho-cinder-driver
DocImpact
Documentation for setting up the Coho driver and enabling it
in Cinder will be provided in a separate patch.
Change-Id: I06a66d10add9132d0f3afca054d68094ddfb4da0
Signed-off-by: Bardia Keyoumarsi <bardia.keyoumarsi@cohodata.com>
A couple config options sneaked in defined as strings but
really expecting integer values. This causes errors with the
latest oslo.config that expects the appropriate type.
This patch changes these instances to be the expected IntOpt.
Change-Id: I449c1f0057d6f4afabfb8b71040427dbcb0ca4ee
Previously in the generation of the opts.py file, the option groups
were hard coded. Now, they are pulled out as the lines are parsed.
If a group doesn't already exist in the dictionary it gets added and
then the options are added to the section. If the group already exists,
the options are added to the proper section as you would expect, and if
the options being registered don't have a group, they are added to the
default section.
This patch also moves the check for a non-zero exit code from
oslo-config-generator to the right location in the file. This
logic had been put too late in the file and was not catching
oslo-config-generator failures as it should have been.
Change-Id: I59c8067e8091d8bb212e3609f3a174ddc287707e
While building the initial volume access group solution I realized there were
race conditions present. This patch attempts to address those by being far
more careful during VAG creation and removal. Tracking multiattach volume
detaches around VAG volume removal introduced all sorts of future race
conditions so instead multiattach volumes are treated differently and are only
removed from VAGs on volume removal. Not ideal but it'll get the job done.
Think I covered all the new branches with unit tests. Complexity was introduced
but it should be worth it due to the safety that was also introduced.
Change-Id: I80034cdf759295c8d379c02ed9e42659590b41a9
The following patch updates migrate_volume,
migrate_volume_completion, and update_migrated_volume
APIs to use volume versionedobjects. Changes were
made to be backwards compatible with older RPC clients.
It only includes changes to the core cinder code.
Changes in the drivers are left to each driver
maintainer to update.
Note that this patch DOES NOT try to use object dot
notation everywhere, since it would increase the
size of the patch. Instead, it will be done in
subsequent patches.
Change-Id: I21fe68193c934a7ef3688274ab35f664a08cac7e
Partial-Implements: blueprint cinder-objects
Closes-Bug: #1521085
Earlier, quotas used to authenticate to endpoint from not required
option located in keymgr.encryption_auth_url. Now, the required
auth_uri option from config file is used to authenticate to
keystone.
Co-Authored-By: Michal Dulko <michal.dulko@intel.com>
Change-Id: I1076527704f8def2c6755c060df49232e5ebe805
Closes-Bug: 1516085
With the current code, it's possible to end up with a zero-size
persistence file (or even corruption of the contents) if the
process gets killed or the system takes a power outage.
Switch to a "write to temp file and rename" model for writing the
persistence file. This will make it more robust against unclean
process termination or unclean system shutdown.
Change-Id: Ic4fdb5a9f6f622b2ab9658f7d4206e4c8ca55046
Closes-Bug: #1499795
This adds a description of the generation of opts.py and
cinder.conf.sample, the commands to generate them, and the scripts
that do the work generating them.
Change-Id: I6217e81acb9ee49c66cd510d55b40e1fd6fc3b3b
If there is a mismatch in case between the stored
initiator IQN in the LIO ACL vs. the IQN provided
in a later call, rtstool would fail to find the
existing ACL.
Compare IQNs in a case insensitive manner to ensure
they will always match as intended. (Refer to RFC
3720 section 3.2.6.1 for details on this.)
Closes-Bug: #1522053
Change-Id: I6f535f3f4fbfcbbb49da30cffb08d17b3cac778a
The key 'multipath' was being referenced in the 'connector' dictionary
in initialize_connection(), even though the key was not always set.
Change-Id: Ia3c7640a24ebe9bedec3402f6cefb7e457c66ecd
Closes-Bug: #1522062
This patch replaces usages of mox with mock in the VMDK driver unit tests.
It also refactors the unit tests for copy_volume_to_image so that those
tests test only a single method.
Closes-Bug: #1261097
Change-Id: I50925a3aed1df12a283e9ec20f2bc2add1aad162
There are cases where a single test tests multiple methods. This
patch refactors the unit tests for the following methods in the
vmdk module to fix this issue:
* _create_virtual_disk_from_preallocated_image
* _create_virtual_disk_from_sparse_image
* _fetch_stream_optimized_image
There will be follow-up patches to fix the remaining unit tests.
Change-Id: I6b738f08b89e518c78a26a934fead42cc86e0c24
Depends-On: Icd2c3d506647b7b9405d83612433fea735d13cc9
There are cases where a single test tests multiple methods. This
patch refactors the unit tests for the following methods in the
vmdk module to fix this issue:
* copy_image_to_volume
* _create_volume_from_non_stream_optimized_image
There will be follow-up patches to fix the remaining unit tests.
Change-Id: Icd2c3d506647b7b9405d83612433fea735d13cc9
The LVMISCSIDriver and LVMISERDrivers were deprecated in the Kilo
release. This removes both drivers and related test code.
Any existing users of LVMDriver should switch to using the
LVMVolumeDriver and set the iscsi_helper to the desire iSCSI helper
(tgtadm, lioadm, or iseradm).
Some unit tests under these driver test classes were not actually
specific to these drivers. Relevant unit tests were moved to a
different test class if they looked useful.
Change-Id: I30aec59e639cdbbb50daa2caacc243518e593418
Before rbd.retype is called, encryption and host have
been checked so that encryptions are different and
host are same.
Meanwhile, as extra_spec is not used during the
rbd driver. As a result, even if they are different
rbd.retype can still return True which means no need
to do further migration.
Change-Id: Id025a51631676389203b8e3892a5826c834105ca
Closes-Bug: #1515493
Closes-Bug: #1514775