by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 26 15:49
    ganwell commented #62
  • Jun 26 15:49
    ganwell commented #62
  • Dec 07 2019 20:37
    moreati opened #63
  • Aug 08 2019 16:28
    lordmauve commented #61
  • Aug 08 2019 16:28

    lordmauve on master

    Optimisation: Don't pencode() s… Revert "Optimisation: Don't pen… Test pencode/pdecode with Hypot… and 10 more (compare)

  • Aug 08 2019 16:28
    lordmauve closed #61
  • Aug 05 2018 22:04
    madisvain edited #62
  • Aug 05 2018 22:03
    madisvain opened #62
  • Mar 16 2018 21:43
    moreati synchronize #61
  • Mar 15 2018 02:05
    moreati synchronize #61
  • Mar 15 2018 01:37
    moreati commented #61
  • Mar 10 2018 15:51
    moreati edited #61
  • Mar 10 2018 15:49
    moreati commented #61
  • Mar 10 2018 15:48
    moreati commented #61
  • Mar 10 2018 15:45
    moreati opened #61
  • Mar 04 2018 09:50

    lordmauve on master

    Add binary encoding for return … Fix linter issues Fix issue with deleting contain… (compare)

  • Feb 18 2018 11:57
    lordmauve commented #60
  • Feb 18 2018 11:57

    lordmauve on master

    add custom ssh port add custom… fix typo adjust doc, remove stringfy por… (compare)

  • Feb 18 2018 11:57
    lordmauve closed #60
  • Feb 18 2018 11:44
    sejktmcsdlmfhsc synchronize #60
Daniel Pope
@lordmauve
Hello
Daniel Pope
@lordmauve
@romanlevin I fixed the issue with importing Chopsticks
I have no good ideas about #7 in Python 2 - seems like the __main__ module is a special module
Pav A
@rs2
How does chopsticks work with Windows hosts / docker-machined containers on Windows hosts?
Daniel Pope
@lordmauve
lo Pav
Chopsticks would have no real problems working with Windows as remote hosts if you can get a stdin/stderr/stdout pipe to a process running on them
The orchestration host has to be Posix, because Windows has no support for select on pipes
I'm not familiar with SSH on Windows. It would certainly be write a TLS-secured persistent agent for Windows hosts
Sej
@sejktmcsdlmfhsc
hi there. thank you so much for chopsticks! just got started & been enjoying it quite a bit! One question:
is there a canonical way to query the processes on the remote machine without psutil?
usually I would use psutil, but I guess since it has c-extensions it will not play nice with chopsticks..
I could probably do it via subprocess, but I was wondering if there ws a python (stdlib?) way to do it?
Sej
@sejktmcsdlmfhsc
finally found one without subprocess:
..not sure though how much my raspis going to like reading all these proc files, so I will try to limit that.. (-:
Sej
@sejktmcsdlmfhsc
works fairly well:
Sej
@sejktmcsdlmfhsc
is there a way to specify another ssh port than 22 for the SHHTunnel?
Sej
@sejktmcsdlmfhsc
sorry, just found #8. would be awesome if there could be a kwarg port=22 for SSHTunnel. will PR, if I can get it to work..
Sej
@sejktmcsdlmfhsc
sent the PR.. (-:
Daniel Pope
@lordmauve
Thanks, will check it out later
I have my own code for reading proc files; maybe I should commit it in the Chopsticks repo
The /proc filesystem is fast to access because it's actually backed by kernel memory, not disk, so you shouldn't worry about reading it
Sej
@sejktmcsdlmfhsc
that would be quite interesting! I just naively went through the digit dirs in proc for which I have permission and filtered the ones I am interested in. Since it is not at all a performance critial use case I was not worried about it too much, but I would love to learn about a better implementation of it.
I actually another question regarding the return:
Sej
@sejktmcsdlmfhsc
when I run some local defined simple function querying machine platform and release, returning a dict with the info, on a couple of remote machines I get the data returned from them as expected.
Sej
@sejktmcsdlmfhsc
but when I subproc call a function from a module available only on the remote machines, with their dict function return redirected to stderr the following happens:
I see the err posted nicely on my local, but do not seem to be able to capture that into a variable(?) additionally I get chopsticks.tunnel.RemoteExceptionsaying TypeError: b'' is not JSON serializable is there somthing that I need to prepare it to be json serializable? It is a dict with with str keys and nested dicts with str keys and float values..
Sej
@sejktmcsdlmfhsc
I tried to wrap it into json: print(json.dumps(stats), file=sys.stderr)but it seems to be stuck in wrapper in bubble and result in a b""
Daniel Pope
@lordmauve
@sejktmcsdlmfhsc You won't be able to return bytes, only strings from Python 3
That's a limitation of JSON
However I have a change I've been working on to fix that by replacing the JSON serialisation with something more Python-specific
Sej
@sejktmcsdlmfhsc
ah so for now I could return my dict stringified to stderr - I will try that. thanks a lot! ..also looking forward to the serialization pythonisation! (-:
Sej
@sejktmcsdlmfhsc
hah I found my way around it: instead of using a remote subproc called rpcclient with ujson and its cextensions, I switched to a pure python one. now I define the function locally and have no fuzz with non-serialized returns.. (-: