GoogleCloudPlatform / PerfKitBenchmarker

PerfKit Benchmarker (PKB) contains a set of benchmarks to measure and compare cloud offerings. The benchmarks use default settings to reflect what most users will see. PerfKit Benchmarker is licensed under the Apache 2 license terms. Please make sure to read, understand and agree to the terms of the LICENSE and CONTRIBUTING files before proceeding.
https://googlecloudplatform.github.io/PerfKitBenchmarker/
Apache License 2.0
1.91k stars 512 forks source link

ERROR Exception occurred while calling CreateAndBootVm(<BaseVirtualMachine [ip=None, internal_ip=None]>): #2022

Closed ashutoshbhatt1 closed 1 year ago

ashutoshbhatt1 commented 5 years ago

New to PKB as well as Openstack. I have been trying to run this command and see if basic PKB things are working or not with multiple Openstack instances I am running but endup getting the same error.

running this command from my local mac machine where I have performance kitbench mark is installed. Here

pkb.py --cloud=OpenStack --os_type=centos7 --machine_type=m1.medium --openstack_network=public --openstack_network=private --benchmarks=ping

2019-10-28 15:22:12,466 a853139b MainThread INFO Setting --max_concurrent_threads=200. 2019-10-28 15:22:12,486 a853139b MainThread WARNING The key "flags" was not in the default config, but was in user overrides. This may indicate a typo. 2019-10-28 15:22:12,602 a853139b MainThread ping(1/1) INFO Provisioning resources for benchmark ping 2019-10-28 15:22:12,603 a853139b Thread-1 ping(1/1) INFO Testing OpenStack CLI command is installed and working 2019-10-28 15:22:12,603 a853139b Thread-1 ping(1/1) INFO Running: openstack image list --format json 2019-10-28 15:22:14,867 a853139b Thread-1 ping(1/1) INFO Validating prerequisites. 2019-10-28 15:22:14,867 a853139b Thread-1 ping(1/1) INFO Running: openstack image show centos7 --format json 2019-10-28 15:22:16,363 a853139b Thread-1 ping(1/1) INFO Running: openstack flavor show m1.medium --format json 2019-10-28 15:22:18,098 a853139b Thread-1 ping(1/1) INFO Running: openstack network show private --format json 2019-10-28 15:22:19,447 a853139b Thread-1 ping(1/1) INFO Prerequisites validated. 2019-10-28 15:22:19,447 a853139b Thread-1 ping(1/1) INFO Running: openstack security group show perfkit_sc_group --format json 2019-10-28 15:22:20,745 a853139b Thread-1 ping(1/1) INFO Running: openstack keypair create perfkit_key_a853139b --format json --public-key /var/folders/sc/l_g86zr57qg0pr7jbxj3c3340000gn/T/perfkitbenchmarker/runs/a853139b/perfkitbenchmarker_keyfile.pub 2019-10-28 15:22:23,027 a853139b Thread-1 ping(1/1) INFO Running: openstack network show private --format json 2019-10-28 15:22:23,027 a853139b Thread-2 ping(1/1) INFO Running: openstack network show private --format json 2019-10-28 15:22:24,507 a853139b MainThread ping(1/1) ERROR Exception occurred while calling CreateAndBootVm(<BaseVirtualMachine [ip=None, internal_ip=None]>):

Can someone please help with this? I am not sure why I am getting exception error this script is trying to create the VM

dlott commented 5 years ago

Hi ashutoshbhatt1,

You may get more help by posting your complete pkb.log file. It should have at least the call stack for the exception.

ashutoshbhatt1 commented 5 years ago

