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
@@ -386,10 +386,15 @@ class LVMISCSIDriver(LVMVolumeDriver, driver.ISCSIDriver):
# NOTE(jdg): For TgtAdm case iscsi_name is the ONLY param we need
# should clean this all up at some point in the future
- self.tgtadm.create_iscsi_target(iscsi_name, iscsi_target,
- 0, volume_path, chap_auth,
- check_exit_code=False,
- old_name=old_name)
+ if old_name is None:
+ self.tgtadm.create_iscsi_target(iscsi_name, iscsi_target,
#!/usr/bin/env bash
# This little script is to make backporting patches easier.
# Instructions
# ------------
# Make sure that <btranch> exists:
# git branch -D <branch>
# git checkout -b <branch> origin/<branch>
# Grab the file and stick it in your <project> directory:
# curl -OL https://raw.github.com/gist/2206428/bp.sh
# Make sure the script is runnable:
class VolumeQOSSpecs(BASE, CinderBase):
"""Represents qos specs as key/value pairs for a volume_type."""
__tablename__ = 'volume_type_qos_specs'
id = Column(Integer, primary_key=True)
key = Column(String(255))
value = Column(String(255))
volume_type_id = Column(String(36),
ForeignKey('volume_types.id'),
nullable=False)
volume_type = relationship(
vagrant@precise64 /opt/stack/cinder/cinder/volume/drivers $ git diff
diff --git a/cinder/brick/local_dev/lvm.py b/cinder/brick/local_dev/lvm.py
index 0037632..645698d 100644
--- a/cinder/brick/local_dev/lvm.py
+++ b/cinder/brick/local_dev/lvm.py
@@ -626,3 +626,22 @@ class LVM(executor.Executor):
LOG.error(_('StdOut :%s') % err.stdout)
LOG.error(_('StdErr :%s') % err.stderr)
raise
+
@j-griffith
j-griffith / essex-solidfire-snapshots
Created March 11, 2014 23:42
Add snapshot support to OpenStack/Essex (old san.py driver)
diff --git a/nova/volume/san.py b/nova/volume/san.py
index 95627ff..4fba255 100644
--- a/nova/volume/san.py
+++ b/nova/volume/san.py
@@ -32,6 +32,7 @@ import string
import uuid
from xml.etree import ElementTree
+from nova import context
from nova import exception
@j-griffith
j-griffith / gist:10433007
Created April 10, 2014 23:55
Fix timing issue in iqn set on create-from-snapshot in Essex
➜ mercado diff san.py ~/Downloads/san.py
32d31
< import time
962c961
<
---
> volume_list = self._get_volumes_by_sfaccount(sf_account['accountID'])
964,974c963,966
< while iqn is None:
< volume_list = self._get_volumes_by_sfaccount(sf_account['accountID'])
diff --git a/cinder/api/contrib/admin_actions.py b/cinder/api/contrib/admin_actions.py
index 4dbf736..65a55a6 100644
--- a/cinder/api/contrib/admin_actions.py
+++ b/cinder/api/contrib/admin_actions.py
@@ -43,6 +43,22 @@ class AdminController(wsgi.Controller):
'error_deleting',
])
+ #TODO(jdg): Valid status items
+ valid_attach_status = set([
#!/bin/bash
ip_suffix=$1
X=( $(grep -r HWADDR /etc/sysconfig/network-scripts/ifcfg-*) )
for line in "${X[@]}"
do
if [[ $line == *em1* ]]; then
em1_hwaddr=$(echo $line | cut -f2 -d=)
https://gist.github.com/e1a175ecd6729b51ab71
diff --git a/cinder/api/contrib/admin_actions.py b/cinder/api/contrib/admin_actions.py
index 2766d35..5aa9bcb 100644
--- a/cinder/api/contrib/admin_actions.py
+++ b/cinder/api/contrib/admin_actions.py
@@ -33,13 +33,10 @@ class AdminController(wsgi.Controller):
collection = None # api collection to extend
- # FIXME(clayg): this will be hard to keep up-to-date
- # Concrete classes can expand or over-ride