glusterd: ensure volinfo->caps is set to correct value.
With the commit febf5ed4848, during the volume create op, we are setting volinfo->caps to 0, only if any of the bricks belong to the same node and brickinfo->vg[0] is null. Previously, we used to set volinfo->caps to 0, when either brick doesn't belong to the same node or brickinfo->vg[0] is null. With this patch, we set volinfo->caps to 0, when either brick doesn't belong to the same node or brickinfo->vg[0] is null. (as we do earlier without commit febf5ed4848). fixes: bz#1635820 Change-Id: I00a97415786b775fb088ac45566ad52b402f1a49 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
This commit is contained in:
parent
c5d285b173
commit
aae1c402b7
@ -59,6 +59,15 @@ TEST $CLI_1 volume delete $V0
|
||||
TEST $CLI_1 volume create $V0 $H1:$B1/$V0 $H2:$B2/$V0
|
||||
TEST $CLI_1 volume create $V1 $H1:$B1/$V1
|
||||
|
||||
# bug - 1635820
|
||||
# rebooting a node which doen't host bricks for any one volume
|
||||
# peer should not go into rejected state
|
||||
TEST kill_glusterd 2
|
||||
TEST start_glusterd 2
|
||||
|
||||
EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count 1
|
||||
EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count 2
|
||||
|
||||
TEST $CLI_1 volume start $V0
|
||||
EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Started' volinfo_field_1 $V0 'Status'
|
||||
|
||||
|
@ -2586,6 +2586,8 @@ glusterd_op_create_volume(dict_t *dict, char **op_errstr)
|
||||
caps = 0;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
caps = 0;
|
||||
}
|
||||
|
||||
cds_list_add_tail(&brickinfo->brick_list, &volinfo->bricks);
|
||||
|
Loading…
x
Reference in New Issue
Block a user