2019-10-28 17:06:47,712 fb6f573e MainThread pkb.py:1037 INFO PerfKitBenchmarker version: v1.12.0-1468-g64f45ec1 2019-10-28 17:06:47,712 fb6f573e MainThread pkb.py:1011 INFO Flag values: --os_type=centos7 --cloud=OpenStack --benchmarks=ping --machine_type=m1.medium 2019-10-28 17:06:47,926 fb6f573e MainThread pkb.py:1080 INFO Setting --max_concurrent_threads=200. 2019-10-28 17:06:47,945 fb6f573e MainThread init.py:260 WARNING The key "flags" was not in the default config, but was in user overrides. This may indicate a typo. 2019-10-28 17:06:48,108 fb6f573e MainThread publisher.py:868 DEBUG Using publishers: [<LogPublisher logger=<RootLogger root (DEBUG)> level=20>, <PrettyPrintStreamPublisher stream=<_io.TextIOWrapper name='' mode='w' encoding='UTF-8'>>, ] 2019-10-28 17:06:48,108 fb6f573e MainThread publisher.py:868 DEBUG Using publishers: [<LogPublisher logger=<RootLogger root (DEBUG)> level=20>, <PrettyPrintStreamPublisher stream=<_io.TextIOWrapper name='' mode='w' encoding='UTF-8'>>, ] 2019-10-28 17:06:48,108 fb6f573e MainThread ping(1/1) pkb.py:611 INFO Provisioning resources for benchmark ping 2019-10-28 17:06:48,109 fb6f573e Thread-2 ping(1/1) os_virtual_machine.py:158 INFO Testing OpenStack CLI command is installed and working 2019-10-28 17:06:48,109 fb6f573e Thread-2 ping(1/1) vm_util.py:364 INFO Running: openstack image list --format json 2019-10-28 17:06:49,505 fb6f573e Thread-2 ping(1/1) vm_util.py:421 DEBUG Ran: {openstack image list --format json} ReturnCode:0 STDOUT: [ { "ID": "a7873a57-2aff-4994-b857-5b2dcc135f7a", "Name": "CentOS-7-x86_64", "Status": "active" }, { "ID": "1ddcd529-9fa9-4e56-8c6f-1e19f60f522f", "Name": "Cirros-0.4.0-x86_64", "Status": "active" }, { "ID": "d3b761c5-6ffb-40e4-af9e-1d6128cc127a", "Name": "centos7", "Status": "active" }, { "ID": "6b5e9e6f-9dbb-47b9-8b32-5b90f8651714", "Name": "cirros-0.4.0-x86_64-disk", "Status": "active" } ]

STDERR: 2019-10-28 17:06:49,505 fb6f573e Thread-2 ping(1/1) os_virtual_machine.py:175 INFO Validating prerequisites. 2019-10-28 17:06:49,506 fb6f573e Thread-2 ping(1/1) vm_util.py:364 INFO Running: openstack image show centos7 --format json 2019-10-28 17:06:51,065 fb6f573e Thread-2 ping(1/1) vm_util.py:421 DEBUG Ran: {openstack image show centos7 --format json} ReturnCode:0 STDOUT: { "checksum": "9eca98f4b3ad7e6dd4390a9d181381c9", "container_format": "bare", "created_at": "2019-10-24T22:38:54Z", "disk_format": "qcow2", "file": "/v2/images/d3b761c5-6ffb-40e4-af9e-1d6128cc127a/file", "id": "d3b761c5-6ffb-40e4-af9e-1d6128cc127a", "min_disk": 0, "min_ram": 0, "name": "centos7", "owner": "126018e06c134d9cb4a2e1c972e62ffd", "properties": { "os_hash_algo": "sha512", "os_hidden": false, "os_hash_value": "f71f68dd1e873d0a197a9c7fa0d28eb99ff1e6aa94b6817f31e058a07da0ac145f4bf86199fa83c910e131b5c3a0daeb3eb3fb3546f06099b5c1616b5bea0025" }, "protected": false, "schema": "/v2/schemas/image", "size": 1004994560, "status": "active", "tags": [], "updated_at": "2019-10-24T22:38:59Z", "virtual_size": null, "visibility": "shared" }

STDERR: 2019-10-28 17:06:51,065 fb6f573e Thread-2 ping(1/1) vm_util.py:364 INFO Running: openstack flavor show m1.medium --format json 2019-10-28 17:06:52,773 fb6f573e Thread-2 ping(1/1) vm_util.py:421 DEBUG Ran: {openstack flavor show m1.medium --format json} ReturnCode:0 STDOUT: { "OS-FLV-DISABLED:disabled": false, "OS-FLV-EXT-DATA:ephemeral": 0, "access_project_ids": null, "disk": 40, "id": "3", "name": "m1.medium", "os-flavor-access:is_public": true, "properties": "", "ram": 4096, "rxtx_factor": 1.0, "swap": "", "vcpus": 2 }

STDERR: 2019-10-28 17:06:52,773 fb6f573e Thread-2 ping(1/1) vm_util.py:364 INFO Running: openstack network show private --format json 2019-10-28 17:06:54,197 fb6f573e Thread-2 ping(1/1) vm_util.py:421 DEBUG Ran: {openstack network show private --format json} ReturnCode:0 STDOUT: { "admin_state_up": true, "availability_zone_hints": [], "availability_zones": [ "nova" ], "created_at": "2019-10-23T17:03:03Z", "description": "", "dns_domain": null, "id": "22d96616-aefe-4edc-b536-161bd2f7ba6a", "ipv4_address_scope": null, "ipv6_address_scope": null, "is_default": null, "is_vlan_transparent": null, "location": { "cloud": "", "region_name": "RegionOne", "zone": null, "project": { "id": "b8c876ed8712413cbab05000118b524e", "name": null, "domain_id": null, "domain_name": null } }, "mtu": 1450, "name": "private", "port_security_enabled": true, "project_id": "b8c876ed8712413cbab05000118b524e", "provider:network_type": "vxlan", "provider:physical_network": null, "provider:segmentation_id": 27, "qos_policy_id": null, "revision_number": 3, "router:external": false, "segments": null, "shared": false, "status": "ACTIVE", "subnets": [ "0412fc30-229c-4cbd-8fca-6a5389c79a54", "d484284f-734e-4ef6-bfc7-fa7cd0a42dac" ], "tags": [], "updated_at": "2019-10-23T17:03:07Z" }

STDERR: 2019-10-28 17:06:54,198 fb6f573e Thread-2 ping(1/1) os_virtual_machine.py:180 INFO Prerequisites validated. 2019-10-28 17:06:54,198 fb6f573e Thread-2 ping(1/1) vm_util.py:364 INFO Running: openstack security group show perfkit_sc_group --format json 2019-10-28 17:06:55,612 fb6f573e Thread-2 ping(1/1) vm_util.py:421 DEBUG Ran: {openstack security group show perfkit_sc_group --format json} ReturnCode:0 STDOUT: { "created_at": "2019-10-24T22:39:38Z", "description": "perfkit_sc_group", "id": "66bc7d29-f6ba-42d6-b280-62617c444616", "location": { "cloud": "", "region_name": "RegionOne", "zone": null, "project": { "id": "126018e06c134d9cb4a2e1c972e62ffd", "name": "admin", "domain_id": "default", "domain_name": null } }, "name": "perfkit_sc_group", "project_id": "126018e06c134d9cb4a2e1c972e62ffd", "revision_number": 1, "rules": [ { "direction": "egress", "protocol": null, "description": null, "tags": [], "port_range_max": null, "updated_at": "2019-10-24T22:39:38Z", "revision_number": 0, "id": "27f8d6b8-c61c-404c-b19d-22611c95b60a", "remote_group_id": null, "remote_ip_prefix": null, "created_at": "2019-10-24T22:39:38Z", "security_group_id": "66bc7d29-f6ba-42d6-b280-62617c444616", "tenant_id": "126018e06c134d9cb4a2e1c972e62ffd", "port_range_min": null, "ethertype": "IPv4", "project_id": "126018e06c134d9cb4a2e1c972e62ffd" }, { "direction": "egress", "protocol": null, "description": null, "tags": [], "port_range_max": null, "updated_at": "2019-10-24T22:39:38Z", "revision_number": 0, "id": "efc73b5b-f0c1-4494-a686-878df068c134", "remote_group_id": null, "remote_ip_prefix": null, "created_at": "2019-10-24T22:39:38Z", "security_group_id": "66bc7d29-f6ba-42d6-b280-62617c444616", "tenant_id": "126018e06c134d9cb4a2e1c972e62ffd", "port_range_min": null, "ethertype": "IPv6", "project_id": "126018e06c134d9cb4a2e1c972e62ffd" } ], "tags": [], "updated_at": "2019-10-24T22:39:38Z" }

