mirror of
https://github.com/gluster/glusterd2.git
synced 2026-02-05 12:45:38 +01:00
Set options metadata-self-heal, entry-self-heal and data-self-heal in glustershd e2e tests
to successfully heal. Change introduced in https://review.gluster.org/#/c/glusterfs/+/21938/. The above three options are not set to off by default in glustershd volfile. Signed-off-by: Vishal Pandey <vpandey@redhat.com>
This commit is contained in:
committed by
Aravinda VK
parent
dfb24628dc
commit
1353b0e79f
@@ -52,6 +52,14 @@ func testSelfHeal(t *testing.T, tc *testCluster) {
|
||||
vol1, err := client.VolumeCreate(reqVol)
|
||||
r.Nil(err)
|
||||
|
||||
var optionReq api.VolOptionReq
|
||||
|
||||
optionReq.Options = map[string]string{"cluster/replicate.self-heal-daemon": "off"}
|
||||
optionReq.AllowAdvanced = true
|
||||
|
||||
r.Nil(client.VolumeSet(vol1.Name, optionReq))
|
||||
r.False(isProcessRunning(pidpath), "glustershd is still running")
|
||||
|
||||
r.Nil(client.VolumeStart(vol1.Name, false), "volume start failed")
|
||||
|
||||
checkFuseAvailable(t)
|
||||
@@ -120,9 +128,15 @@ func testSelfHeal(t *testing.T, tc *testCluster) {
|
||||
}
|
||||
|
||||
r.Nil(client.VolumeStop(vol1.Name), "Volume stop failed")
|
||||
r.Nil(client.VolumeStart(vol1.Name, false), "volume start failed")
|
||||
|
||||
var optionReq api.VolOptionReq
|
||||
optionReq.Options = map[string]string{"cluster/replicate.entry-self-heal": "on",
|
||||
"cluster/replicate.metadata-self-heal": "on",
|
||||
"cluster/replicate.data-self-heal": "on"}
|
||||
optionReq.AllowAdvanced = true
|
||||
|
||||
r.Nil(client.VolumeSet(vol1.Name, optionReq))
|
||||
|
||||
r.Nil(client.VolumeStart(vol1.Name, false), "volume start failed")
|
||||
|
||||
optionReq.Options = map[string]string{"cluster/replicate.self-heal-daemon": "on"}
|
||||
optionReq.AllowAdvanced = true
|
||||
|
||||
@@ -383,9 +383,8 @@ func ValidateStr(o *Option, val string) error {
|
||||
if t == op {
|
||||
return nil
|
||||
}
|
||||
return ErrInvalidArg
|
||||
}
|
||||
return nil
|
||||
return ErrInvalidArg
|
||||
}
|
||||
|
||||
// ValidateTime validates if the option is valid time format
|
||||
|
||||
Reference in New Issue
Block a user