cinder only supports deriving a user and project id from auth context

Bug #1641982 reported by Steve Martinelli on 2016-11-15
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Rajat Dhasmana

Bug Description

In the python bindings for creating a volume there are arguments for specifying a user_id and project_id [1], this exists for many resources (volumes and consistency groups).

        :param user_id: User id derived from context
        :param project_id: Project id derived from context

These are then added to the request body. However, as the docstring indicates, it seems cinder API will never make use of these values. The user_id and project_id is always derived from the auth context [2]. Additionally, the cinder CLI also does not provide a user id or project id to make use of these arguments.

* Why supply these arguments in cinderclient if they are never used?

* Was there ever a plan to allow an admin to create a volume (or cinder resource) for someone else? As it stands now, that would not be possible.



Steve Martinelli (stevemar) wrote :

Adding OSC since we (incorrectly) assumed that the user_id and project_id arguments were being used.

John Griffith (john-griffith) wrote :

I think there was a time when there was some consideration for doing something like in fact admin or special volumes being created. That never really happened, so we don't need to worry about that.

The only other place that I can think of that might have had some intent here was some of the nested tenant stuff (tenant groups etc) but again the way it is right now wouldn't be much use for that either. Seems to me that these can be removed.

Steven Pisarski (spisarski) wrote :

I've encountered the same problem using the cinder v2 & v3 with the Python APIs found in python-cinderclient currently on v 3.2.0.

Changed in python-cinderclient:
assignee: nobody → Rajat Dhasmana (whoami-rajat)

Fix proposed to branch: master

Changed in python-cinderclient:
status: New → In Progress

Change abandoned by Rajat Dhasmana (<email address hidden>) on branch: master
Reason: Patch already merged

Rajat Dhasmana (whoami-rajat) wrote :
Changed in python-cinderclient:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers