Repository: GoogleCloudPlatform/PerfKitBenchmarker

Issue:
Cannot run bonnie++ on Azure
Cannot create the resource group on Azure because of a regexp mismatch.
I believe this is because Azure doesn't allow "++" in the resource group name.
Should be an easy fix though. 

This is the full error trace:

2016-11-24 01:37:29,329 d9c0f2e7 Thread-2 bonnie++(1/1) INFO     Running: azure group create pkbd9c0f2e7-bonnie++0 westus2
2016-11-24 01:37:31,056 d9c0f2e7 Thread-2 bonnie++(1/1) INFO     Ran azure group create pkbd9c0f2e7-bonnie++0 westus2. Got return code (1).
STDOUT: info:    Executing command group create
info:    Getting resource group pkbd9c0f2e7-bonnie++0


STDERR: error:   "resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._]+$/
error:   Error information has been recorded to /home/godha/.azure/azure.err
error:   group create command failed



Discussion:

Resolving patch:
diff --git a/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py b/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
--- a/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
+++ b/perfkitbenchmarker/linux_benchmarks/bonnie_benchmark.py
@@ -21,9 +21,9 @@
 from perfkitbenchmarker import sample
 
 
-BENCHMARK_NAME = 'bonnie++'
+BENCHMARK_NAME = 'bonnieplusplus'
 BENCHMARK_CONFIG = """
-bonnie++:
+bonnieplusplus:
   description: >
       Runs Bonnie++. Running this benchmark inside
       a container is currently not supported,
diff --git a/perfkitbenchmarker/providers/kubernetes/provider_info.py b/perfkitbenchmarker/providers/kubernetes/provider_info.py
--- a/perfkitbenchmarker/providers/kubernetes/provider_info.py
+++ b/perfkitbenchmarker/providers/kubernetes/provider_info.py
@@ -26,7 +26,7 @@ class KubernetesProviderInfo(provider_info.BaseProviderInfo):
                           'cassandra_stress', 'cluster_boot', 'fio',
                           'iperf', 'mesh_network', 'mongodb_ycsb',
                           'netperf', 'redis', 'sysbench_oltp']
-  UNSUPPORTED_BENCHMARKS = ['bonnie++', 'mysql_service']
+  UNSUPPORTED_BENCHMARKS = ['bonnieplusplus', 'mysql_service']
 
   CLOUD = providers.KUBERNETES
 
diff --git a/perfkitbenchmarker/providers/mesos/provider_info.py b/perfkitbenchmarker/providers/mesos/provider_info.py
--- a/perfkitbenchmarker/providers/mesos/provider_info.py
+++ b/perfkitbenchmarker/providers/mesos/provider_info.py
@@ -28,7 +28,7 @@ class MesosProviderInfo(provider_info.BaseProviderInfo):
                           'iperf', 'mongodb_ycsb', 'netperf', 'oldisim', 'ping',
                           'redis', 'redis_ycsb', 'scimark2', 'silo',
                           'sysbench_oltp']
-  UNSUPPORTED_BENCHMARKS = ['bonnie++', 'mysql_service']
+  UNSUPPORTED_BENCHMARKS = ['bonnieplusplus', 'mysql_service']
 
   CLOUD = providers.MESOS
 


Test patch:
diff --git a/tests/benchmark_sets_test.py b/tests/benchmark_sets_test.py
--- a/tests/benchmark_sets_test.py
+++ b/tests/benchmark_sets_test.py
@@ -163,15 +163,16 @@ def _ContainsModule(module_name, module_list):
   def testBenchmarkValidCommandLine2(self):
     # make sure the standard_set plus a listed benchmark expands
     # to a valid set of benchmarks
-    self.mock_flags.benchmarks = ['standard_set', 'bonnie++']
+    self.mock_flags.benchmarks = ['standard_set', 'bonnieplusplus']
     benchmark_tuple_list = benchmark_sets.GetBenchmarksFromFlags()
     self.assertIsNotNone(benchmark_tuple_list)
     self.assertGreater(len(benchmark_tuple_list), 0)
     for benchmark_tuple in benchmark_tuple_list:
       self.assertIn(benchmark_tuple[0].BENCHMARK_NAME,
                     self.valid_benchmark_names)
-    # make sure bonnie++ is a listed benchmark
-    self.assertTrue(self._ContainsModule('bonnie++', benchmark_tuple_list))
+    # make sure bonnieplusplus is a listed benchmark
+    self.assertTrue(self._ContainsModule('bonnieplusplus',
+                                         benchmark_tuple_list))
 
   def testBenchmarkValidCommandLine3(self):
     # make sure the command with two benchmarks is processed correctly