nexenta driver doesn't report volume stats

Bug #1166607 reported by Aimon Bustardo on 2013-04-09
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Cinder
High
John Griffith
Grizzly
High
John Griffith

Bug Description

The nexenta driver doesn't implement the get_volume_stats function among possibly others. This means that volume creation will fail at the scheduler with the following:

2013-04-08 23:18:35 ERROR [cinder.scheduler.manager] Failed to schedule_create_volume: No valid host was found.

Need to add this functionality to the driver.

Aimon Bustardo (aimonb) on 2013-04-09
tags: added: nexenta
tags: added: drivers
Aimon Bustardo (aimonb) wrote :

See attached patch.

Chuck Short (zulcss) on 2013-04-11
Changed in cinder:
status: New → Confirmed
Aimon Bustardo (aimonb) wrote :

Fixed patch. I missed a line in last one.

Aimon Bustardo (aimonb) wrote :

This seems to be a more stable version.. It does not fetch real stats info. But it works.

Aimon Bustardo (aimonb) wrote :

Question: When I get stats from Nexenta as in my first patch with:

stats = self.nms.volume.get_child_props(FLAGS.nexenta_volume, 'health|size|used|available')

I sometimes get the error:

TypeError: can't multiply sequence by non-int of type 'float'

I suspect its due to the T,G appended in reponse from Nexenta. I logged values of those variable as comes from Nexenta:

2013-04-11 23:08:23 INFO [cinder.volume.drivers.nexenta.volume] Query Nexenta Stats Response: health: ONLINE, size: 3.62T, used: 1.65G, available: 2.67T

What measurement is Cinder expecting? Bytes? MB? GB? Thanks!

Aimon Bustardo (aimonb) wrote :

OK It appears to be GB. Attaching proper patch.

John Griffith (john-griffith) wrote :

Hi Aimon,

Thanks for doing most of the work on this and providing the patch. I've modified it slightly and am working on the unit test for it, one thing I was wondering; could you provide some insight as to what the get_child_props() call to Nexenta returns (to use in my Mock)?

I can probably piece it together but it would seem you have that info readily available :)

Changed in cinder:
assignee: nobody → John Griffith (john-griffith)
John Griffith (john-griffith) wrote :

Aimon,

Just noticed that you're a contributor, had you intended to submit this patch with unit tests? If so feel free to take ownership of the bug, I din't mean to jump in if you were intending to fix it.

Aimon Bustardo (aimonb) wrote :

Sure I can take it.. Will write the tests and submit.

Aimon Bustardo (aimonb) wrote :

On Second thought I see you have already done some fo the work. Go ahead and keep it.. child_props returns a dict/hash:

{health: 'ONLINE|OFFLINE|??', size: '<sIze>[G|T]', used: '<sIze>[G|T]', available: '<sIze>[G|T]'}

The most recent patch converts these to GB that Cinder expects. I have a mad workload atm so will appreciate any help you can give adding the missing tests and submitting this.

Aimon Bustardo (aimonb) wrote :

Note: I have not had anything smaller the G, it may very well return KB also if it gets small enough, The patch accounts for that but no smaller units.

Fix proposed to branch: master
Review: https://review.openstack.org/26869

Changed in cinder:
status: Confirmed → In Progress
tags: added: grizzly-backport-potential

Reviewed: https://review.openstack.org/26869
Committed: http://github.com/openstack/cinder/commit/781055bc1f30cebe08848130f3a40764f7f1bb4f
Submitter: Jenkins
Branch: master

commit 781055bc1f30cebe08848130f3a40764f7f1bb4f
Author: John Griffith <email address hidden>
Date: Fri Apr 12 11:11:38 2013 -0600

    Add stats reporting to Nexenta Driver

    Nexenta driver was never updated to report stats.
    This change doesn't include support for backend_name assignment
    via configs, there's some other work that will need to be
    done to enable that.

    Fixes bug: 1166607

    Change-Id: Id9cfff24df8815a67e42393aa18fd41ac1b9e6b3

Changed in cinder:
status: In Progress → Fix Committed

I am out of the office until 05/12/2013.

For technical issues regarding the Storwize/SVC Cinder driver, please
contact: Jie Ping Wu <email address hidden>, Li Min Liu <email address hidden>,
Ronen Kat <email address hidden>
For all other issue, please contact my manager, Dalit Naor
<email address hidden>

Note: This is an automated response to your message "[Bug 1166607] Re:
nexenta driver doesn't report volume stats" sent on 25/04/2013 7:39:43.

This is the only notification you will receive while this person is away.

Reviewed: https://review.openstack.org/28206
Committed: http://github.com/openstack/cinder/commit/2f72682bc2e8ab653c92b0fe61d50e2f8ee0ccff
Submitter: Jenkins
Branch: stable/grizzly

commit 2f72682bc2e8ab653c92b0fe61d50e2f8ee0ccff
Author: John Griffith <email address hidden>
Date: Fri Apr 12 11:11:38 2013 -0600

    Add stats reporting to Nexenta Driver

    Nexenta driver was never updated to report stats.
    This change doesn't include support for backend_name assignment
    via configs, there's some other work that will need to be
    done to enable that.

    Fixes bug: 1166607

    Change-Id: Id9cfff24df8815a67e42393aa18fd41ac1b9e6b3
    (cherry picked from commit 781055bc1f30cebe08848130f3a40764f7f1bb4f)

tags: added: in-stable-grizzly
removed: grizzly-backport-potential
Alan Pevec (apevec) on 2013-05-05
Changed in cinder:
importance: Undecided → High
tags: removed: in-stable-grizzly
Thierry Carrez (ttx) on 2013-05-29
Changed in cinder:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-1 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Patches