STDERR: 2019-10-28 17:06:55,613 fb6f573e Thread-2 ping(1/1) vm_util.py:364 INFO Running: openstack keypair create perfkit_key_fb6f573e --format json --public-key /var/folders/sc/l_g86zr57qg0pr7jbxj3c3340000gn/T/perfkitbenchmarker/runs/fb6f573e/perfkitbenchmarker_keyfile.pub 2019-10-28 17:06:57,974 fb6f573e Thread-2 ping(1/1) vm_util.py:421 DEBUG Ran: {openstack keypair create perfkit_key_fb6f573e --format json --public-key /var/folders/sc/l_g86zr57qg0pr7jbxj3c3340000gn/T/perfkitbenchmarker/runs/fb6f573e/perfkitbenchmarker_keyfile.pub} ReturnCode:0 STDOUT: { "fingerprint": "3d:09:b5:af:48:4a:05:76:1d:12:51:c8:1c:42:80:d4", "name": "perfkit_key_fb6f573e", "user_id": "846ecaf47177425a9cb4b9613e29bd87" }

STDERR: 2019-10-28 17:06:57,975 fb6f573e Thread-2 ping(1/1) vm_util.py:364 INFO Running: openstack network show private --format json 2019-10-28 17:06:57,975 fb6f573e Thread-1 ping(1/1) vm_util.py:364 INFO Running: openstack network show private --format json 2019-10-28 17:06:59,317 fb6f573e Thread-2 ping(1/1) vm_util.py:421 DEBUG Ran: {openstack network show private --format json} ReturnCode:0 STDOUT: { "admin_state_up": true, "availability_zone_hints": [], "availability_zones": [ "nova" ], "created_at": "2019-10-23T17:03:03Z", "description": "", "dns_domain": null, "id": "22d96616-aefe-4edc-b536-161bd2f7ba6a", "ipv4_address_scope": null, "ipv6_address_scope": null, "is_default": null, "is_vlan_transparent": null, "location": { "cloud": "", "region_name": "RegionOne", "zone": null, "project": { "id": "b8c876ed8712413cbab05000118b524e", "name": null, "domain_id": null, "domain_name": null } }, "mtu": 1450, "name": "private", "port_security_enabled": true, "project_id": "b8c876ed8712413cbab05000118b524e", "provider:network_type": "vxlan", "provider:physical_network": null, "provider:segmentation_id": 27, "qos_policy_id": null, "revision_number": 3, "router:external": false, "segments": null, "shared": false, "status": "ACTIVE", "subnets": [ "d484284f-734e-4ef6-bfc7-fa7cd0a42dac", "0412fc30-229c-4cbd-8fca-6a5389c79a54" ], "tags": [], "updated_at": "2019-10-23T17:03:07Z" }

STDERR: 2019-10-28 17:06:59,333 fb6f573e MainThread ping(1/1) background_tasks.py:545 ERROR Exception occurred while calling CreateAndBootVm(<BaseVirtualMachine [ip=None, internal_ip=None]>): Traceback (most recent call last): File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/background_tasks.py", line 255, in Run self.return_value = self.target(*self.args, self.kwargs) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/benchmark_spec.py", line 721, in CreateAndBootVm vm.Create() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/resource.py", line 256, in Create self._CreateDependencies() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/os_virtual_machine.py", line 104, in _CreateDependencies source_range = self._GetInternalNetworkCIDR() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/os_virtual_machine.py", line 373, in GetInternalNetworkCIDR stdout, , _ = subnet_cmd.Issue() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/utils.py", line 95, in Issue return vm_util.IssueCommand(self._GetCommand(), kwargs) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 363, in IssueCommand full_cmd = ' '.join(cmd) TypeError: sequence item 3: expected str instance, list found

