powerapi-ng/powerapi

Socket puller binds to localhost only

PierreRustOrange opened this issue · 0 comments

The socket puller binds to 127.0.0.1 cannot be reached from another host.
See in socket_db.py:

self.server = await asyncio.start_server(self.gen_server_callback(), host='127.0.0.1', port=self.port)

With the PR powerapi-ng/hwpc-sensor#17 the sensor can connect to a formula running on another host,but this can only work if the formula also listen to connection from other hosts.

We could

  • start the server on 0.0.0.0
  • start the server on a host name given in the configuration

I would prefer the first option, I don't see an use case for the second approach.