Skip to content

Instantly share code, notes, and snippets.

View j-griffith's full-sized avatar

John Griffith j-griffith

  • Bozeman, Montana
View GitHub Profile
--- a/cinder/volume/driver.py
+++ b/cinder/volume/driver.py
@@ -883,6 +883,42 @@ class FakeISCSIDriver(ISCSIDriver):
LOG.debug(_("FAKE ISCSI: %s"), cmd)
return (None, None)
+ def create_volume_from_snapshot(self, volume, snapshot):
+ """Creates a volume from a snapshot."""
+ pass
+
diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample
index 11603c7..9204aa7 100644
--- a/etc/cinder/cinder.conf.sample
+++ b/etc/cinder/cinder.conf.sample
@@ -2016,7 +2016,7 @@
#auth_uri=<None>
# Complete admin Identity API endpoint. This should specify
-# the unversioned root endpoint eg. https://localhost:35357/
+# the unversioned root endpoint e.g. https://localhost:35357/
diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample
index 11603c7..9204aa7 100644
--- a/etc/cinder/cinder.conf.sample
+++ b/etc/cinder/cinder.conf.sample
@@ -2016,7 +2016,7 @@
#auth_uri=<None>
# Complete admin Identity API endpoint. This should specify
-# the unversioned root endpoint eg. https://localhost:35357/
+# the unversioned root endpoint e.g. https://localhost:35357/
@j-griffith
j-griffith / 0_reuse_code.js
Created June 26, 2014 05:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
(.venv)jgriffith@railbender ~/git/cinder.review $ git diff etc/cinder/cinder.conf.sample
diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample
index d28c6f7..6aee4e8 100644
--- a/etc/cinder/cinder.conf.sample
+++ b/etc/cinder/cinder.conf.sample
@@ -458,6 +458,14 @@
#
+# Options defined in cinder.cmd.volume
ubuntu@devstack ~/devstack :( $ cinder service-list
+------------------+----------------------+------+----------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+----------------------+------+----------+-------+----------------------------+-----------------+
| cinder-scheduler | devstack | nova | enabled | up | 2014-08-06T18:23:46.000000 | None |
| cinder-volume | devstack@lvmdriver-1 | nova | disabled | up | 2014-08-06T18:23:50.000000 | None |
| cinder-volume | devstack@lvmdriver-2 | nova | enabled | up | 2014-08-06T18:23:50.000000 | None |
+------------------+----------------------+------+----------+-------+----------------------------+-----------------+
root@ostack-1 ~]# time qemu-img convert -O raw /tmp/tmpij5A53 /tmp/converted
real 0m11.167s
user 0m7.217s
sys 0m1.347s
[root@ostack-1 ~]# time dd if=/tmp/tmpij5A53 of=/dev/disk/by-path/ip-10.5.10.10\:3260-iscsi-iqn.2010-01.com.solidfire\:fssc.uuid-faba62c5-6fe3-47ef-880a-7743513789c6.2-lun-0
1770368+0 records in
1770368+0 records out
906428416 bytes (906 MB) copied, 2.23596 s, 405 MB/s
from (pid=9499) log_http_response /opt/stack/python-glanceclient/glanceclient/common/http.py:117
2014-08-07 09:45:34.730 ERROR cinder.volume.flows.manager.create_volume [req-b4f3a24c-2073-44e7-927a-87c8ba18fa66 0045a30cfd144af093fa2f25f9ad1039 69ad0ac8c7894fd1b94214a89734a572] Failed to copy image b2093e0c-6503-4ebf-b889-eed11a0871b2 to volume: c2b72115-505d-40d4-b3de-d64835abbc40, error: 'ContextAdapter' object has no attribute 'inf'
2014-08-07 09:45:34.736 WARNING cinder.volume.manager [req-b4f3a24c-2073-44e7-927a-87c8ba18fa66 0045a30cfd144af093fa2f25f9ad1039 69ad0ac8c7894fd1b94214a89734a572] Task 'cinder.volume.flows.manager.create_volume.CreateVolumeFromSpecTask;volume:create' (9e489fd8-1583-46e7-a697-3d212075fb42) transitioned into state 'FAILURE'
2014-08-07 09:45:34.736 TRACE cinder.volume.manager Traceback (most recent call last):
2014-08-07 09:45:34.736 TRACE cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/taskflow/engines/action_engine/executor.py", line 34, in _execute_task
201
check_uptodate.sh: cinder.conf.sample is not up to date.
check_uptodate.sh: Please run ./tools/config/generate_sample.sh from within a VENV.
\'source .venv/bin/activate; generate_sample.sh\'
OR simply run tox genconfig
\'tox -egenconfig\'
LOG.debug('Image fetch details: dest %(dest)s, size %(sz).2f MB, '
'duration %(duration).2f sec',
{'dest:': image_file.name, 'sz': fsz_mb, 'duration': duration})