]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/script/run-cbt.sh
import quincy beta 17.1.0
[ceph.git] / ceph / src / script / run-cbt.sh
index 116cc77f22f0eb982f7b9b10c67d2f163a410f40..ad7e0ce2e6f76143f77f4a56847f6e28a2f62228 100755 (executable)
@@ -100,7 +100,7 @@ if ! $use_existing; then
            --without-dashboard
     else
         MDS=0 MGR=1 OSD=3 MON=1 $source_dir/src/vstart.sh -n -X \
-           --without-dashboard --memstore \
+           --without-dashboard --cyanstore \
            -o "memstore_device_bytes=34359738368" \
            --crimson --nodaemon --redirect-output \
            --osd-args "--memory 4G"
@@ -108,6 +108,17 @@ if ! $use_existing; then
     cd - || exit
 fi
 
+# i need to read the performance events,
+# see https://www.kernel.org/doc/Documentation/sysctl/kernel.txt
+if /sbin/capsh --supports=cap_sys_admin; then
+    perf_event_paranoid=$(/sbin/sysctl --values kernel.perf_event_paranoid)
+    if test $perf_event_paranoid -gt 0; then
+        sudo /sbin/sysctl -q -w kernel.perf_event_paranoid=0
+    fi
+else
+    echo "without cap_sys_admin, $(whoami) cannot read the perf events"
+fi
+
 for config_file in $config_files; do
     echo "testing $config_file"
     cbt_config=$(mktemp $config_file.XXXX.yaml)
@@ -122,6 +133,11 @@ for config_file in $config_files; do
     rm -f $cbt_config
 done
 
+if test -n "$perf_event_paranoid"; then
+    # restore the setting
+    sudo /sbin/sysctl -q -w kernel.perf_event_paranoid=$perf_event_paranoid
+fi
+
 if ! $use_existing; then
     cd $build_dir || exit
     if $classical; then