Bug 1393536

Summary: User not allowed to write when default placement has been changed
Product: Red Hat Ceph Storage Reporter: tbrekke
Component: RGWAssignee: Casey Bodley <cbodley>
Status: CLOSED NOTABUG QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.0CC: anharris, cbodley, ceph-eng-bugs, hnallurv, kbader, mbenjamin, owasserm, sweil, tbrekke
Target Milestone: rc   
Target Release: 3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-06 14:56:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description tbrekke 2016-11-09 19:11:43 UTC
Description of problem:

When you create a zonegroup configuration that changes the default_placement. And update the default_placement to reflect this change. If you do not manually specify the placement_tag for a user, the user will not be able to write.

"placement_targets": [
        {
            "name": "indexed",
            "tags": [
                "indexed"
            ]
        },
        {
            "name": "blind",
            "tags": [
                "blind"
            ]
        }
    ],
    "default_placement": "indexed",

User config:

   "default_placement": "",
    "placement_tags": [],

Version-Release number of selected component (if applicable):

ceph version 10.2.2-38.el7cp (119a68752a5671253f9daae3f894a90313a6b8e4)

How reproducible:

Everytime

Steps to Reproduce:
1. Update zonegroup and change the default placement target name and tag.
2. Update default_placement to the new name
3. Update zone to the placement_pools key matches the new target name
4. create a user using and try creating a bucket

Actual results:

Fails with this error.

0 user not permitted to use placement rule

Expected results:

For the default_placement in the zonegroup to be used without having to manually update the user info to allow the tag.

Additional info:

If only the "placement_tags": [] is updated for the user, the user is then able to create a bucket.

Comment 3 Matt Benjamin (redhat) 2017-01-11 14:56:55 UTC
Assigning to Casey prospectively. Can you provide quick triage for PM call?  tx

Comment 4 Casey Bodley 2017-01-11 15:33:48 UTC
If I understand correctly, this is the intended semantic of the "tags" field in the placement target. If a placement target has a non-empty list of tags, users must have also have a matching tag in their placement_tags in order to use it. The initial "default-placement" target has no tags, so any user is permitted to use it.

If you were to remove the "tags" from your placement_targets, I'd expect bucket creation to work for unmodified users. Can you please verify?

Comment 5 tbrekke 2017-01-11 17:25:25 UTC
While that makes sense, leaving the tags empty did not seem to work either, I believe that was the first thing I tried.

Comment 7 Casey Bodley 2017-01-13 17:21:19 UTC
Was the gateway restarted after making those changes to the zone/zonegroup configuration?

Comment 8 tbrekke 2017-01-19 19:13:36 UTC
I believe so, I will try replicating the issue again and report back. Thanks.