SolidFire limited to 2K volumes per tenant

Bug #1460801 reported by John Griffith
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Unassigned

Bug Description

The SolidFire Cluster has a limit of 2K volumes per SolidFire account. Given that the SolidFire account maps directly to the OpenStack tenant this can be a limitation for some large scale deployers who may have tenants that wish to create more than 2K volumes in their OpenStack cloud.

Changed in cinder:
importance: Undecided → Medium
status: New → Triaged
Nate Potter (ntpttr)
Changed in cinder:
assignee: nobody → Nate Potter (ntpttr)
Revision history for this message
John Griffith (john-griffith) wrote :

Hi Nate,

I submitted a temporary fix for this here: https://github.com/openstack/cinder/commit/dc7e108bef45a6a88cb522d556ef00dc196eef92#diff-edd3b1109653835d85834f80ae3c9b2c

I'd be curious if you have other ideas/inputs.

Revision history for this message
Nate Potter (ntpttr) wrote :

Hi John,

I was just starting to look at this, and my initial idea for removing the limit was to remove self.max_volumes_per_accounts and the _get_account_create_availability method, since it looks like its purpose is to make sure the account doesn't go over the 2K limit. Then I wasn't sure if the primary and backup accounts would be necessary as the 2K limit would no longer be imposed on the primary account, so in the '_get_sfaccounts_for_tenant' method I changed it to return one account rather than the list of matching accounts. Because of this, whenever this code for finding the sf_account shows up:

sf_accounts = self._get_sfaccounts_for_tenant(volume['project_id'])
if not sf_accounts:
    sf_account = self._create_sfaccount(volume['project_id'])
else:
    sf_account = self._get_account_create_availability(sf_accounts)

I removed the else block, and just assigned 'sf_account = self._get_sfaccount_for_tenant(volume['project_id'])' rather than creating the 'sf_accounts' variable at the top, so that it gets the account if it exists and creates it if it doesn't, making it so that there's only ever one sf_account and the 2K limit is not imposed on it.

So that was pretty long winded, but it was pretty much my thought process at first glance of the problem. This is my first time looking at the SolidFire driver, so please tell me if some of those changes wouldn't work or wouldn't fit in to the architecture!

Nate Potter (ntpttr)
Changed in cinder:
assignee: Nate Potter (ntpttr) → nobody
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

John, is work still needed here? Or is the secondary account workaround sufficient?

Matt Smith (mss-4)
tags: added: drivers solidfire
Revision history for this message
Masaki Kanno (kanno-masaki) wrote :

Am I right?

--- ./a/solidfire.py 2017-10-19 17:07:47.290721165 +0900
+++ ./b/solidfire.py 2017-10-19 17:09:26.114723811 +0900
@@ -1000,8 +1000,8 @@ class SolidFireDriver(san.SanISCSIDriver
         # if it exists and return whichever one has count
         # available.
         for acc in accounts:
- if self._get_volumes_for_account(
- acc['accountID']) > self.max_volumes_per_account:
+ vols = self._get_volumes_for_account(acc['accountID'])
+ if len(vols) < self.max_volumes_per_account:
                 return acc
         if len(accounts) == 1:
             sfaccount = self._create_sfaccount(accounts[0]['name'] + '_')

Changed in cinder:
status: Triaged → Fix Released
Revision history for this message
John Griffith (john-griffith) wrote :

@Masaki,
Sorry, I hadn't seen this; YES you're proposal is correct! I'll submit it if you like, or if you wish to submit a patch I'm happy to review it. Thank you!

Revision history for this message
Masaki Kanno (kanno-masaki) wrote :

Hi John,

Would you be able to submit the patch?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.