2019-10-28 17:06:59,385 fb6f573e Thread-1 ping(1/1) vm_util.py:421 DEBUG Ran: {openstack network show private --format json} ReturnCode:0 STDOUT: { "admin_state_up": true, "availability_zone_hints": [], "availability_zones": [ "nova" ], "created_at": "2019-10-23T17:03:03Z", "description": "", "dns_domain": null, "id": "22d96616-aefe-4edc-b536-161bd2f7ba6a", "ipv4_address_scope": null, "ipv6_address_scope": null, "is_default": null, "is_vlan_transparent": null, "location": { "cloud": "", "region_name": "RegionOne", "zone": null, "project": { "id": "b8c876ed8712413cbab05000118b524e", "name": null, "domain_id": null, "domain_name": null } }, "mtu": 1450, "name": "private", "port_security_enabled": true, "project_id": "b8c876ed8712413cbab05000118b524e", "provider:network_type": "vxlan", "provider:physical_network": null, "provider:segmentation_id": 27, "qos_policy_id": null, "revision_number": 3, "router:external": false, "segments": null, "shared": false, "status": "ACTIVE", "subnets": [ "d484284f-734e-4ef6-bfc7-fa7cd0a42dac", "0412fc30-229c-4cbd-8fca-6a5389c79a54" ], "tags": [], "updated_at": "2019-10-23T17:03:07Z" }

STDERR: 2019-10-28 17:06:59,401 fb6f573e MainThread ping(1/1) background_tasks.py:545 ERROR Exception occurred while calling CreateAndBootVm(<BaseVirtualMachine [ip=None, internal_ip=None]>): Traceback (most recent call last): File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/background_tasks.py", line 255, in Run self.return_value = self.target(*self.args, self.kwargs) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/benchmark_spec.py", line 721, in CreateAndBootVm vm.Create() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/resource.py", line 256, in Create self._CreateDependencies() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/os_virtual_machine.py", line 104, in _CreateDependencies source_range = self._GetInternalNetworkCIDR() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/os_virtual_machine.py", line 373, in GetInternalNetworkCIDR stdout, , _ = subnet_cmd.Issue() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/utils.py", line 95, in Issue return vm_util.IssueCommand(self._GetCommand(), kwargs) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 363, in IssueCommand full_cmd = ' '.join(cmd) TypeError: sequence item 3: expected str instance, list found

2019-10-28 17:06:59,405 fb6f573e MainThread ping(1/1) pkb.py:882 ERROR Error during benchmark ping Traceback (most recent call last): File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 833, in RunBenchmark DoProvisionPhase(spec, detailed_timer) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 633, in DoProvisionPhase spec.Provision() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/benchmark_spec.py", line 537, in Provision post_task_delay=FLAGS.create_and_boot_post_task_delay) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/background_tasks.py", line 652, in RunThreaded post_task_delay=post_task_delay) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/background_tasks.py", line 587, in RunParallelThreads errors.VmUtil.ThreadException, post_task_delay) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/background_tasks.py", line 561, in _RunParallelTasks '{0}{1}'.format(os.linesep, os.linesep.join(error_strings))) perfkitbenchmarker.errors.VmUtil.ThreadException: The following exceptions occurred during parallel execution: Exception occurred while calling CreateAndBootVm(<BaseVirtualMachine [ip=None, internal_ip=None]>): Traceback (most recent call last): File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/background_tasks.py", line 255, in Run self.return_value = self.target(*self.args, self.kwargs) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/benchmark_spec.py", line 721, in CreateAndBootVm vm.Create() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/resource.py", line 256, in Create self._CreateDependencies() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/os_virtual_machine.py", line 104, in _CreateDependencies source_range = self._GetInternalNetworkCIDR() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/os_virtual_machine.py", line 373, in GetInternalNetworkCIDR stdout, , _ = subnet_cmd.Issue() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/utils.py", line 95, in Issue return vm_util.IssueCommand(self._GetCommand(), kwargs) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 363, in IssueCommand full_cmd = ' '.join(cmd) TypeError: sequence item 3: expected str instance, list found

