Cgsnapshot APIs should be disabled by default

Bug #1393652 reported by Xing Yang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Xing Yang

Bug Description

Currently consistency group APIs are disabled by default because there are only a very small number of drivers that have implemented them. In cinder/etc/cinder/policy.json, there are the following entries:

    "consistencygroup:create" : "group:nobody",
    "consistencygroup:delete": "group:nobody",
    "consistencygroup:get": "group:nobody",
    "consistencygroup:get_all": "group:nobody",

    "consistencygroup:create_cgsnapshot" : "",
    "consistencygroup:delete_cgsnapshot": "",
    "consistencygroup:get_cgsnapshot": "",
    "consistencygroup:get_all_cgsnapshots": "",

Note that Cgsnapshot related APIs are not disabled by default. The reason is that a user won't be able to create a snapshot
of a CG if CG can't be created in the first place (CG API's are already disabled and won't be useful if a driver didn't implement
them). After recent discussion, it is decided that it is better to disable Cgsnapshot related APIs as well to avoid confusion.
So the policy entries will be changed to the following:

    "consistencygroup:create" : "group:nobody",
    "consistencygroup:delete": "group:nobody",
    "consistencygroup:get": "group:nobody",
    "consistencygroup:get_all": "group:nobody",

    "consistencygroup:create_cgsnapshot" : "group:nobody",
    "consistencygroup:delete_cgsnapshot": "group:nobody",
    "consistencygroup:get_cgsnapshot": "group:nobody",
    "consistencygroup:get_all_cgsnapshots": "group:nobody",

If a driver has CG functions implemented, the CG APIs have to be enabled by changing "group:nobody" to "" for the CG functions to work.

Xing Yang (xing-yang)
Changed in cinder:
assignee: nobody → Xing Yang (xing-yang)
importance: Undecided → Low
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/135166
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=95a39d9c326fd218c835c3387380c094efad7a99
Submitter: Jenkins
Branch: master

commit 95a39d9c326fd218c835c3387380c094efad7a99
Author: Xing Yang <email address hidden>
Date: Mon Nov 17 23:28:39 2014 -0500

    Disable Cgsnapshot APIs by default

    Currently consistency group APIs are disabled by default because there are
    only a very small number of drivers that have implemented them. In
    cinder/etc/cinder/policy.json, there are the following entries:

        "consistencygroup:create" : "group:nobody",
        "consistencygroup:delete": "group:nobody",
        "consistencygroup:get": "group:nobody",
        "consistencygroup:get_all": "group:nobody",
        "consistencygroup:create_cgsnapshot" : "",
        "consistencygroup:delete_cgsnapshot": "",
        "consistencygroup:get_cgsnapshot": "",
        "consistencygroup:get_all_cgsnapshots": "",

    Note that Cgsnapshot related APIs are not disabled by default. They should be
    disabled to be consistent. So the policy entries will be changed to the
    following in this patch:

        "consistencygroup:create" : "group:nobody",
        "consistencygroup:delete": "group:nobody",
        "consistencygroup:get": "group:nobody",
        "consistencygroup:get_all": "group:nobody",
        "consistencygroup:create_cgsnapshot" : "group:nobody",
        "consistencygroup:delete_cgsnapshot": "group:nobody",
        "consistencygroup:get_cgsnapshot": "group:nobody",
        "consistencygroup:get_all_cgsnapshots": "group:nobody",

    Note: If a driver has CG functions implemented, the CG APIs have to be enabled
    by changing "group:nobody" to "" for the CG functions to work.

    Change-Id: If59b3da1e84e25e1f547793638c58966e10f488c
    Closes-Bug: #1393652

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-1 → 2015.1.0
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.