creating kring
$ ceph-authtool --cap osd 'allow rx pool=swimming' kring
- $ ceph-authtool kring --list|grep -P '^\tcaps '
+ $ ceph-authtool kring --list|grep -E '^[[:space:]]caps '
\tcaps osd = "allow rx pool=swimming" (esc)
# TODO is this nice?
$ ceph-authtool --cap osd 'broken' kring
- $ ceph-authtool kring --list|grep -P '^\tcaps '
+ $ ceph-authtool kring --list|grep -E '^[[:space:]]caps '
\tcaps osd = "broken" (esc)
# TODO is this nice?
$ ceph-authtool --cap xyzzy 'broken' kring
- $ ceph-authtool kring --list|grep -P '^\tcaps '
+ $ ceph-authtool kring --list|grep -E '^[[:space:]]caps '
\tcaps xyzzy = "broken" (esc)
creating kring
$ ceph-authtool --cap osd 'allow rx pool=swimming' kring
- $ ceph-authtool kring --list|grep -P '^\tcaps '
+ $ ceph-authtool kring --list|grep -E '^[[:space:]]caps '
\tcaps osd = "allow rx pool=swimming" (esc)
# TODO it seems --cap overwrites all previous caps; is this wanted?
$ ceph-authtool --cap mds 'allow' kring
- $ ceph-authtool kring --list|grep -P '^\tcaps '
+ $ ceph-authtool kring --list|grep -E '^[[:space:]]caps '
\tcaps mds = "allow" (esc)
creating kring
$ ceph-authtool --cap osd 'allow rx pool=swimming' kring
- $ ceph-authtool kring --list|grep -P '^\tcaps '
+ $ ceph-authtool kring --list|grep -E '^[[:space:]]caps '
\tcaps osd = "allow rx pool=swimming" (esc)
$ cat kring
$ grep "pg_num $PG_NUM" "$OUT" || cat $OUT
pool 0 pg_num 8000
$ TOTAL=$((POOL_COUNT * $PG_NUM))
- $ grep -P "size $SIZE\t$TOTAL" $OUT || cat $OUT
+ $ grep -E "size $SIZE[[:space:]]$TOTAL" $OUT || cat $OUT
size 3\t8000 (esc)
$ STATS_CRUSH=$(grep '^ avg ' "$OUT")
#
$ grep "pg_num $PG_NUM" "$OUT" || cat $OUT
pool 0 pg_num 8000
$ TOTAL=$((POOL_COUNT * $PG_NUM))
- $ grep -P "size $SIZE\t$TOTAL" $OUT || cat $OUT
+ $ grep -E "size $SIZE[[:space:]]$TOTAL" $OUT || cat $OUT
size 3\t8000 (esc)
$ STATS_RANDOM=$(grep '^ avg ' "$OUT")
# it is almost impossible to get the same stats with random and crush