apache / apache/openwhisk-wskdeploy

How do we prevent Concurrent Access to same OpenWhisk entity?

Open
#605 1 comment 0 reactions 0 assignees View on GitHub
design needed question
Dominant language
Go
Stars
75
Forks
73
PR merge metrics
No merged PRs in 30d

Description

We have seen couple of concurrency issues with deployment/undeployment when

- **triggers and rules**

When we try to run `wskdeploy` with these two manifest files in deployment mode at the same time, deployment fails with `Error: Error: /Users/pritidesai/Documents/goworkspace/src/github.com/apache/incubator-openwhisk-wskdeploy/deployers/servicedeployer.go [913]: OpenWhisk Client Error =====> The requested resource does not exist. (code 23582280) Error code: 148.`

package1-manifest.yaml

```
packages:
pacakge1:
actions:
helloworld:
function: actions/helloworld.js
runtime: nodejs:6
triggers:
locationupdate:
rules:
myRule:
trigger: locationupdate
rule: myRule
```

package2-manifest.yaml

```
packages:
pacakge2:
actions:
helloworld:
function: actions/helloworld.js
runtime: nodejs:6
triggers:
locationupdate:
rules:
myRule:
trigger: locationupdate
rule: myRule
```

- **dependency**

Its a valid use case of having dependency on same package from different manifest files but this leads to the same issue of concurrency and sometimes fails with the same error 148 and sometimes fails with:

`"Error: /Users/pritidesai/Documents/goworkspace/src/github.com/apache/incubator-openwhisk-wskdeploy/deployers/servicedeployer.go [666]: OpenWhisk Client Error =====> Sequence component does not exist. (code 23582010) Error code: 144.\n"})`

or

`Deployment of dependency myhelloworlds did not complete sucessfully. Run `wskdeploy undeploy` to remove partially deployed assets.\nError: /Users/pritidesai/Documents/goworkspace/src/github.com/apache/incubator-openwhisk-wskdeploy/deployers/servicedeployer.go [666]: OpenWhisk Client Error =====> Concurrent modification to resource detected. (code 23549814) Error code: 153.\n"})`

package1-manifest.yaml

```
packages:
package1:
dependencies:
myhelloworlds:
location: github.com/apache/incubator-openwhisk-test/packages/helloworlds
actions:
hello:
function: actions/helloworld.js
runtime: nodejs:6
sequences:
helloworldnodejs-series:
actions: hello, myhelloworlds/hello-js
```

package2-manifest.yaml

```
packages:
package2:
dependencies:
myhelloworlds:
location: github.com/apache/incubator-openwhisk-test/packages/helloworlds
actions:
hello:
function: actions/helloworld.js
runtime: nodejs:6
sequences:
helloworldnodejs-series:
actions: hello, myhelloworlds/hello-js
```

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.