[sheepdog] [PATCH v9 14/19] tests: show ledger objects in list
Hitoshi Mitake
mitake.hitoshi at gmail.com
Thu May 22 16:30:32 CEST 2014
From: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
Cc: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
Cc: Alessandro Bolgia <alessandro at extensys.it>
Tested-by: Valerio Pachera <sirio81 at gmail.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
v7:
- refine output
-- previous way of counting data object was incorrect
v4:
- refine output
tests/functional/016.out | 14 ++---
tests/functional/042 | 4 +-
tests/functional/042.out | 44 +++++++-------
tests/functional/044.out | 14 ++---
tests/functional/057.out | 140 ++++++++++++++++++++++-----------------------
tests/functional/058.out | 14 ++---
tests/functional/063.out | 28 ++++-----
tests/functional/064.out | 38 ++++++------
tests/functional/common.rc | 12 +++-
9 files changed, 157 insertions(+), 151 deletions(-)
diff --git a/tests/functional/016.out b/tests/functional/016.out
index e685772..1423522 100644
--- a/tests/functional/016.out
+++ b/tests/functional/016.out
@@ -3,10 +3,10 @@ using backend plain store
there should be no vdi
Name Id Size Used Shared Creation time VDI id Copies Tag
there should be no object
-STORE DATA VDI VMSTATE ATTR STALE
-0 0 3 0 0 0
-1 0 3 0 0 0
-2 0 3 0 0 0
-3 0 3 0 0 0
-4 0 3 0 0 0
-5 0 3 0 0 0
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0 0 3 0 0 0 0
+1 0 3 0 0 0 0
+2 0 3 0 0 0 0
+3 0 3 0 0 0 0
+4 0 3 0 0 0 0
+5 0 3 0 0 0 0
diff --git a/tests/functional/042 b/tests/functional/042
index 54e8a33..ceb30a6 100755
--- a/tests/functional/042
+++ b/tests/functional/042
@@ -8,8 +8,8 @@ _need_to_be_root
_make_device 0 $((1024 ** 3))
_make_device 1 $((1024 ** 3))
-_make_device 2 $((20 * 1024 ** 2))
-_make_device 3 $((20 * 1024 ** 2))
+_make_device 2 $((30 * 1024 ** 2))
+_make_device 3 $((30 * 1024 ** 2))
# create log files of sheep 2 and 3 on other places
touch $STORE/0/sheep2.log $STORE/0/sheep3.log
diff --git a/tests/functional/042.out b/tests/functional/042.out
index 5462ed0..cf6c91f 100644
--- a/tests/functional/042.out
+++ b/tests/functional/042.out
@@ -47,30 +47,30 @@ Failed to write VDI
Failed to create VDI test2: Failed to write to requested VDI
Failed to create VDI test3: Failed to write to requested VDI
Id Host:Port V-Nodes Zone
- 0 127.0.0.1:7000 251 0
- 1 127.0.0.1:7001 251 1
- 2 127.0.0.1:7002 5 2
- 3 127.0.0.1:7003 5 3
+ 0 127.0.0.1:7000 249 0
+ 1 127.0.0.1:7001 249 1
+ 2 127.0.0.1:7002 7 2
+ 3 127.0.0.1:7003 7 3
Id Host:Port V-Nodes Zone
- 0 127.0.0.1:7000 251 0
- 1 127.0.0.1:7001 251 1
- 2 127.0.0.1:7002 5 2
- 3 127.0.0.1:7003 5 3
+ 0 127.0.0.1:7000 249 0
+ 1 127.0.0.1:7001 249 1
+ 2 127.0.0.1:7002 7 2
+ 3 127.0.0.1:7003 7 3
Id Host:Port V-Nodes Zone
- 0 127.0.0.1:7000 251 0
- 1 127.0.0.1:7001 251 1
- 2 127.0.0.1:7002 5 2
- 3 127.0.0.1:7003 5 3
+ 0 127.0.0.1:7000 249 0
+ 1 127.0.0.1:7001 249 1
+ 2 127.0.0.1:7002 7 2
+ 3 127.0.0.1:7003 7 3
Id Host:Port V-Nodes Zone
- 0 127.0.0.1:7000 251 0
- 1 127.0.0.1:7001 251 1
- 2 127.0.0.1:7002 5 2
- 3 127.0.0.1:7003 5 3
-STORE DATA VDI VMSTATE ATTR STALE
-0 22 4 0 0 0
-1 22 4 0 0 0
-2 0 2 0 0 0
-3 0 0 0 0 0
+ 0 127.0.0.1:7000 249 0
+ 1 127.0.0.1:7001 249 1
+ 2 127.0.0.1:7002 7 2
+ 3 127.0.0.1:7003 7 3
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0 22 4 0 0 0 0
+1 22 4 0 0 0 0
+2 0 1 0 0 0 0
+3 0 1 0 0 0 0
STORE/0/obj/00fd32fc00000000
STORE/0/obj/00fd32fc00000001
STORE/0/obj/00fd32fc00000002
@@ -124,4 +124,4 @@ STORE/1/obj/80fd34af00000000
STORE/1/obj/80fd366200000000
STORE/1/obj/80fd381500000000
STORE/2/obj/80fd32fc00000000
-STORE/2/obj/80fd34af00000000
+STORE/3/obj/80fd34af00000000
diff --git a/tests/functional/044.out b/tests/functional/044.out
index c70d327..06e096d 100644
--- a/tests/functional/044.out
+++ b/tests/functional/044.out
@@ -3,10 +3,10 @@ using backend plain store
there should be no vdi
Name Id Size Used Shared Creation time VDI id Copies Tag
there should be no object
-STORE DATA VDI VMSTATE ATTR STALE
-0 0 36 0 0 0
-1 0 36 0 0 0
-2 0 36 0 0 0
-3 0 36 0 0 0
-4 0 36 0 0 0
-5 0 36 0 0 0
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0 0 36 0 0 0 0
+1 0 36 0 0 0 0
+2 0 36 0 0 0 0
+3 0 36 0 0 0 0
+4 0 36 0 0 0 0
+5 0 36 0 0 0 0
diff --git a/tests/functional/057.out b/tests/functional/057.out
index 167dd6e..500c30e 100644
--- a/tests/functional/057.out
+++ b/tests/functional/057.out
@@ -1,30 +1,30 @@
QA output created by 057
using backend plain store
-STORE DATA VDI VMSTATE ATTR STALE
-0/d0 6 0 0 0 0
-0/d1 13 1 0 0 0
-0/d2 6 0 0 0 0
-1/d0 11 1 0 0 0
-1/d1 4 0 0 0 0
-1/d2 10 0 0 0 0
-2/d0 6 1 0 0 0
-2/d1 14 0 0 0 0
-2/d2 5 0 0 0 0
-STORE DATA VDI VMSTATE ATTR STALE
-0/d0 1 0 0 0 0
-0/d1 5 0 0 0 0
-0/d2 4 0 0 0 0
-0/d3 1 0 0 0 0
-0/d4 4 0 0 0 0
-1/d0 10 1 0 0 0
-1/d1 3 0 0 0 0
-1/d2 8 0 0 0 0
-2/d0 4 1 0 0 0
-2/d1 10 0 0 0 0
-2/d2 5 0 0 0 0
-3/d0 7 0 0 0 0
-3/d1 8 0 0 0 0
-3/d2 5 1 0 0 0
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0/d0 6 0 0 0 0 0
+0/d1 13 1 0 0 0 0
+0/d2 6 0 0 0 0 0
+1/d0 11 1 0 0 0 0
+1/d1 4 0 0 0 0 0
+1/d2 10 0 0 0 0 0
+2/d0 6 1 0 0 0 0
+2/d1 14 0 0 0 0 0
+2/d2 5 0 0 0 0 0
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0/d0 1 0 0 0 0 0
+0/d1 5 0 0 0 0 0
+0/d2 4 0 0 0 0 0
+0/d3 1 0 0 0 0 0
+0/d4 4 0 0 0 0 0
+1/d0 10 1 0 0 0 0
+1/d1 3 0 0 0 0 0
+1/d2 8 0 0 0 0 0
+2/d0 4 1 0 0 0 0
+2/d1 10 0 0 0 0 0
+2/d2 5 0 0 0 0 0
+3/d0 7 0 0 0 0 0
+3/d1 8 0 0 0 0 0
+3/d2 5 1 0 0 0 0
finish check&repair test
Cluster status: running, auto-recovery enabled
@@ -36,36 +36,36 @@ DATE 1 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
Failed to execute request, look for sheep.log for more information
Nodes In Recovery:
Id Host:Port V-Nodes Zone Progress
-STORE DATA VDI VMSTATE ATTR STALE
-0/d0 1 0 0 0 0
-0/d1 5 0 0 0 0
-0/d2 4 0 0 0 0
-0/d3 1 0 0 0 0
-0/d4 4 0 0 0 0
-1/d0 10 1 0 0 0
-1/d1 3 0 0 0 0
-1/d2 8 0 0 0 0
-2/d0 4 1 0 0 0
-2/d1 10 0 0 0 0
-2/d2 5 0 0 0 0
-3/d0 7 0 0 0 0
-3/d1 8 0 0 0 0
-3/d2 5 1 0 0 0
-STORE DATA VDI VMSTATE ATTR STALE
-0/d0 1 0 0 0 0
-0/d1 5 0 0 0 0
-0/d2 6 0 0 0 0
-0/d3 1 0 0 0 0
-0/d4 8 0 0 0 0
-1/d0 10 1 0 0 0
-1/d1 3 0 0 0 0
-1/d2 8 0 0 0 0
-2/d0 4 1 0 0 0
-2/d1 10 0 0 0 0
-2/d2 5 0 0 0 0
-3/d0 7 0 0 0 0
-3/d1 8 0 0 0 0
-3/d2 5 1 0 0 0
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0/d0 1 0 0 0 0 0
+0/d1 5 0 0 0 0 0
+0/d2 4 0 0 0 0 0
+0/d3 1 0 0 0 0 0
+0/d4 4 0 0 0 0 0
+1/d0 10 1 0 0 0 0
+1/d1 3 0 0 0 0 0
+1/d2 8 0 0 0 0 0
+2/d0 4 1 0 0 0 0
+2/d1 10 0 0 0 0 0
+2/d2 5 0 0 0 0 0
+3/d0 7 0 0 0 0 0
+3/d1 8 0 0 0 0 0
+3/d2 5 1 0 0 0 0
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0/d0 1 0 0 0 0 0
+0/d1 5 0 0 0 0 0
+0/d2 6 0 0 0 0 0
+0/d3 1 0 0 0 0 0
+0/d4 8 0 0 0 0 0
+1/d0 10 1 0 0 0 0
+1/d1 3 0 0 0 0 0
+1/d2 8 0 0 0 0 0
+2/d0 4 1 0 0 0 0
+2/d1 10 0 0 0 0 0
+2/d2 5 0 0 0 0 0
+3/d0 7 0 0 0 0 0
+3/d1 8 0 0 0 0 0
+3/d2 5 1 0 0 0 0
finish check&repair test
Cluster status: running, auto-recovery enabled
@@ -77,21 +77,21 @@ DATE 1 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
Failed to execute request, look for sheep.log for more information
Nodes In Recovery:
Id Host:Port V-Nodes Zone Progress
-STORE DATA VDI VMSTATE ATTR STALE
-0/d0 1 0 0 0 0
-0/d1 5 0 0 0 0
-0/d2 6 0 0 0 0
-0/d3 1 0 0 0 0
-0/d4 8 0 0 0 0
-1/d0 10 1 0 0 0
-1/d1 3 0 0 0 0
-1/d2 8 0 0 0 0
-2/d0 4 1 0 0 0
-2/d1 10 0 0 0 0
-2/d2 5 0 0 0 0
-3/d0 7 0 0 0 0
-3/d1 8 0 0 0 0
-3/d2 5 1 0 0 0
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0/d0 1 0 0 0 0 0
+0/d1 5 0 0 0 0 0
+0/d2 6 0 0 0 0 0
+0/d3 1 0 0 0 0 0
+0/d4 8 0 0 0 0 0
+1/d0 10 1 0 0 0 0
+1/d1 3 0 0 0 0 0
+1/d2 8 0 0 0 0 0
+2/d0 4 1 0 0 0 0
+2/d1 10 0 0 0 0 0
+2/d2 5 0 0 0 0 0
+3/d0 7 0 0 0 0 0
+3/d1 8 0 0 0 0 0
+3/d2 5 1 0 0 0 0
Cluster status: running, auto-recovery enabled
Cluster created at DATE
diff --git a/tests/functional/058.out b/tests/functional/058.out
index 3359677..e05cd09 100644
--- a/tests/functional/058.out
+++ b/tests/functional/058.out
@@ -28,10 +28,10 @@ The inode object 0x7c2b25 idx 21 is not allocated
The inode object 0x7c2b25 idx 22 is not allocated
The inode object 0x7c2b25 idx 23 is not allocated
The inode object 0x7c2b25 idx 24 is not allocated
-STORE DATA VDI VMSTATE ATTR STALE
-0 0 1 0 0 0
-1 0 1 0 0 0
-2 0 1 0 0 0
-3 0 1 0 0 0
-4 0 1 0 0 0
-5 0 1 0 0 0
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0 0 1 0 0 0 0
+1 0 1 0 0 0 0
+2 0 1 0 0 0 0
+3 0 1 0 0 0 0
+4 0 1 0 0 0 0
+5 0 1 0 0 0 0
diff --git a/tests/functional/063.out b/tests/functional/063.out
index 65b065d..52ef43d 100644
--- a/tests/functional/063.out
+++ b/tests/functional/063.out
@@ -1,24 +1,24 @@
QA output created by 063
using backend plain store
-STORE DATA VDI VMSTATE ATTR STALE
-0 13 0 0 0 0
-1 24 0 0 0 0
-2 13 1 0 0 0
-3 0 0 0 0 0
-4 0 0 0 0 0
-5 0 0 0 0 0
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0 13 0 0 0 0 0
+1 24 0 0 0 0 0
+2 13 1 0 0 0 0
+3 0 0 0 0 0 0
+4 0 0 0 0 0 0
+5 0 0 0 0 0 0
Id Host:Port V-Nodes Zone
0 127.0.0.1:7000 128 0
1 127.0.0.1:7001 128 1
2 127.0.0.1:7002 128 2
3 127.0.0.1:7003 0 3
-STORE DATA VDI VMSTATE ATTR STALE
-0 15 0 0 0 0
-1 18 0 0 0 0
-2 3 1 0 0 0
-3 0 0 0 0 0
-4 5 0 0 0 0
-5 9 0 0 0 0
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0 15 0 0 0 0 0
+1 18 0 0 0 0 0
+2 3 1 0 0 0 0
+3 0 0 0 0 0 0
+4 5 0 0 0 0 0
+5 9 0 0 0 0 0
Id Host:Port V-Nodes Zone
0 127.0.0.1:7000 205 0
1 127.0.0.1:7001 102 1
diff --git a/tests/functional/064.out b/tests/functional/064.out
index 182fb54..c0977cc 100644
--- a/tests/functional/064.out
+++ b/tests/functional/064.out
@@ -1,35 +1,35 @@
QA output created by 064
using backend plain store
-STORE DATA VDI VMSTATE ATTR STALE
-0 12 0 0 0 0
-1 16 1 0 0 0
-2 22 1 0 0 0
-3 0 0 0 0 0
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0 12 0 0 0 0 0
+1 16 1 0 0 0 0
+2 22 1 0 0 0 0
+3 0 0 0 0 0 0
Id Host:Port V-Nodes Zone
0 127.0.0.1:7000 96 0
1 127.0.0.1:7001 96 1
2 127.0.0.1:7002 192 2
-STORE DATA VDI VMSTATE ATTR STALE
-0 9 0 0 0 0
-1 16 1 0 0 0
-2 22 1 0 0 0
-3 3 0 0 0 0
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0 9 0 0 0 0 0
+1 16 1 0 0 0 0
+2 22 1 0 0 0 0
+3 3 0 0 0 0 0
Id Host:Port V-Nodes Zone
0 127.0.0.1:7000 96 0
1 127.0.0.1:7001 96 1
2 127.0.0.1:7002 192 2
-STORE DATA VDI VMSTATE ATTR STALE
-0 17 0 0 0 0
-1 25 1 0 0 0
-3 8 1 0 0 0
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0 17 0 0 0 0 0
+1 25 1 0 0 0 0
+3 8 1 0 0 0 0
Id Host:Port V-Nodes Zone
0 127.0.0.1:7000 171 0
1 127.0.0.1:7001 85 1
-STORE DATA VDI VMSTATE ATTR STALE
-0 11 0 0 0 0
-1 16 1 0 0 0
-2 20 1 0 0 0
-3 3 0 0 0 0
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0 11 0 0 0 0 0
+1 16 1 0 0 0 0
+2 20 1 0 0 0 0
+3 3 0 0 0 0 0
Id Host:Port V-Nodes Zone
0 127.0.0.1:7000 153 0
1 127.0.0.1:7001 77 1
diff --git a/tests/functional/common.rc b/tests/functional/common.rc
index 4b7d04e..b8ef7d8 100644
--- a/tests/functional/common.rc
+++ b/tests/functional/common.rc
@@ -411,7 +411,7 @@ _cleanup_devices()
_list_data_obj()
{
- find $STORE/$1 | grep -E /0[0-9a-f]\{15\} | grep -v .stale
+ find $STORE/$1 | grep -E /00[0-9a-f]\{14\} | grep -v .stale
}
_list_vdi_obj()
@@ -429,6 +429,11 @@ _list_attr_obj()
find $STORE/$1 | grep -E /2[0-9a-f]\{15\} | grep -v .stale
}
+_list_ledger_obj()
+{
+ find $STORE/$1 | grep -E /08[0-9a-f]\{14\} | grep -v .stale
+}
+
_list_stale_obj()
{
find $STORE/$1 | grep -E /[0-9a-f]\{16\} | grep .stale
@@ -438,14 +443,15 @@ _stat_store()
{
local pattern=$1
local idx
- echo -e "STORE\tDATA\tVDI\tVMSTATE\tATTR\tSTALE"
+ echo -e "STORE\tDATA\tVDI\tVMSTATE\tATTR\tLEDGER\tSTALE"
for idx in `ls -d $STORE/$pattern | sed s#$STORE/##g`; do
local data_obj=$(_list_data_obj $idx | wc -l)
local vdi_obj=$(_list_vdi_obj $idx | wc -l)
local vmstate_obj=$(_list_vmstate_obj $idx | wc -l)
local attr_obj=$(_list_attr_obj $idx | wc -l)
+ local ledger_obj=$(_list_ledger_obj $idx | wc -l)
local stale_obj=$(_list_stale_obj $idx | wc -l)
- echo -e "$idx\t$data_obj\t$vdi_obj\t$vmstate_obj\t$attr_obj\t$stale_obj"
+ echo -e "$idx\t$data_obj\t$vdi_obj\t$vmstate_obj\t$attr_obj\t$ledger_obj\t$stale_obj"
done
}
--
1.9.1
More information about the sheepdog
mailing list