glusterfs

Форк
0
/
bug-886998.t 
52 строки · 2.0 Кб
1
#!/bin/bash
2

3
. $(dirname $0)/../../include.rc
4
. $(dirname $0)/../../volume.rc
5

6
cleanup;
7

8
# This tests that the replicate trash directory(.landfill) has following
9
# properties.
10
# Note: This is to have backward compatibility with 3.3 glusterfs
11
#       In the latest releases this dir is present inside .glusterfs of brick.
12
# 1) lookup of trash dir fails
13
# 2) readdir does not show this directory
14
# 3) Self-heal does not do any self-heal of these directories.
15
gfid1="0xc2e75dde97f346e7842d1076a8e699f8"
16
TEST glusterd
17
TEST pidof glusterd
18
TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}0 $H0:$B0/${V0}1
19
TEST $CLI volume start $V0
20
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0 --direct-io-mode=enable
21

22
TEST mkdir $B0/${V0}1/.landfill
23
TEST setfattr -n trusted.gfid -v $gfid1 $B0/${V0}1/.landfill
24
TEST mkdir $B0/${V0}0/.landfill
25
TEST setfattr -n trusted.gfid -v $gfid1 $B0/${V0}0/.landfill
26

27
TEST ! stat $M0/.landfill
28
EXPECT "" echo $(ls -a $M0 | grep ".landfill")
29

30
TEST rmdir $B0/${V0}0/.landfill
31
#Force a conservative merge and it should not create .landfill
32
TEST setfattr -n trusted.afr.$V0-client-0 -v 0x000000000000000000000000 $B0/${V0}0/
33
TEST setfattr -n trusted.afr.$V0-client-1 -v 0x000000000000000000000001 $B0/${V0}0/
34

35
TEST setfattr -n trusted.afr.$V0-client-0 -v 0x000000000000000000000001 $B0/${V0}1/
36
TEST setfattr -n trusted.afr.$V0-client-1 -v 0x000000000000000000000000 $B0/${V0}1/
37

38
EXPECT "" echo $(ls -a $M0 | grep ".landfill")
39
TEST ! stat $B0/${V0}0/.landfill
40
TEST stat $B0/${V0}1/.landfill
41

42
#TEST that the dir is not deleted even when xattrs suggest to delete
43
TEST setfattr -n trusted.afr.$V0-client-0 -v 0x000000000000000000000000 $B0/${V0}0/
44
TEST setfattr -n trusted.afr.$V0-client-1 -v 0x000000000000000000000001 $B0/${V0}0/
45

46
TEST setfattr -n trusted.afr.$V0-client-0 -v 0x000000000000000000000000 $B0/${V0}1/
47
TEST setfattr -n trusted.afr.$V0-client-1 -v 0x000000000000000000000000 $B0/${V0}1/
48

49
EXPECT "" echo $(ls -a $M0 | grep ".landfill")
50
TEST ! stat $B0/${V0}0/.landfill
51
TEST stat $B0/${V0}1/.landfill
52
cleanup;
53

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.