openalto / alto-domain-agent Goto Github PK
View Code? Open in Web Editor NEWAn ALTO agent implementation for cross-domain networks.
License: MIT License
An ALTO agent implementation for cross-domain networks.
License: MIT License
Error log as following:
[Thread-21] ERROR org.snlab.unicorn.handlers.OrchestratorQueryHandler - Traceback (most recent call last): File "/usr/bin/nova", line 4, in <module> __import__('pkg_resources').run_script('alto-nova==0.1', 'nova') File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 748, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1517, in run_script exec(code, namespace, namespace) File "/usr/lib/python3.4/site-packages/alto_nova-0.1-py3.4.egg/EGG-INFO/scripts/nova", line 12, in <module> response_body = json.loads(sys.argv[1]) File "/usr/lib64/python3.4/json/__init__.py", line 318, in loads return _default_decoder.decode(s) File "/usr/lib64/python3.4/json/decoder.py", line 343, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python3.4/json/decoder.py", line 361, in raw_decode raise ValueError(errmsg("Expecting value", s, err.value)) from NoneValueError: Expecting value: line 1 column 1 (char 0)
Maybe the python version issue.
With request {'action': 'new', 'query-type': 'path-query', 'query-desc': [], 'query-id': 1}
, the agent throw an exception. Here is the dump.
[qtp1692036285-22] ERROR org.snlab.unicorn.handlers.OrchestratorQueryHandler - Invalid query body:
com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'action': was expecting ('true', 'false' or 'null')
at [Source: action=new&query-type=resource-query&query-id=2; line: 1, column: 7]
at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1702)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:558)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:2839)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:1903)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:749)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3850)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3799)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2858)
at org.snlab.unicorn.handlers.OrchestratorQueryHandler.parseBody(OrchestratorQueryHandler.java:68)
at org.snlab.unicorn.handlers.OrchestratorQueryHandler.handle(OrchestratorQueryHandler.java:76)
at org.snlab.unicorn.UnicornService$ControlServiceResource.getControlStreamQuery(UnicornService.java:117)
It's time to merge patches into the master branch.
Move the business logic of computeResource to the agent side. Just read bandwidth information from the controller (alto-bwmonitor).
Also, the query handler should provide close()
method to stop the running thread. It avoids the unlimited loop.
Exception in thread "Thread-21" java.lang.IllegalStateException: Response content has been already consumed
at org.apache.http.client.fluent.Response.assertNotConsumed(Response.java:56)
at org.apache.http.client.fluent.Response.handleResponse(Response.java:88)
at org.apache.http.client.fluent.Response.returnContent(Response.java:97)
at org.snlab.unicorn.adapter.ODLAdapter.getResource(ODLAdapter.java:225)
at org.snlab.unicorn.handlers.OrchestratorQueryHandler.doResourceQuery(OrchestratorQueryHandler.java:154)
at org.snlab.unicorn.handlers.OrchestratorQueryHandler.doQuery(OrchestratorQueryHandler.java:137)
at org.snlab.unicorn.handlers.OrchestratorQueryHandler.lambda$loopForQueryUpdate$0(OrchestratorQueryHandler.java:197)
at java.lang.Thread.run(Thread.java:748)
A mock adapter is necessary for testing or exception handling.
I think the current resource query do not provide RSA. So it is the full path vector information in the resource query response.
Require an external process to handle stateless RSA request. No need a http server, I prefer an external subprocess wrapper.
The srcIp
and dstIp
fields in ODL request is IpPrefix
. So pass the query desc string directly should not be correct.
ControllerAdapter.class
should be a generic interface and never couple with any platform-specific models.
The ControllerAdapter
does not maintain the query-id
information. So it cannot handle the requirePathQuery() and requireResourceQuery() signal for a special query-id
. We need to move these methods to OrchestratorQueryHandler
.
Although ODLAdapter
started a websocket to listen the data change, yet no notification retrieved.
Referring to this link, now the data structure of query items is Set, but we need to change it to List, because of the importance of according sequences of requests and responses.
Some classes are using javax.json to serialize/deserialize JSON strings and objects. It is time to migrate the parser to com.fastxml.jackson. It will clean up the code and improve the maintainability.
Currently, there is some bootstrap code (for orchestrator registration) in the construction function of jersey application. This code may be loaded before the jersey application finishes its initialization. We need to make it executed after the application initialized.
This Q & A in stackoverflow may help us: https://stackoverflow.com/questions/7449165/jersey-initialization-code-after-webapp-is-fully-started.
Required by this issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.