Exception occurred while calling CreateAndBootVm(<BaseVirtualMachine [ip=None, internal_ip=None]>): Traceback (most recent call last): File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/background_tasks.py", line 255, in Run self.return_value = self.target(*self.args, self.kwargs) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/benchmark_spec.py", line 721, in CreateAndBootVm vm.Create() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/resource.py", line 256, in Create self._CreateDependencies() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/os_virtual_machine.py", line 104, in _CreateDependencies source_range = self._GetInternalNetworkCIDR() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/os_virtual_machine.py", line 373, in GetInternalNetworkCIDR stdout, , _ = subnet_cmd.Issue() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/utils.py", line 95, in Issue return vm_util.IssueCommand(self._GetCommand(), kwargs) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 363, in IssueCommand full_cmd = ' '.join(cmd) TypeError: sequence item 3: expected str instance, list found

2019-10-28 17:06:59,409 fb6f573e Thread-11 ping(1/1) vm_util.py:364 INFO Running: openstack keypair delete perfkit_key_fb6f573e 2019-10-28 17:07:02,535 fb6f573e Thread-11 ping(1/1) vm_util.py:421 DEBUG Ran: {openstack keypair delete perfkit_key_fb6f573e} ReturnCode:0 STDOUT: STDERR: 2019-10-28 17:07:02,555 fb6f573e MainThread ping(1/1) pkb.py:990 ERROR Exception running benchmark Traceback (most recent call last): File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 988, in RunBenchmarkTask RunBenchmark(spec, collector) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 833, in RunBenchmark DoProvisionPhase(spec, detailed_timer) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 633, in DoProvisionPhase spec.Provision() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/benchmark_spec.py", line 537, in Provision post_task_delay=FLAGS.create_and_boot_post_task_delay) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/background_tasks.py", line 652, in RunThreaded post_task_delay=post_task_delay) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/background_tasks.py", line 587, in RunParallelThreads errors.VmUtil.ThreadException, post_task_delay) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/background_tasks.py", line 561, in _RunParallelTasks '{0}{1}'.format(os.linesep, os.linesep.join(error_strings))) perfkitbenchmarker.errors.VmUtil.ThreadException: The following exceptions occurred during parallel execution: Exception occurred while calling CreateAndBootVm(<BaseVirtualMachine [ip=None, internal_ip=None]>): Traceback (most recent call last): File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/background_tasks.py", line 255, in Run self.return_value = self.target(*self.args, self.kwargs) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/benchmark_spec.py", line 721, in CreateAndBootVm vm.Create() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/resource.py", line 256, in Create self._CreateDependencies() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/os_virtual_machine.py", line 104, in _CreateDependencies source_range = self._GetInternalNetworkCIDR() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/os_virtual_machine.py", line 373, in GetInternalNetworkCIDR stdout, , _ = subnet_cmd.Issue() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/utils.py", line 95, in Issue return vm_util.IssueCommand(self._GetCommand(), kwargs) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 363, in IssueCommand full_cmd = ' '.join(cmd) TypeError: sequence item 3: expected str instance, list found

Exception occurred while calling CreateAndBootVm(<BaseVirtualMachine [ip=None, internal_ip=None]>): Traceback (most recent call last): File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/background_tasks.py", line 255, in Run self.return_value = self.target(*self.args, self.kwargs) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/benchmark_spec.py", line 721, in CreateAndBootVm vm.Create() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/resource.py", line 256, in Create self._CreateDependencies() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/os_virtual_machine.py", line 104, in _CreateDependencies source_range = self._GetInternalNetworkCIDR() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/os_virtual_machine.py", line 373, in GetInternalNetworkCIDR stdout, , _ = subnet_cmd.Issue() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/utils.py", line 95, in Issue return vm_util.IssueCommand(self._GetCommand(), kwargs) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 363, in IssueCommand full_cmd = ' '.join(cmd) TypeError: sequence item 3: expected str instance, list found

