# 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)?
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 openstack/ 479/lib/ python3. 10/site- packages/ sunbeam/ commands/ juju.py" , line 343, in is_skip clouds( cloud_type, local=True) openstack/ 479/lib/ python3. 10/site- packages/ sunbeam/ commands/ juju.py" , line 115, in get_clouds from_juju_ cmd = self._juju_ cmd(*cmd) openstack/ 479/lib/ python3. 10/site- packages/ sunbeam/ commands/ juju.py" , line 92, in _juju_cmd output= True, text=True, check=True) python3. 10/subprocess. py", line 526, in run ror(retcode, process.args, CalledProcessEr ror: Command '['/snap/ openstack/ 479/juju/ bin/juju' , 'clouds', '--client', '--format', 'json']' returned non-zero exit status 2.
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/
juju_clouds = self.get_
File "/snap/
clouds_
File "/snap/
process = subprocess.run(cmd, capture_
File "/usr/lib/
raise CalledProcessEr
subprocess.
ERROR stat .: permission denied
# User has sudo permissions: d/sunbeam
sunbeam@sunbeam:~$ sudo cat /etc/sudoers.
sunbeam ALL=(ALL) NOPASSWD:ALL
# Trying to bootstrap as root doesn't work, it seems to never finish SVLS6wRNCco7bAG /svW/mxdVT0g38F VumVKbfhpmh1U. .ssh/known_ hosts:1: [hashed name]
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:
This host key is known by the following other names/addresses:
/root/
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)?