Giter Club home page Giter Club logo

cirque's People

Contributors

akekawit avatar arkq avatar erjiaqing avatar githanwang1 avatar gjc13 avatar mingchik avatar rwalker-com avatar yunhanw-google avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cirque's Issues

Suggestion removing errors concerning process management

While using cirque I ran into some warnings concerning process management:

/usr/lib/python3.8/subprocess.py:942: ResourceWarning: subprocess 28203 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/usr/lib/python3.8/subprocess.py:942: ResourceWarning: subprocess 28202 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
cirque/connectivity/socatpipepair.py:48: ResourceWarning: unclosed file <_io.BufferedReader name=3>
  self.socat = None
ResourceWarning: Enable tracemalloc to get the object allocation traceback

Following changes would fix it. Feel free to use them as you feel fit:

diff --git a/cirque/connectivity/socatpipepair.py b/cirque/connectivity/socatpipepair.py
index 2b64149..c3c2c38 100644
--- a/cirque/connectivity/socatpipepair.py
+++ b/cirque/connectivity/socatpipepair.py
@@ -45,6 +45,8 @@ class SocatPipePair:
     def close(self):
         if self.socat is not None:
             self.socat.terminate()
+            self.socat.wait()
+            self.socat.stderr.close()
         self.socat = None

     def __del__(self):
diff --git a/cirque/connectivity/threadsimpipe.py b/cirque/connectivity/threadsimpipe.py
index 02de636..6ad360f 100644
--- a/cirque/connectivity/threadsimpipe.py
+++ b/cirque/connectivity/threadsimpipe.py
@@ -64,6 +64,7 @@ class ThreadSimPipe:
             self.radio_fd = None
         if self.radio_process is not None:
             self.radio_process.terminate()
+            self.radio_process.wait()
             self.radio_process = None
         if self._socat_pipe is not None:
             self._socat_pipe.close()

Thanks and regards

Create the cirque CLI to chat with cirque service for developer use

cirique-cli would act as the client, and can post several requests to cirque service and orchestrate virtual home topology

for example, create-home "home name", which can create home request to cirque service,
start "docker node name", which can bring up particuler docker
list "docker node name", which can list the meta data about this node, for example, name, ip address
exec "cmd", which can execute the command,
destroy "home name", which can tear down the home.

Support fixed version or user provided openthread source to make cirque behavior stable

function install_openthread() {
if [ ! -d "${OPEN_THREAD_DIR}" ]; then
wget https://github.com/openthread/openthread/archive/master.zip
unzip master.zip
rm master.zip
mv openthread-master openthread
fi
pushd .
cd openthread
./bootstrap
make -f examples/Makefile-simulation
popd
}

Currently, cirque always download openthread's master code, which is not stable since change in openthread will break cirque.

There are two ways that can make this better,

  1. Use a fixed openthread commit id and update it regularly,
  2. Allow user specify the path of openthread and use it here

Add docker port forwarding capability

docker port forwarding(mapping) enables the feature for user to be able to access service in docker container remotely. the feature will redirect traffic that coming to a specific port number on the host machine to a mapped port number which owns by a service inside docker container

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.