Comment 8 for bug 2032783

Revision history for this message
eblock@nde.ag (eblock) wrote :

Thanks for making it support proxies. But I'm still struggling to create a cluster, although it seems to be a different issue now:

sunbeam@sunbeam:~$ sudo snap install openstack --channel=2023.2/edge
openstack (2023.2/edge) 2023.2 from Canonical✓ installed

# This prepare step needs to be executed as non-root user
sunbeam@sunbeam:~$ sudo sunbeam prepare-node-script | bash -x && newgrp snap_daemon
++ lsb_release -sc
+ '[' jammy '!=' jammy ']'
++ whoami
+ USER=sunbeam
[...]

# Bootstrapping fails with permission error
sunbeam@sunbeam:~$ sudo sunbeam cluster bootstrap --accept-defaults
⠋ Adding cloud to Juju client ... Error determining whether to skip the bootstrap process. Defaulting to not skip.
Traceback (most recent call last):
  File "/snap/openstack/479/lib/python3.10/site-packages/sunbeam/commands/juju.py", line 343, in is_skip
    juju_clouds = self.get_clouds(cloud_type, local=True)
  File "/snap/openstack/479/lib/python3.10/site-packages/sunbeam/commands/juju.py", line 115, in get_clouds
    clouds_from_juju_cmd = self._juju_cmd(*cmd)
  File "/snap/openstack/479/lib/python3.10/site-packages/sunbeam/commands/juju.py", line 92, in _juju_cmd
    process = subprocess.run(cmd, capture_output=True, text=True, check=True)
  File "/usr/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/snap/openstack/479/juju/bin/juju', 'clouds', '--client', '--format', 'json']' returned non-zero exit status 2.
ERROR stat .: permission denied

# User has sudo permissions:
sunbeam@sunbeam:~$ sudo cat /etc/sudoers.d/sunbeam
sunbeam ALL=(ALL) NOPASSWD:ALL

# Trying to bootstrap as root doesn't work, it seems to never finish
root@sunbeam:~# sunbeam cluster bootstrap --accept-defaults
The authenticity of host '172.17.2.48 (172.17.2.48)' can't be established.
ED25519 key fingerprint is SHA256:SVLS6wRNCco7bAG/svW/mxdVT0g38FVumVKbfhpmh1U.
This host key is known by the following other names/addresses:
    /root/.ssh/known_hosts:1: [hashed name]
Bootstrapping Juju onto machine

It's unclear to me how this is supposed to work, I'd appreciate any pointers. Should I create a separate Bug report for this (if it even is a bug)?