Closed rkanavath closed 3 years ago
The main issue here seems to be that your user is not in group docker, which cause this issue. But in some way, there is no reason to call this code just for printing help.
We will fix this in the next release
I am not running it as docker. Infact docker is not even installed on this machine. running groups command reveals this
$groups
rkm adm cdrom sudo dip plugdev lxd
If the code specifically checks for a group 'docker' that is a minor fix in documentation. My root user isn't in docker group either but it works if run as root from asudo -i
shell. So I don't see how docker comes into the equation here. I am missing something here obviously.
there is no reason to call this code just for printing help.
Follow docs as is and report is what I do at first. Next I will try to run tests and report.
The code does not check for group docker, but Docker is a dependency of PESTO (https://airbusdefenceandspace.github.io/pesto/installation.html#prerequisite). We can see in the message that it's the docker.from_env() which is causing the error. Using sudo seems to bypass something in the docker python package, but you'll be stuck later if docker is not installed on your machine. Can you try again with docker package installed?
correction: docker, docker-python package is already installed during make install. See reference to python files. I checked docker command line and docker-python package both exists. However I didn't do any docker related configuration. It maybe handled by make install
and Ubuntu is also good and guessing what I must "have" instead of simply asking. So long story short, docker is installed.
We can see in the message that it's the docker.from_env() which is causing the error.
Each error comes from a different point in code. I agree last one is from docker.from_env()
but there are many others.
File "/home/rkm/.local/lib/python3.8/site-packages/docker/transport/unixconn.py", line 43, in connect
Here is the reference to the file on local disk. I try to find the path to unix_socket
variable in code and it is /var/run/docker.sock
. This file is accessed in docker/transport/unixconn.py
root@ubuntu18:~# ll /var/run/docker.sock
srw-rw---- 1 root docker 0 Jan 19 14:31 /var/run/docker.sock=
The file can be accessed by root and users docker group which explains why it works withsudo -i
Documentation must say user must be root or in a docker group.
Indeed, all the following errors comes from docker lib and not Pesto.
I suggest you use the docker package from docker instead the vanilla ubuntu one, it will spare you some pain. The install section in docker doc will guide you for docker group configuration.
I think we can state this is not an issue, but we'll take action to clarify this in next release.
I think we can state this is not an issue, but we'll take action to clarify this in next release.
That sounds fair. Closing
Following the installation guide: https://airbusdefenceandspace.github.io/pesto/installation.html git clone https://github.com/AirbusDefenceAndSpace/pesto.git cd pesto && make install
Installation works but running
pesto --help
fails.Running pesto as root works
root@ubuntu18:/home/rkm# ./.local/bin/pesto --help [2021-01-18 08:11:08,513] 2931-INFO app::display_banner():l21:
| _ | __/ _| / \ | \ _ () / | | |_ | |) | | _ \ | || | | | () | |) | '/ _ \ / / \/ / | | ' \ / ` | | | / ` |/ | / | '| | | | | /| |__ ) || || || | | /| | | () | (| /_ _ \ | | | | (| | | | (_| | (| || () | | | || | |_| |___|_/ || _/ () || || _/ \_||__//|| ||_, | || _,_|_|_\/|| _, | |/ |/ ----- ProcESsing facTOry : 1.0.0 ------------------------------------------------------------------------------------- usage: pesto [-h] {init,build,test} ...
optional arguments: -h, --help show this help message and exit
subcommands: {init,build,test} Valid subcommands root@ubuntu18:/home/rkm#