spcl / serverless-benchmarks

SeBS: serverless benchmarking suite for automatic performance analysis of FaaS platforms.
https://mcopik.github.io/projects/sebs/
BSD 3-Clause "New" or "Revised" License
149 stars 66 forks source link

Runtime error trying to run perf-cost experiment using openwhisk #143

Closed jchigu closed 1 year ago

jchigu commented 1 year ago

Good day I need help on the following runtime error. The full list of configurations is given below this error.

(python-venv) justin@SeBS:~/serverless-benchmarks$ ./sebs.py experiment invoke perf-cost --config config/openwhisk.json --deployment openwhisk --verbose

09:03:54,625 INFO SeBS-e332: Created experiment output at /home/justin/serverless-benchmarks

09:03:55,203 INFO OpenWhisk.Resources-6b39: Using user-provided configuration of storage for OpenWhisk.

09:03:55,209 INFO Benchmark-28dd: Using cached benchmark 110.dynamic-html at /home/justin/serverless-benchmarks/cache/110.dynamic-html/openwhisk/python/3.7/110.dynamic-html.zip

09:03:55,210 INFO OpenWhisk-fb7d: Creating new function! Reason: function 110.dynamic-html-python-3.7 not found in cache.

09:03:55,210 INFO OpenWhisk-fb7d: Creating function as an action in OpenWhisk.

09:03:55,267 INFO OpenWhisk-fb7d: Creating new OpenWhisk action 110.dynamic-html-python-3.7

09:03:55,320 ERROR OpenWhisk-fb7d: Cannot create action 110.dynamic-html-python-3.7.

ERROR:root:Command '['wsk', '-i', 'action', 'create', '110.dynamic-html-python-3.7', '--web', 'true', '--docker', 'spcleth/serverless-benchmarks:function.openwhisk.110.dynamic-html.python-3.7', '--memory', '128', '--timeout', '10000', '-p', 'MINIO_STORAGE_SECRET_KEY', '14d68dd6c12ca944c85cbee46c4971dbe7f7dabe78a74ca8f104356388dfbe9e', '-p', 'MINIO_STORAGE_ACCESS_KEY', '289EOAtOXuJvYNg-_AUN7Kf2c8sPjdv0JQoOgYA9YqY', '-p', 'MINIO_STORAGE_CONNECTION_URL', '10.0.2.15:9011', '/home/justin/serverless-benchmarks/cache/110.dynamic-html/openwhisk/python/3.7/110.dynamic-html.zip']' returned non-zero exit status 255.

Traceback (most recent call last):

File "/home/justin/serverless-benchmarks/sebs/openwhisk/openwhisk.py", line 279, in create_function

