Comments (5)
This seems to be a bug, we will try to reproduce it. Likely the app delete is broken.
from calvin-base.
I created 3 local runtimes, deployed a simple calvinscript with 3 actors, migrated manually the 3 actors to one of the other runtimes. Then followed your screenshot. My result is that the actors were deleted.
$ cscontrol http://127.0.0.1:5001 actor list
[]
$ cscontrol http://127.0.0.1:5005 actor list
[]
$ cscontrol http://127.0.0.1:5003 actor list
[
"0f78e7cb-5bfd-490f-8013-08df5bdde910",
"3ea3fd2e-98c6-4df7-9a12-6d96a1bd949b",
"46ae313c-d8bd-43be-8117-3481976092df"
]
$ cscontrol http://127.0.0.1:5001 applications list
[
"12df9014-ee09-4b5a-9db3-b88ae5407fa2"
]
$ cscontrol http://127.0.0.1:5003 applications list
[]
$ cscontrol http://127.0.0.1:5005 applications list
[]
$ cscontrol http://127.0.0.1:5001 applications delete 12df9014-ee09-4b5a-9db3-b88ae5407fa2
""
$ cscontrol http://127.0.0.1:5001 actor list
[]
$ cscontrol http://127.0.0.1:5003 actor list
[]
$ cscontrol http://127.0.0.1:5005 actor list
[]
So it must be some difference in what you did before what is shown in the image. Could you share more details on which calvinscript, what migrations, etc that you did?
By the way, even if only one of the runtimes provide the application id (due to that the control interface only looks locally instead of in the registry), you should be able to delete the application from any of the nodes.
from calvin-base.
Hmm I actually did almost the same thing. The only difference is that instead of starting up the application and then migrating it manually, I used
$ cscontrol http://<ip>:5001 deploy --req depl.deployjson app.calvin
Where I used depl.deployjson and app.calvin as in the example on Application Deployment. So depl.deployjson was
{
"groups": {"firstgroup": ["src", "sum"]},
"requirements": {
"src": [{"op": "union_group",
"requirements": [{"op": "node_attr_match",
"kwargs": {"index": ["node_name", {"organization": "org.testexample", "name": "testNode1"}]}
},
{"op": "node_attr_match",
"kwargs": {"index": ["node_name", {"organization": "org.testexample", "name": "testNode2"}]}
}],
"type": "+"
},
{"op": "current_node",
"kwargs": {},
"type": "-"
}],
"sum": [{"op": "node_attr_match",
"kwargs": {"index": ["node_name", {"organization": "org.testexample", "name": "testNode2"}]},
"type": "+"
}],
"snk": [{"op": "node_attr_match",
"kwargs": {"index": ["node_name", {"organization": "org.testexample", "name": "testNode3"}]},
"type": "+"
},
{"op": "current_node",
"kwargs": {},
"type": "-"
}]
}
and app.calvin
src : std.CountTimer()
sum : std.Sum()
snk : io.StandardOut()
src.integer > sum.integer
sum.integer > snk.token
I started up the runtimes as in the example using
csruntime -n <ip-addr> -p 5000 -c 5001 -w 0 --attr '{"indexed_public": {"node_name": {"organization": "org.testexample", "name": "testNode1"}}}' &
csruntime -n <ip-addr> -p 5002 -c 5003 -w 0 --attr '{"indexed_public": {"node_name": {"organization": "org.testexample", "name": "testNode2"}}}' &
csruntime -n <ip-addr> -p 5004 -c 5005 -w 0 --attr '{"indexed_public": {"node_name": {"organization": "org.testexample", "name": "testNode3"}}}' &
Which is the only thing that is not on the screenshot..
Maybe it has to do when deploying applications using requirements?
from calvin-base.
Unrelated to the issue you have with buggy application clean-up, I'd just like to point out that the example code dealing with explicit .deployjson files dates to before we had a way of expressing deployment requirements in CalvinScript. In your case above, you could instead add something along the following lines to the .calvin file (untested):
rule node1 : node_attr_match(index=["node_name", {"organization": "org.testexample", "name": "testNode1"}])
rule node2 : node_attr_match(index=["node_name", {"organization": "org.testexample", "name": "testNode2"}])
rule node3 : node_attr_match(index=["node_name", {"organization": "org.testexample", "name": "testNode3"}])
rule node1or2 : node1 | node2
apply src : node1or2 & ~current_node()
apply sum : node2
apply snk : node3
Have a look at the files in calvin/tests/codegen, in particular test_deploy3.calvin and test_deploy3.deployjson.
While it does not solve your problem, it does make your life easier if you are going to play around with deployment requirements.
from calvin-base.
Oh wow thank you for the hint this is actually really helpful!
from calvin-base.
Related Issues (20)
- Missing documentation for `context` and `data` actors HOT 1
- Problematic simultaneous runtimes HOT 35
- MQTT readme file not up to date
- Port tests call fixtures directly
- BaseException.message used in tests.
- Draft of stand-alone actorstore HOT 1
- cscontrol connection refused (err:111) distributed environment HOT 5
- 'Did not received reply for msg id within 5 seconds' HOT 16
- Sensor Virtual Weather Not Found HOT 6
- Unknown actor type HOT 1
- ImportError: DLL load failed: The specified procedure could not be found. Import win32api
- Replication of components is not working
- Suggested methods for adding non actor functionalities HOT 5
- Error running script on windows, path delimiter issue HOT 1
- On Windows: ImportError: No module named win32api HOT 6
- Force rpcudp version to 2.0 HOT 1
- error: pyasn1 0.1.9 is installed but pyasn1<0.5.0,>=0.4.1 is required by set(['pyasn1-modules']) HOT 16
- web3 integration HOT 2
- Application with raspberry pi and sensors to send data HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calvin-base.