Modify Users - Changing host clears database access

Bug #1214555 reported by Riddhi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
High
Tim Simpson

Bug Description

When the client changes the host attribute, the user loses access to all databases.

Get the user. It can access one database.

$ curl \
    --request GET "https://dfw.databases.api.rackspacecloud.com/v1.0/708784/instances/94db0f63-2423-454a-bb22-91dc444b60ef/users/frodo" \
    --header "Content-Type: application/json" \
    --header "X-Auth-Token: 7e08297922a245748b074d6142956709" \
    --insecure \
    --write-out "http_code=%{http_code}"

Response:

{"user": {"host": "%", "name": "frodo", "databases": [{"name": "1h5x9yfp3n"}]}}

Then, update the host attribute:

$ curl \
    --request PUT "https://dfw.databases.api.rackspacecloud.com/v1.0/708784/instances/94db0f63-2423-454a-bb22-91dc444b60ef/users/frodo" \
    --data "{ \"user\" : { \"host\": \"192.168.1.100\" } }" \
    --header "Content-Type: application/json" \
    --header "X-Auth-Token: 7e08297922a245748b074d6142956709" \
    --insecure \
    --write-out "http_code=%{http_code}"

Response: 202

Then, get the same user again:

$ curl \
    --request GET "https://dfw.databases.api.rackspacecloud.com/v1.0/708784/instances/94db0f63-2423-454a-bb22-91dc444b60ef/users/frodo%40192%252E168%252E1%252E100" \
    --header "Content-Type: application/json" \
    --header "X-Auth-Token: 7e08297922a245748b074d6142956709" \
    --insecure \
    --write-out "http_code=%{http_code}"

Response:

{"user": {"host": "192.168.1.100", "name": "frodo", "databases": []}}

Riddhi (ridhi-j-shah)
Changed in trove:
assignee: nobody → Riddhi (ridhi-j-shah)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

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

Changed in trove:
milestone: none → havana-rc1
Changed in trove:
assignee: Riddhi (ridhi-j-shah) → Tim Simpson (tim-simpson)
Changed in trove:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/43005
Committed: http://github.com/openstack/trove/commit/926a5ea721f9b155ce3d074694075b742d8c3306
Submitter: Jenkins
Branch: master

commit 926a5ea721f9b155ce3d074694075b742d8c3306
Author: Riddhi Shah <email address hidden>
Date: Tue Aug 20 16:41:18 2013 -0500

    Modify User Attributes API - Fix

    This fix does not allow empty host strings in the update user call.
    Besides, it also enusres that database access is not lost during an update of the host attribute

    Change-Id: I57b7733c264d2bcd70dfea95f85aae68553c4dff
    Fixes: bug #1214166
    Fixes: bug #1214555

Changed in trove:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in trove:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: havana-rc1 → 2013.2
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.