Bootstrapping vsphere gets stuck, " failed: No user exists for uid"

Hello,

I am trying to bootstrap a sphere cloud, but my instance hangs on “attempting to connect”.

I can ssh into, apt install, snap install, and reach http and https endpoints from the spawned instance, but even after 10 mins or more, the instance still hangs.

Any ideas about what I can do here?

Thanks

Can you try bootstrap with --debug? Possibly it has connected (since it tries all addresses in parallel), just is stuck trying to install the agent.

hey @hpidcock,

Looks like it isn’t ipv6 related: Ubuntu Pastebin

Hmm looks like bootstrap isn’t able to ssh to the machine.

bootstrap.go:669 connection attempt for 10.104.138.219 failed: No user exists for uid 595156457

Does that UID look familiar to you? Are you able to ssh to that machine (while its stuck bootstrapping) using either of these keys?

15:15:35 INFO  cmd authkeys.go:113 Adding contents of "/home/jbemfv/.local/share/juju/ssh/juju_id_rsa.pub" to authorized-keys
15:15:35 INFO  cmd authkeys.go:113 Adding contents of "/home/jbemfv/.ssh/id_rsa.pub" to authorized-keys

Yes. I can ssh into the box while it is stuck bootstrapping (as the “ubuntu” user), and yes, the UID does look familiar. The long UID is the UID of my user on the box I am bootstrapping from.

Curious if you use snap run --shell juju and try to ssh from within the snap. The snap should be able to read /etc/passwd, but I’m wondering if your user is from ldap or something?

Yes, my user is from ldap.

Did you try running ssh from the juju snap context (snap run --shell juju)?

@hpidcock

OK, thanks @jamesbeedy, I’ll have a deeper dig and see what we can do here.

In the meantime, you might be able to work around this by using the juju bins released on https://launchpad.net/juju/+download rather than the snap.

:100: I will give this a try. Thank you, @hpidcock!

Using the binary got me unstuck.

Still an issue - I’m following the basic setup at https://microstack.run/

sudo snap install openstack --channel 2024.1/edge
sunbeam prepare-node-script | bash -x && newgrp snap_daemon
sunbeam cluster bootstrap --accept-defaults
subprocess.CalledProcessError: Command '['/snap/openstack/584/juju/bin/juju', 'bootstrap', 'ready-boa', 'sunbeam-controller']' returned non-zero exit status 1.                                                  ERROR initializing ubuntu user: subprocess encountered error code 255 (No user exists for uid 1088603223)                                                                                                        ERROR subprocess encountered error code 255 (No user exists for uid 1088603223)

Error: Command '['/snap/openstack/584/juju/bin/juju', 'bootstrap', 'ready-boa', 'sunbeam-controller']' returned non-zero exit status 1.

I can figure out the first juju command but I’m unable to proceed.