1. 25 May, 2018 4 commits
  2. 18 May, 2018 1 commit
    • Swann Perarnau's avatar
      [refactor] convert the project to Pipenv · 8e41f7a1
      Swann Perarnau authored
      Pipenv provides a reproducible description of the python packages
      necessary for a python application. See the Pipenv documentation for
      reference.
      
      We also remove tox from the repo, relying instead directly on pytest.
      Since we only supported one version of python, that's not a big deal.
      8e41f7a1
  3. 13 Feb, 2018 2 commits
  4. 21 Dec, 2017 2 commits
  5. 20 Dec, 2017 6 commits
  6. 19 Dec, 2017 12 commits
  7. 18 Dec, 2017 6 commits
    • Swann Perarnau's avatar
      [feature] Implement skeleton downstream API · 19c9eb54
      Swann Perarnau authored
      This patch refactors the downstream API to use pub/sub socket pair, like
      the upstream API. This is part of the effort to improve the downstream
      API. See #2.
      
      This patch doesn't touch the client module, which will be adapted in
      future commits.
      19c9eb54
    • Swann Perarnau's avatar
      Merge branch 'upstream-network-fixes' into 'master' · be059812
      Swann Perarnau authored
      Fix upstream publishers messaging issues
      
      See merge request !8
      be059812
    • Swann Perarnau's avatar
      [refactor] daemon should always bind on sockets · 1391a197
      Swann Perarnau authored
      The way 0MQ works on PUB/SUB sockets, publishers might drop
      messages if subscribers are not detected faster enough. One way to fix
      it is to have the "server" always bind sockets, and the "client" use
      connect. This way, the handshake is initiated properly, and the client
      can publish as soon as the connection is done.
      
      This patch makes the daemon bind on the upstream API and the CLI connect,
      fixing in the process the message dropping we were experiencing before.
      
      Long term, we might have a think of using 2 types of sockets for the
      upstream API: pub/sub for actual events published from the daemon, and
      a REQ/REP or ROUTER/DEALER pair for "commands".
      1391a197
    • Swann Perarnau's avatar
      Merge branch 'coolr-improve-and-check' into 'master' · 6f53bbbd
      Swann Perarnau authored
      Fix recent coolr issues and start building tests for it
      
      See merge request !7
      6f53bbbd
    • Swann Perarnau's avatar
      [test] Add a clr_rapl test matching current code · 37097b20
      Swann Perarnau authored
      This patch adds a test for the nrm/coolr/clr_rapl.py code, based on
      the __main__ code added to it recently. This is an example of how the
      modules should be tested automatically, instead of relying on __main__
      snippets everywhere.
      
      We should replace those snippets bits by bits by tests similar to this
      one. The end goal is to able to active a gitlab pipeline that validate
      merge requests automatically.
      37097b20
    • Swann Perarnau's avatar
      Partial Revert of powercap API update · ec563afb
      Swann Perarnau authored
      Previous commit 0c93ce6a broke the
      sample code used by the daemon, by reverting the sample function to a
      json message generator. This is due to inconsistencies between the coolr
      code and the NRM import: we removed json generation from coolr, to push
      it on the messaging side, while upstream still does it on sensor
      reading.
      
      This commit fixes that, but doesn't touch the new test code embedded in
      clr_rapl.py
      We will move that the test infrastructure later.
      ec563afb
  8. 17 Dec, 2017 1 commit
  9. 15 Dec, 2017 3 commits
    • Swann Perarnau's avatar
      Merge branch 'switch-to-subprocess' into 'master' · 68784add
      Swann Perarnau authored
      Switch to subprocess
      
      See merge request !6
      68784add
    • Swann Perarnau's avatar
      [feature] Properly handle run events in order · 957deb8d
      Swann Perarnau authored
      This patch implements a small finite state machine on the cmd side to be
      able to run a command, wait for all of its output, and then exit.
      
      As the daemon can send those message in any order, we need to wait them
      properly, in particular the closing of stdout/stderr before exiting.
      
      This patch also fixes the read_until_close callback creation to ensure
      that the stream EOF is handled as a distinct message.
      957deb8d
    • Swann Perarnau's avatar
      [refactor] Only track container inside the CM · f2bc8b80
      Swann Perarnau authored
      The daemon code was maintaining its own container tracker using pids,
      instead of using the one in the container manager. This patch removes
      this additional tracking, and let the daemon side deal with an actual
      namedtuple.
      f2bc8b80
  10. 14 Dec, 2017 3 commits
    • Swann Perarnau's avatar
      [feature] Add stdout/stderr streaming · 78f63cd4
      Swann Perarnau authored
      This patch adds stdout/stderr streaming capabilities, based on partial
      evaluation of a tornado.iostream callback. The bin/cmd CLI is updated to
      wait until an exit message, although that doesn't guaranty anything on
      message ordering...
      
      The next step is obviously to figure out a message flow that allows the
      CLI to send and receive the command IO properly, in order...
      78f63cd4
    • Swann Perarnau's avatar
      [refactor] Fix container namedtuple · 9afe59c7
      Swann Perarnau authored
      This patch propagates the process object into the container namedtuple,
      fix a couple of bad function calls and adapt the run command handler to
      use that process object instead of just the pid of it.
      9afe59c7
    • Swann Perarnau's avatar
      [feature] Use argo_nodeos_config --exec · edeb413b
      Swann Perarnau authored
      Use the new argo_nodeos_config --exec feature in development.
      Allow us to delegate fork+attach+exec to argo_nodeos_config, and
      simplifying the create command as a result.
      
      We use tornado.process to wrap this command, as we want to able to
      stream stdout/stderr in the future.
      
      This patch also misuse, the 'pid' field of the container namedtuple to
      save the tornado.process.Subprocess object itself, so some functions
      need to be adapted.
      edeb413b