Adding host attaching support to Cinder

Bug #1193770 reported by OpenStack Infra
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
Medium
Atsushi SAKAI

Bug Description

https://review.openstack.org/#/c/34125/
commit e8fc695fdd831e058a745607e873e14bef188f22
Author: Zhi Yan Liu <email address hidden>
Date: Mon Jun 17 05:17:45 2013 +0800

    Adding host attaching support to Cinder

    Changing 'os-attach' API interface to allow client mark a volume as be
    attached to a host.

    Implement bp: volume-host-attaching
    docimpact

    Change-Id: Iaf442ad0fb37ce369d838f3a512724f830071763
    Signed-off-by: Zhi Yan Liu <email address hidden>

Tags: volume-api
Tom Fifield (fifieldt)
tags: added: cinder
Changed in openstack-manuals:
milestone: none → havana
description: updated
Tom Fifield (fifieldt)
Changed in openstack-manuals:
status: New → Confirmed
importance: Undecided → Medium
Tom Fifield (fifieldt)
Changed in openstack-api-site:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → havana
Tom Fifield (fifieldt)
no longer affects: openstack-manuals
Changed in openstack-api-site:
assignee: nobody → Diane Fleming (diane-fleming)
Revision history for this message
Diane Fleming (diane-fleming) wrote :

I need more information: Is os-attach a cinder extension or a nova extension?

What's the syntax? Are there code samples?

thanks.

Changed in openstack-api-site:
status: Confirmed → Incomplete
Revision history for this message
Diane Fleming (diane-fleming) wrote :

backport: havana

Changed in openstack-api-site:
milestone: havana → icehouse
Revision history for this message
Tom Fifield (fifieldt) wrote :

Diane, this is an automatically created bug - so to get the answer, you'll need to email the address listed in the bug report.

Revision history for this message
Diane Fleming (diane-fleming) wrote :

Note to <email address hidden> <email address hidden> 12/2/13:

Zhi,

I'm working on bug 1193770 (https://bugs.launchpad.net/openstack-api-site/+bug/1193770), but I need more information:

Is os-attach a cinder extension or a nova extension?

What's the syntax? Are there code samples?

thanks.

Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :

Diane,

1. os-attach is a cinder extension.
2. the only syntax is "host_name", and client can pass a host name string via it.

thanks.

Tom Fifield (fifieldt)
Changed in openstack-api-site:
status: Incomplete → Confirmed
Tom Fifield (fifieldt)
tags: added: volume-api
removed: cinder
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to api-site (master)

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

Changed in openstack-api-site:
status: Confirmed → In Progress
Revision history for this message
Diane Fleming (diane-fleming) wrote :

Note to <email address hidden> <email address hidden> 4/22/2014

Zhi,

I need a little more information about this bug -

You wrote:

os-attach is a cinder extension.
the only syntax is "host_name", and client can pass a host name string via it.
However, on which call can a client pass a host_name?

create volume (cinder create)?

attach volume (nova volume-attach)?

something else?

Thanks!

Changed in openstack-api-site:
status: In Progress → Incomplete
Revision history for this message
Diane Fleming (diane-fleming) wrote :

I still cannot figure out how this works. Not anywhere in the cinder client - I need more information.

Changed in openstack-api-site:
assignee: Diane Fleming (diane-fleming) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on api-site (master)

Change abandoned by Diane Fleming (<email address hidden>) on branch: master
Review: https://review.openstack.org/89284
Reason: abandoning - cannot figure out how this works

Tom Fifield (fifieldt)
Changed in openstack-api-site:
milestone: icehouse → kilo
Tom Fifield (fifieldt)
Changed in openstack-api-site:
milestone: kilo → liberty
Revision history for this message
Atsushi SAKAI (sakaia) wrote :

Let me clearify

os-attach uses
volume_api.attach
https://github.com/openstack/cinder/blob/stable/kilo/cinder/api/contrib/volume_actions.py#L118

volume_api uses self.volume_api = volume.API()
https://github.com/openstack/cinder/blob/stable/kilo/cinder/api/contrib/volume_actions.py#L76

volume uses "from cinder import volume"
https://github.com/openstack/cinder/blob/stable/kilo/cinder/api/contrib/volume_actions.py#L28

I am looking around the code and found API().
https://github.com/openstack/cinder/blob/stable/kilo/cinder/volume/__init__.py

And its default parameter is API()=cinder.volume.api.API
http://docs.openstack.org/kilo/config-reference/content/section_cinder.conf.html

So In API, attach_volume is called. So I am wondering attach_volume meaning in #7
since cinder volume attach is not commented in #7

Revision history for this message
Atsushi SAKAI (sakaia) wrote :
Atsushi SAKAI (sakaia)
Changed in openstack-api-site:
assignee: nobody → Atsushi SAKAI (sakaia)
Revision history for this message
Atsushi SAKAI (sakaia) wrote :

From #7 related, function call path is written in following.

Section 7.2.x describe detail
https://github.com/minggLu/MOC/wiki/nova-volume-attach-api-call-code-flow

So this path coming from "nova volume-attach".

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to api-site (master)

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

Changed in openstack-api-site:
status: Incomplete → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to api-site (master)

Reviewed: https://review.openstack.org/219200
Committed: https://git.openstack.org/cgit/openstack/api-site/commit/?id=4815dcbd2fef2ada84dc69bd45a7749f8be56317
Submitter: Jenkins
Branch: master

commit 4815dcbd2fef2ada84dc69bd45a7749f8be56317
Author: Atsushi SAKAI <email address hidden>
Date: Tue Sep 1 18:19:26 2015 +0900

    Add host attaching support to cinder

    This function is a kind of setting status to cinder

    Fix one typo
      os-os-unset_image_metadata => os-unset_image_metadata

    Fixed a couple of other os-os typos (df)

    Change-Id: I7e33f6227655f0e881b81a8708d65a0591b344b3
    Closes-Bug: #1193770

Changed in openstack-api-site:
status: In Progress → Fix Released
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.