This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo truncate --size=10G cinder-volumes.img | |
# Get next available loop device | |
LD=$(sudo losetup -f) | |
sudo losetup $LD cinder-volumes.img | |
sudo sfdisk $LD << EOF | |
,,8e,, | |
EOF | |
sudo pvcreate $LD | |
sudo vgcreate cinder-volumes $LD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
######################################################################## | |
# Script: CreateAttachSFVol.bash | |
# Author: John Griffith ([email protected]) | |
# | |
# Simple script to: | |
# 1. Create a volume on a SolidFire Cluster | |
# 2. Add volume to an existing Access Group (by ID) | |
# 3. Issue iscsi discovery on the newly created volume |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
log "github.com/Sirupsen/logrus" | |
"github.com/solidfire/solidfire-sdk-golang/sfapi" | |
"github.com/solidfire/solidfire-sdk-golang/sftypes" | |
"strings" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cinder/api/v3/attachments.py b/cinder/api/v3/attachments.py | |
index 120f6f9..2e31dbd 100644 | |
--- a/cinder/api/v3/attachments.py | |
+++ b/cinder/api/v3/attachments.py | |
@@ -18,6 +18,7 @@ import webob | |
from cinder.api import common | |
from cinder.api.openstack import wsgi | |
from cinder.api.v3.views import attachments as attachment_views | |
+from cinder import db | |
from cinder import exception |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/storage_drivers/solidfire_san.go b/storage_drivers/solidfire_san.go | |
index b8807fd..47a5d20 100644 | |
--- a/storage_drivers/solidfire_san.go | |
+++ b/storage_drivers/solidfire_san.go | |
@@ -557,3 +557,34 @@ func (d *SolidfireSANStorageDriver) GetVolume(name string) (sfapi.Volume, error) | |
} | |
return vols[0], nil | |
} | |
+ | |
+// UpdateAttachmentCounter is used for ref counting attachments to a volume. Valid options for action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
'driver_volume_type': 'iscsi', | |
'connector': | |
{ | |
'platform': 'x86_64', | |
'host': 'os-1', | |
'do_local_attach': False, | |
'ip': '192.168.33.29', | |
'os_type': 'linux2', | |
'multipath': False, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def upgrade(migrate_engine): | |
meta = MetaData(bind=migrate_engine) | |
services = Table('services', meta, autoload=True) | |
if not hasattr(services.c, 'uuid'): | |
services.create_column(Column('uuid', String(36), nullable=True)) | |
uuid_index_name = 'services_uuid_idx' | |
indexes = Inspector(migrate_engine).get_indexes('services') | |
if uuid_index_name not in (i['name'] for i in indexes): | |
services = Table('services', meta, autoload=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cinder/objects/service.py b/cinder/objects/service.py | |
index a1706184f..bbb648581 100644 | |
--- a/cinder/objects/service.py | |
+++ b/cinder/objects/service.py | |
@@ -12,6 +12,8 @@ | |
# License for the specific language governing permissions and limitations | |
# under the License. | |
+from oslo_log import log as logging | |
+from oslo_utils import uuidutils |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################## | |
# Cinder V3.27 attach API response | |
################################################## | |
# attachment_create (returns a dict) | |
{ | |
'status': 'reserved', | |
'detached_at': '', | |
'connection_info': {}, | |
'attached_at': '', | |
'attach_mode': None, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cinder/volume/drivers/solidfire.py b/cinder/volume/drivers/solidfire.py | |
index 34da2e8..c44975a 100644 | |
--- a/cinder/volume/drivers/solidfire.py | |
+++ b/cinder/volume/drivers/solidfire.py | |
@@ -1436,8 +1436,19 @@ class SolidFireDriver(san.SanISCSIDriver): | |
return | |
for acc in accounts: | |
+ # NOTE(jdg): migration is a special case, when migrating | |
+ # *from* a device the volume needs to be accessed by the |