GoogleCloudPlatform / GoogleCloudPlatform/PerfKitBenchmarker

run bonnie++ reports "You must use the "-u" switch when running as root."

Open
#1,770 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2k
Forks
562
Avg merge
4h 55m
Merged PRs (30d)
69

Description

Maybe we can add "-u" to avoid this issue in case of running as root:
```
diff --git a/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py b/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
index e3ae784..a0e1e0f 100644
--- a/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
+++ b/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
@@ -263,9 +263,10 @@ def Run(benchmark_spec):
vms = benchmark_spec.vms
vm = vms[0]
logging.info('Bonnie++ running on %s', vm)
- bonnie_command = ('/usr/sbin/bonnie++ -q -d %s -s %d -n 100 -f' %
+ bonnie_command = ('/usr/sbin/bonnie++ -q -d %s -s %d -n 100 -f -u %s' %
(vm.GetScratchDir(),
- 2 * vm.total_memory_kb / 1024))
+ 2 * vm.total_memory_kb / 1024,
+ vm.user_name))
logging.info('Bonnie++ Results:')
out, _ = vm.RemoteCommand(bonnie_command, should_log=True)
return ParseCSVResults(out.strip())
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.