Ability to use fleetctl
lrvick opened this issue · 3 comments
lrvick commented
I have tried a number of ways to use fleetctl within toolbox.
In the parent env as the core user, fleetctl list-units
works as expected via:
ETCDCTL_PEERS=http://10.0.0.12:4001,http://10.0.0.83:4001,http://10.0.0.141:4001
FLEETCTL_ENDPOINT="unix:///var/run/fleet.sock"
So I try to run this in toolbox with:
ETCDCTL_PEERS=http://10.0.0.12:4001,http://10.0.0.83:4001,http://10.0.0.141:4001 FLEETCTL_ENDPOINT="unix:///media/root/var/run/fleet.sock" /media/root/usr/bin/fleetctl list-units
And get:
Unable to initialize client: unable to use endpoint scheme unix, http/https only
What? It's happy with a unix socket in the parent but not in the toolbox container?
Am I misunderstanding how toolbox is intended to be used?
fleetctl version: 0.9.0
oszi commented
It's because the toolbox's root is not the same as the host's. So use it like this:
FLEETCTL_ENDPOINT="unix:///media/root/var/run/fleet.sock
lrvick commented
That is exactly what I attempted to do, see my example above.
oszi commented
My bad. It seems you're using the wrong environment variable for etcd servers:
FLEET_ETCD_SERVERS