tsorya / test-infra

Apache License 2.0
0 stars 8 forks source link

"make run_full_flow_with_install" results in "Error: network list is not supported for rootless mode" #24

Open rwsu opened 4 years ago

rwsu commented 4 years ago

This is on CentOS 8. commit cc195a037e0b91784dd325f0e34ed458c6b9a3f3

Appears the problem is with "podman network ls -q".

scripts/run_minikube.sh
Configuring minikube...
😄  minikube v1.10.1 on Centos 8.1.1911
✨  Using the kvm2 driver based on existing profile
👍  Starting control plane node minikube in cluster minikube
🏃  Updating the running kvm2 "minikube" VM ...
🐳  Preparing Kubernetes v1.18.2 on Docker 19.03.8 ...
🌟  Enabled addons: default-storageclass, storage-provisioner
🏄  Done! kubectl is now configured to use "minikube"
eval 
/usr/local/bin/skipper make _deploy_bm_inventory -i
[skipper] Using build container: test-infra:latest
Error: network list is not supported for rootless mode
Traceback (most recent call last):
  File "/usr/local/bin/skipper", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/skipper/main.py", line 16, in main
    standalone_mode=False
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/skipper/cli.py", line 253, in make
    workspace=ctx.obj.get('workspace'))
  File "/usr/local/lib/python3.6/site-packages/skipper/runner.py", line 17, in run
    workdir, use_cache, workspace)
  File "/usr/local/lib/python3.6/site-packages/skipper/runner.py", line 84, in _run_nested
    with _network(net):
  File "/usr/lib64/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.6/site-packages/skipper/runner.py", line 129, in _network
    if _network_exists(net):
  File "/usr/local/lib/python3.6/site-packages/skipper/runner.py", line 154, in _network_exists
    result = utils.run_container_command(cmd)
  File "/usr/local/lib/python3.6/site-packages/skipper/utils.py", line 166, in run_container_command
    return str(subprocess.check_output(cmd).decode().strip())
  File "/usr/lib64/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['podman', 'network', 'ls', '-q']' returned non-zero exit status 125.
make: *** [Makefile:120: deploy_bm_inventory] Error 1
tsorya commented 4 years ago

@rwsu u must runit with sudo user.

ohadlevy commented 4 years ago

is this a bug then? or at least a more meaningful error message?

tsorya commented 4 years ago

it is not a bug, it is limitation. This is one of the differences between podman and docker. More meaningful error can be added to skipper maybe

romfreiman commented 4 years ago

It's a podman bug

rwsu commented 4 years ago

For me, sudo make all is broken. What is working for me is to login as root. Create /home/test. Checkout test-infra under /home/test. Then "make all" works.