Bug 1040028 - rest api: create brick (add brick to volume) no longer returning brick information
Summary: rest api: create brick (add brick to volume) no longer returning brick inform...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: rhsc-sdk
Version: 2.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Shubhendu Tripathi
QA Contact: Dustin Tsang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-10 14:40 UTC by Dustin Tsang
Modified: 2015-07-13 04:39 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-13 19:12:05 UTC
Target Upstream Version:


Attachments (Terms of Use)
Add brick when volume is UP (52.49 KB, image/png)
2013-12-13 10:08 UTC, Shubhendu Tripathi
no flags Details
Add brick when volume is DOWN (52.66 KB, image/png)
2013-12-13 10:09 UTC, Shubhendu Tripathi
no flags Details

Description Dustin Tsang 2013-12-10 14:40:22 UTC
Description of problem:

Using the rest api to Create Brick (add brick to volume) is no longer returning brick information. The following request with the header accept:application/xml receives response with an empty body.

(for example: POST /api/clusters/9f2b00c0-1067-430e-bbd0-762f32f0f527/glustervolumes/505884b7-ade2-47fb-8558-f6a37a29a742/bricks)

----sample request----
POST /api/clusters/9f2b00c0-1067-430e-bbd0-762f32f0f527/glustervolumes/505884b7-ade2-47fb-8558-f6a37a29a742/bricks HT»
 Content-Type: application/xml
 Accept: application/xml
 Content-Length: 231
 Host: latest.rhsc:443
 Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.1.3 (java 1.5)
 Authorization: Basic YWRtaW5AaW50ZXJuYWw6cmVkaGF0
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>[\n]"
<bricks>[\n]"
    <brick>[\n]"
        <server_id>8e1e7e0f-cce0-41f8-bbb2-439b207f2ee5</server_id>[\n]"
        <brick_dir>/tmp/20131210092523106927299489</brick_dir>[\n]"
    </brick>[\n]"
</bricks>[\n]"
---------------------------

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

How reproducible:
100% of the time


Steps to Reproduce:
1. create a distributed volume in rhsc
2. call create brick as described in the description


Actual results:
empty body and content type is text/plain

"HTTP/1.1 202 Accepted[\r][\n]"
 "Date: Tue, 10 Dec 2013 14:25:23 GMT[\r][\n]"
 "Content-Length: 0[\r][\n]"
 "Connection: close[\r][\n]"
 "Content-Type: text/plain; charset=UTF-8[\r][\n]"
 "[\r][\n]"

Expected results:

application/xml
<bricks>
<brick id="xxxx">
...
</brick>
</bricks>


Additional info:

Comment 2 Dusmant 2013-12-13 07:12:31 UTC
In case the volume is UP, this should return the Expected Result as given in the bug. But, if the volume is DOWN, then the Actual results as shown is expected.

Dustin will verify this in CB11 and Shubhendu will also try it out and see what's the restult coming.

If the UP case is not working, then it has to be fixed.

Comment 3 Shubhendu Tripathi 2013-12-13 10:08:38 UTC
Created attachment 836270 [details]
Add brick when volume is UP

Comment 4 Shubhendu Tripathi 2013-12-13 10:09:22 UTC
Created attachment 836271 [details]
Add brick when volume is DOWN

Comment 5 Shubhendu Tripathi 2013-12-13 10:11:07 UTC
Tried adding bricks in the both the scenarios when volume is UP and DOWN using cb11 build.
Both the scenarios show the added brick details properly. Screen shots attached for reference.

Dustin, kindly verify once with cb11 and update.

Comment 6 Dustin Tsang 2013-12-13 19:11:53 UTC
seems to be working fine in rhsc-cb11.


Note You need to log in before you can comment on or make changes to this bug.