Bug 1042916 - rest: unable to migrate and reduce the replicate count on a distributed-replicate volume
Summary: rest: unable to migrate and reduce the replicate count on a distributed-repli...
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-13 15:54 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-17 05:30:45 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Dustin Tsang 2013-12-13 15:54:23 UTC
Description of problem:
unable to reduce the replicate volume from replicate of 2 to 1 during a brick migration.

Passing with/without the replica_count resulted in the same issue:


POST /api/clusters/7934c13e-8067-48e7-9a68-0fb1407c28e3/glustervolumes/613d9e85-ea82-4e43-b04a-9d3212180000/bricks/migrate
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>[\n]"
<action>[\n]"
    <bricks>[\n]"
        <replica_count>1</replica_count>[\n]"
        <brick>[\n]"
            <name>latest-a:/bricks/201312130656284161942637805</name>[\n]"
        </brick>[\n]"
        <brick>[\n]"
            <name>latest-a:/bricks/201312130656284621245056192</name>[\n]"
        </brick>[\n]"
        <brick>[\n]"
            <name>latest-a:/bricks/20131213065628462516730110</name>[\n]"
        </brick>[\n]"
    </bricks>[\n]"
</action>[\n]"

or 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>[\n]"
<action>[\n]"
    <bricks>[\n]"
        <brick>[\n]"
            <name>latest-a:/bricks/201312130656284161942637805</name>[\n]"
        </brick>[\n]"
        <brick>[\n]"
            <name>latest-a:/bricks/201312130656284621245056192</name>[\n]"
        </brick>[\n]"
        <brick>[\n]"
            <name>latest-a:/bricks/20131213065628462516730110</name>[\n]"
        </brick>[\n]"
    </bricks>[\n]"
</action>[\n]"

Results in:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>[\n]"
<fault>[\n]"
    <reason>Operation Failed</reason>[\n]"
    <detail>[volume remove brick start failed[\n]"
error: remove brick incorrect brick count of 3 for replica 2[\n]"
return code: -1]</detail>[\n]"
</fault>[\n]"


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


How reproducible:
100% of the time

Steps to Reproduce:
1. create a dist rep volume 3x2
2. migrate a one brick from each replicate pair as shown in the description

Actual results:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>[\n]"
<fault>[\n]"
    <reason>Operation Failed</reason>[\n]"
    <detail>[volume remove brick start failed[\n]"
error: remove brick incorrect brick count of 3 for replica 2[\n]"
return code: -1]</detail>[\n]"
</fault>[\n]"


Expected results:
migration call should succeed, returning the job id in the response


Additional info:

Comment 2 Dustin Tsang 2013-12-13 18:39:59 UTC
update to comment#0. Expected result should be
"Reducing replica count of volume is disallowed in glusterfs 3.4.0.49rhs"

Comment 3 Dusmant 2013-12-16 08:33:57 UTC
This is not a bug. Because reducing replica count is not a migration but normal DELETE action. Migration is meant for distribute type only.


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