subprocess.run(

File "/usr/lib/python3.10/subprocess.py", line 524, in run

raise CalledProcessError(retcode, process.args,

subprocess.CalledProcessError: Command '['wsk', '-i', 'action', 'create', '110.dynamic-html-python-3.7', '--web', 'true', '--docker', 'spcleth/serverless-benchmarks:function.openwhisk.110.dynamic-html.python-3.7', '--memory', '128', '--timeout', '10000', '-p', 'MINIO_STORAGE_SECRET_KEY', '14d68dd6c12ca944c85cbee46c4971dbe7f7dabe78a74ca8f104356388dfbe9e', '-p', 'MINIO_STORAGE_ACCESS_KEY', '289EOAtOXuJvYNg-_AUN7Kf2c8sPjdv0JQoOgYA9YqY', '-p', 'MINIO_STORAGE_CONNECTION_URL', '10.0.2.15:9011', '/home/justin/serverless-benchmarks/cache/110.dynamic-html/openwhisk/python/3.7/110.dynamic-html.zip']' returned non-zero exit status 255.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/home/justin/serverless-benchmarks/./sebs.py", line 30, in call

return self.main(*args, **kwargs)

File "/home/justin/serverless-benchmarks/python-venv/lib/python3.10/site-packages/click/core.py", line 1055, in main

rv = self.invoke(ctx)

File "/home/justin/serverless-benchmarks/python-venv/lib/python3.10/site-packages/click/core.py", line 1657, in invoke

return _process_result(sub_ctx.command.invoke(sub_ctx))

File "/home/justin/serverless-benchmarks/python-venv/lib/python3.10/site-packages/click/core.py", line 1657, in invoke

return _process_result(sub_ctx.command.invoke(sub_ctx))

File "/home/justin/serverless-benchmarks/python-venv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke

return ctx.invoke(self.callback, **ctx.params)

File "/home/justin/serverless-benchmarks/python-venv/lib/python3.10/site-packages/click/core.py", line 760, in invoke

return __callback(*args, **kwargs)

File "/home/justin/serverless-benchmarks/./sebs.py", line 72, in wrapper

return func(*args, **kwargs)

File "/home/justin/serverless-benchmarks/./sebs.py", line 97, in wrapper

return func(*args, **kwargs)

File "/home/justin/serverless-benchmarks/./sebs.py", line 462, in experiment_invoke

experiment.prepare(sebs_client, deployment_client)

File "/home/justin/serverless-benchmarks/sebs/experiments/perf_cost.py", line 50, in prepare

self._function = deployment_client.get_function(self._benchmark)

File "/home/justin/serverless-benchmarks/sebs/faas/system.py", line 176, in get_function

function = self.create_function(code_package, func_name)

File "/home/justin/serverless-benchmarks/sebs/openwhisk/openwhisk.py", line 306, in create_function

raise RuntimeError(e)

RuntimeError: Command '['wsk', '-i', 'action', 'create', '110.dynamic-html-python-3.7', '--web', 'true', '--docker', 'spcleth/serverless-benchmarks:function.openwhisk.110.dynamic-html.python-3.7', '--memory', '128', '--timeout', '10000', '-p', 'MINIO_STORAGE_SECRET_KEY', '14d68dd6c12ca944c85cbee46c4971dbe7f7dabe78a74ca8f104356388dfbe9e', '-p', 'MINIO_STORAGE_ACCESS_KEY', '289EOAtOXuJvYNg-_AUN7Kf2c8sPjdv0JQoOgYA9YqY', '-p', 'MINIO_STORAGE_CONNECTION_URL', '10.0.2.15:9011', '/home/justin/serverless-benchmarks/cache/110.dynamic-html/openwhisk/python/3.7/110.dynamic-html.zip']' returned non-zero exit status 255.

INFO:Benchmark-d09d:Update cached config /home/justin/serverless-benchmarks/cache/openwhisk.json

(python-venv) justin@SeBS:~/serverless-benchmarks$

=======================MY CONFIGURATIONS FOR OPENWHISK-------------------- (python-venv) justin@SeBS:~/serverless-benchmarks$ ./sebs.py storage start minio --port 9011 --output-json out_storage.json

08:55:25,323 INFO root: Starting storage Storage.MINIO on port 9011.

08:55:25,323 INFO minio.Minio-cf22: Minio storage ACCESS_KEY=289EOAtOXuJvYNg-_AUN7Kf2c8sPjdv0JQoOgYA9YqY

08:55:25,323 INFO minio.Minio-cf22: Minio storage SECRET_KEY=14d68dd6c12ca944c85cbee46c4971dbe7f7dabe78a74ca8f104356388dfbe9e

08:55:28,401 INFO minio.Minio-cf22: Starting minio instance at 172.17.0.2:9000

08:55:28,402 INFO root: Writing storage configuration to out_storage.json.

(python-venv) justin@SeBS:~/serverless-benchmarks$ cat out_out_storage.json

cat: out_out_storage.json: No such file or directory

(python-venv) justin@SeBS:~/serverless-benchmarks$ cat out_storage.json

{

"address": "172.17.0.2:9000",

"mapped_port": 9011,

"access_key": "289EOAtOXuJvYNg-_AUN7Kf2c8sPjdv0JQoOgYA9YqY",

"secret_key": "14d68dd6c12ca944c85cbee46c4971dbe7f7dabe78a74ca8f104356388dfbe9e",

"instance_id": "6a8ce4ef2bb3a31d3da89006d72967c751399bf2ac469b84ced77f46934c7f0c",

"input_buckets": [],

"output_buckets": [],

"type": "minio"

}(python-venv) justin@SeBS:~/serverless-benchmarks$ ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000

link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

inet 127.0.0.1/8 scope host lo

   valid_lft forever preferred_lft forever

inet6 ::1/128 scope host 

   valid_lft forever preferred_lft forever

2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000

link/ether 08:00:27:c0:ba:4c brd ff:ff:ff:ff:ff:ff

inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic noprefixroute enp0s3

   valid_lft 85635sec preferred_lft 85635sec

inet6 fe80::4530:32a7:374b:76da/64 scope link noprefixroute 

   valid_lft forever preferred_lft forever

3: br-97fbc1797175: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default

link/ether 02:42:fd:25:47:70 brd ff:ff:ff:ff:ff:ff

inet 172.18.0.1/16 brd 172.18.255.255 scope global br-97fbc1797175

   valid_lft forever preferred_lft forever

inet6 fc00:f853:ccd:e793::1/64 scope global 

   valid_lft forever preferred_lft forever

inet6 fe80::42:fdff:fe25:4770/64 scope link 

   valid_lft forever preferred_lft forever

inet6 fe80::1/64 scope link 

   valid_lft forever preferred_lft forever

4: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default

link/ether 02:42:c5:be:e2:04 brd ff:ff:ff:ff:ff:ff

inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0

   valid_lft forever preferred_lft forever

inet6 fe80::42:c5ff:febe:e204/64 scope link 

   valid_lft forever preferred_lft forever

6: veth61b6415@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-97fbc1797175 state UP group default

link/ether ee:f9:0e:cd:80:d3 brd ff:ff:ff:ff:ff:ff link-netnsid 0

inet6 fe80::ecf9:eff:fecd:80d3/64 scope link 

   valid_lft forever preferred_lft forever

8: vethb300175@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default

link/ether f6:7b:60:0b:d7:a0 brd ff:ff:ff:ff:ff:ff link-netnsid 1

inet6 fe80::f47b:60ff:fe0b:d7a0/64 scope link 

   valid_lft forever preferred_lft forever

(python-venv) justin@SeBS:~/serverless-benchmarks$ jq --argfile file1 out_storage.json '.deployment.openwhisk.storage = $file1 | .deployment.openwhisk.storage.address = "10.0.2.15:9011"' config/example.json > config/openwhisk.json

(python-venv) justin@SeBS:~/serverless-benchmarks$ curl -i 10.0.2.15:9011/minio/health/live

HTTP/1.1 200 OK

Accept-Ranges: bytes

Content-Length: 0

Content-Security-Policy: block-all-mixed-content

Server: MinIO

Strict-Transport-Security: max-age=31536000; includeSubDomains

Vary: Origin

X-Amz-Id-2: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

X-Amz-Request-Id: 1753464F04D7A7D5

X-Content-Type-Options: nosniff

X-Xss-Protection: 1; mode=block

Date: Thu, 06 Apr 2023 06:59:51 GMT

(python-venv) justin@SeBS:~/serverless-benchmarks$ cd config

(python-venv) justin@SeBS:~/serverless-benchmarks/config$ cat openwhisk.json

{

"experiments": {

"deployment": "openwhisk",

"update_code": false,

"update_storage": false,

"download_results": false,

"runtime": {

  "language": "python",

  "version": "3.7"

},

"type": "invocation-overhead",

"perf-cost": {

  "benchmark": "110.dynamic-html",

  "experiments": [

    "cold",

    "warm"

  ],

  "input-size": "test",

  "repetitions": 50,

  "concurrent-invocations": 50,

  "memory-sizes": [

    128,

    256

  ]

},

"network-ping-pong": {

  "invocations": 50,

  "repetitions": 1000,

  "threads": 1

},

"invocation-overhead": {

  "repetitions": 5,

  "N": 20,

  "type": "payload",

  "payload_begin": 1024,

  "payload_end": 6251000,

  "payload_points": 20,

  "code_begin": 1048576,

  "code_end": 261619712,

  "code_points": 20

},

"eviction-model": {

  "invocations": 1,

  "function_copy_idx": 0,

  "repetitions": 5,

  "sleep": 1

}

},

"deployment": {

"name": "local",

"aws": {

  "region": "us-east-1",

  "lambda-role": ""

},

"azure": {

  "region": "westeurope"

},

"gcp": {

  "region": "europe-west1",

  "project_name": "",

  "credentials": ""

},

"local": {

  "storage": {

    "address": "",

    "mapped_port": -1,

    "access_key": "",

    "secret_key": "",

    "instance_id": "",

    "input_buckets": [],

    "output_buckets": [],

    "type": "minio"

  }

},

"openwhisk": {

  "shutdownStorage": false,

  "removeCluster": false,

  "wskBypassSecurity": true,

  "wskExec": "wsk",

  "experimentalManifest": true,

  "docker_registry": {

    "registry": "",

    "username": "",

    "password": ""

  },

  "storage": {

    "address": "10.0.2.15:9011",

    "mapped_port": 9011,

    "access_key": "289EOAtOXuJvYNg-_AUN7Kf2c8sPjdv0JQoOgYA9YqY",

    "secret_key": "14d68dd6c12ca944c85cbee46c4971dbe7f7dabe78a74ca8f104356388dfbe9e",

    "instance_id": "6a8ce4ef2bb3a31d3da89006d72967c751399bf2ac469b84ced77f46934c7f0c",

    "input_buckets": [],

    "output_buckets": [],

    "type": "minio"

  }

}

}

}

(python-venv) justin@SeBS:~/serverless-benchmarks$ ./sebs.py experiment invoke perf-cost --config config/openwhisk.json --deployment openwhisk --verbose

09:03:54,625 INFO SeBS-e332: Created experiment output at /home/justin/serverless-benchmarks

09:03:55,203 INFO OpenWhisk.Resources-6b39: Using user-provided configuration of storage for OpenWhisk.

09:03:55,209 INFO Benchmark-28dd: Using cached benchmark 110.dynamic-html at /home/justin/serverless-benchmarks/cache/110.dynamic-html/openwhisk/python/3.7/110.dynamic-html.zip

09:03:55,210 INFO OpenWhisk-fb7d: Creating new function! Reason: function 110.dynamic-html-python-3.7 not found in cache.

09:03:55,210 INFO OpenWhisk-fb7d: Creating function as an action in OpenWhisk.

09:03:55,267 INFO OpenWhisk-fb7d: Creating new OpenWhisk action 110.dynamic-html-python-3.7

09:03:55,320 ERROR OpenWhisk-fb7d: Cannot create action 110.dynamic-html-python-3.7.

ERROR:root:Command '['wsk', '-i', 'action', 'create', '110.dynamic-html-python-3.7', '--web', 'true', '--docker', 'spcleth/serverless-benchmarks:function.openwhisk.110.dynamic-html.python-3.7', '--memory', '128', '--timeout', '10000', '-p', 'MINIO_STORAGE_SECRET_KEY', '14d68dd6c12ca944c85cbee46c4971dbe7f7dabe78a74ca8f104356388dfbe9e', '-p', 'MINIO_STORAGE_ACCESS_KEY', '289EOAtOXuJvYNg-_AUN7Kf2c8sPjdv0JQoOgYA9YqY', '-p', 'MINIO_STORAGE_CONNECTION_URL', '10.0.2.15:9011', '/home/justin/serverless-benchmarks/cache/110.dynamic-html/openwhisk/python/3.7/110.dynamic-html.zip']' returned non-zero exit status 255.

Traceback (most recent call last):

File "/home/justin/serverless-benchmarks/sebs/openwhisk/openwhisk.py", line 279, in create_function

subprocess.run(

File "/usr/lib/python3.10/subprocess.py", line 524, in run

raise CalledProcessError(retcode, process.args,

subprocess.CalledProcessError: Command '['wsk', '-i', 'action', 'create', '110.dynamic-html-python-3.7', '--web', 'true', '--docker', 'spcleth/serverless-benchmarks:function.openwhisk.110.dynamic-html.python-3.7', '--memory', '128', '--timeout', '10000', '-p', 'MINIO_STORAGE_SECRET_KEY', '14d68dd6c12ca944c85cbee46c4971dbe7f7dabe78a74ca8f104356388dfbe9e', '-p', 'MINIO_STORAGE_ACCESS_KEY', '289EOAtOXuJvYNg-_AUN7Kf2c8sPjdv0JQoOgYA9YqY', '-p', 'MINIO_STORAGE_CONNECTION_URL', '10.0.2.15:9011', '/home/justin/serverless-benchmarks/cache/110.dynamic-html/openwhisk/python/3.7/110.dynamic-html.zip']' returned non-zero exit status 255.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/home/justin/serverless-benchmarks/./sebs.py", line 30, in call

return self.main(*args, **kwargs)

File "/home/justin/serverless-benchmarks/python-venv/lib/python3.10/site-packages/click/core.py", line 1055, in main

rv = self.invoke(ctx)

File "/home/justin/serverless-benchmarks/python-venv/lib/python3.10/site-packages/click/core.py", line 1657, in invoke

return _process_result(sub_ctx.command.invoke(sub_ctx))

File "/home/justin/serverless-benchmarks/python-venv/lib/python3.10/site-packages/click/core.py", line 1657, in invoke

return _process_result(sub_ctx.command.invoke(sub_ctx))

File "/home/justin/serverless-benchmarks/python-venv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke

return ctx.invoke(self.callback, **ctx.params)

File "/home/justin/serverless-benchmarks/python-venv/lib/python3.10/site-packages/click/core.py", line 760, in invoke

return __callback(*args, **kwargs)

File "/home/justin/serverless-benchmarks/./sebs.py", line 72, in wrapper

return func(*args, **kwargs)

File "/home/justin/serverless-benchmarks/./sebs.py", line 97, in wrapper

return func(*args, **kwargs)

File "/home/justin/serverless-benchmarks/./sebs.py", line 462, in experiment_invoke

experiment.prepare(sebs_client, deployment_client)

File "/home/justin/serverless-benchmarks/sebs/experiments/perf_cost.py", line 50, in prepare

self._function = deployment_client.get_function(self._benchmark)

File "/home/justin/serverless-benchmarks/sebs/faas/system.py", line 176, in get_function

function = self.create_function(code_package, func_name)

File "/home/justin/serverless-benchmarks/sebs/openwhisk/openwhisk.py", line 306, in create_function

raise RuntimeError(e)

RuntimeError: Command '['wsk', '-i', 'action', 'create', '110.dynamic-html-python-3.7', '--web', 'true', '--docker', 'spcleth/serverless-benchmarks:function.openwhisk.110.dynamic-html.python-3.7', '--memory', '128', '--timeout', '10000', '-p', 'MINIO_STORAGE_SECRET_KEY', '14d68dd6c12ca944c85cbee46c4971dbe7f7dabe78a74ca8f104356388dfbe9e', '-p', 'MINIO_STORAGE_ACCESS_KEY', '289EOAtOXuJvYNg-_AUN7Kf2c8sPjdv0JQoOgYA9YqY', '-p', 'MINIO_STORAGE_CONNECTION_URL', '10.0.2.15:9011', '/home/justin/serverless-benchmarks/cache/110.dynamic-html/openwhisk/python/3.7/110.dynamic-html.zip']' returned non-zero exit status 255.

INFO:Benchmark-d09d:Update cached config /home/justin/serverless-benchmarks/cache/openwhisk.json

(python-venv) justin@SeBS:~/serverless-benchmarks$

HelloWorldGitHubUser commented 1 year ago

I've met this problem before, but when I tried to run this for the second or the third time, it ran successfully. I guess it was the network thing. Maybe you can also try for more times? But I'm not sure it also works : )

mcopik commented 1 year ago

@jchigu First of all, your bug report does not follow the issue format, which makes it more difficult for me to understand where the issue is located. Then, please use Markdown formatting for error logs - the ones you posted are very difficult to read and parse.

The error shows that SeBS was unable to create the action for the selected function. Did you try creating any function by yourself? Is your wsk command configured as described in the documentation? You can repeat the command manually and check the error reported by OpenWhisk wsk -i action create 110.dynamic-html-python-3.7 --web true --docker 'spcleth/serverless-benchmarks:function.openwhisk.110.dynamic-html.python-3.7 --memory 128 --timeout 10000 -p MINIO_STORAGE_SECRET_KEY 14d68dd6c12ca944c85cbee46c4971dbe7f7dabe78a74ca8f104356388dfbe9e -p MINIO_STORAGE_ACCESS_KEY 289EOAtOXuJvYNg-_AUN7Kf2c8sPjdv0JQoOgYA9YqY -p MINIO_STORAGE_CONNECTION_URL 10.0.2.15:9011 /home/justin/serverless-benchmarks/cache/110.dynamic-html/openwhisk/python/3.7/110.dynamic-html.zip.

mcopik commented 1 year ago

@HelloWorldGitHubUser I think it's a different issue - here, the failure is at creating functions. Your issue is/was at likely cache invalidation.

mcopik commented 1 year ago

@jchigu Closing the issue due to lack of activity after two weeks. If you want to receive support, please provide reproduction information and answer the questions I outlined above.