2019-10-28 17:07:02,556 fb6f573e MainThread ping(1/1) pkb.py:997 ERROR Benchmark 1/1 ping (UID: ping0) failed. Execution will continue. 2019-10-28 17:07:02,557 fb6f573e MainThread ping(1/1) pkb.py:1129 INFO Benchmark run statuses:

Name UID Status Failed Substatus

ping ping0 FAILED

Success rate: 0.00% (0/1) 2019-10-28 17:07:02,557 fb6f573e MainThread ping(1/1) pkb.py:1132 INFO Complete logs can be found at: /var/folders/sc/l_g86zr57qg0pr7jbxj3c3340000gn/T/perfkitbenchmarker/runs/fb6f573e/pkb.log 2019-10-28 17:07:02,557 fb6f573e MainThread ping(1/1) pkb.py:1134 INFO Completion statuses can be found at: /var/folders/sc/l_g86zr57qg0pr7jbxj3c3340000gn/T/perfkitbenchmarker/runs/fb6f573e/completion_statuses.json

ashutoshbhatt1 commented 5 years ago

@dlott I just posted the full log in above comment. Hopefully, that might be enough to tell what is going on. Thanks

dlott commented 5 years ago

You appear to have two subnets created

"subnets": [
"d484284f-734e-4ef6-bfc7-fa7cd0a42dac",
"0412fc30-229c-4cbd-8fca-6a5389c79a54"
],

but the code is only expecting to have one (as a string not an array) https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blame/4eaf823d5e3e49b700a6557ff1a889e558d2446c/perfkitbenchmarker/providers/openstack/os_virtual_machine.py#L370

perhaps @meteorfox can provide some insight as to the expected behavior.

ashutoshbhatt1 commented 5 years ago

Thanks for reply @dlott . Even I try the same script with Openstack server where I have one network configure but getting the same error there.

STDERR: 2019-10-28 18:59:57,827 3b940071 Thread-1 ping(1/1) vm_util.py:364 INFO Running: openstack network show external-network-shared --format json 2019-10-28 18:59:57,827 3b940071 Thread-2 ping(1/1) vm_util.py:364 INFO Running: openstack network show external-network-shared --format json 2019-10-28 19:00:00,238 3b940071 Thread-2 ping(1/1) vm_util.py:421 DEBUG Ran: {openstack network show external-network-shared --format json} ReturnCode:0 STDOUT: { "admin_state_up": true, "availability_zone_hints": [], "availability_zones": [ "nova" ], "created_at": "2019-10-25T12:55:15Z", "description": "", "dns_domain": null, "id": "22ef778f-b972-4491-be76-d86a582bb6ff", "ipv4_address_scope": null, "ipv6_address_scope": null, "is_default": false, "is_vlan_transparent": null, "location": { "cloud": "", "region_name": "RegionOne", "zone": null, "project": { "id": "629c3d24e96d492cbb27dadee3b7eda6", "name": "admin", "domain_id": "default", "domain_name": null } }, "mtu": 1500, "name": "external-network-shared", "port_security_enabled": true, "project_id": "629c3d24e96d492cbb27dadee3b7eda6", "provider:network_type": "flat", "provider:physical_network": "external-network-shared", "provider:segmentation_id": null, "qos_policy_id": null, "revision_number": 3, "router:external": true, "segments": null, "shared": true, "status": "ACTIVE", "subnets": [ "687422cc-d9cf-4271-9642-7a1ef1c47528" ], "tags": [], "updated_at": "2019-10-25T12:55:18Z" }

STDERR: 2019-10-28 19:00:00,272 3b940071 Thread-1 ping(1/1) vm_util.py:421 DEBUG Ran: {openstack network show external-network-shared --format json} ReturnCode:0 STDOUT: { "admin_state_up": true, "availability_zone_hints": [], "availability_zones": [ "nova" ], "created_at": "2019-10-25T12:55:15Z", "description": "", "dns_domain": null, "id": "22ef778f-b972-4491-be76-d86a582bb6ff", "ipv4_address_scope": null, "ipv6_address_scope": null, "is_default": false, "is_vlan_transparent": null, "location": { "cloud": "", "region_name": "RegionOne", "zone": null, "project": { "id": "629c3d24e96d492cbb27dadee3b7eda6", "name": "admin", "domain_id": "default", "domain_name": null } }, "mtu": 1500, "name": "external-network-shared", "port_security_enabled": true, "project_id": "629c3d24e96d492cbb27dadee3b7eda6", "provider:network_type": "flat", "provider:physical_network": "external-network-shared", "provider:segmentation_id": null, "qos_policy_id": null, "revision_number": 3, "router:external": true, "segments": null, "shared": true, "status": "ACTIVE", "subnets": [ "687422cc-d9cf-4271-9642-7a1ef1c47528" ], "tags": [], "updated_at": "2019-10-25T12:55:18Z" }

STDERR: 2019-10-28 19:00:00,277 3b940071 MainThread ping(1/1) background_tasks.py:545 ERROR Exception occurred while calling CreateAndBootVm(<BaseVirtualMachine [ip=None, internal_ip=None]>): Traceback (most recent call last): File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/background_tasks.py", line 255, in Run self.return_value = self.target(*self.args, self.kwargs) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/benchmark_spec.py", line 721, in CreateAndBootVm vm.Create() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/resource.py", line 256, in Create self._CreateDependencies() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/os_virtual_machine.py", line 104, in _CreateDependencies source_range = self._GetInternalNetworkCIDR() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/os_virtual_machine.py", line 373, in GetInternalNetworkCIDR stdout, , _ = subnet_cmd.Issue() File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/utils.py", line 95, in Issue return vm_util.IssueCommand(self._GetCommand(), kwargs) File "/Users/ashutoshbhatt/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 363, in IssueCommand full_cmd = ' '.join(cmd) TypeError: sequence item 3: expected str instance, list found

ashutoshbhatt1 commented 5 years ago

@dlott Any idea when @meteorfox will look into it? I am running this with python 3. Below is the command I am running

/usr/local/bin/python3.7 /Users/ashutoshbhatt/PerfKitBenchmarker/pkb.py --cloud=OpenStack --os_type=centos7 --machine_type=m1.medium --openstack_network=private --benchmarks=ping

dlott commented 5 years ago

Does it work with python2?

Unfortunately I don't know when/if @meteorfox will look at it. I just know he wrote the vast majority of the code in https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blame/4eaf823d5e3e49b700a6557ff1a889e558d2446c/perfkitbenchmarker/providers/openstack/os_virtual_machine.py

ichbinfrog commented 4 years ago

Hi, I think this issue is not related to python versions and more related to the Openstack client.

https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/c3f9c01efd29214d1d90339e04f7aa57187a6b32/perfkitbenchmarker/providers/openstack/os_virtual_machine.py#L368-L370

The result of applying openstack network show self.network_name returns a list of strings and not a single string. This makes full_cmd = ' '.join(cmd) in IssueCommand break.

In order to resolve this issue, I think it's possible to add a small check before hand and using only the first element:

    net_stdout, _, _ = net_cmd.Issue() 
    network = json.loads(net_stdout) 

    if type(network['subnets']) is list:
        self.subnet_id = network['subnets'][0] 
    else:
        self.subnet_id = network['subnets']
ashutoshbhatt1 commented 4 years ago

@ichbinfrog That really worked. Thanks for the help. That fix is really important since new version of Openstack gives you return value of Subnets in list format. I am not sure who should commit that fix.