2

I'm trying to set up a test instance of Ceph on my local machine (Windows 10, running in a wsl environment).

I've been following the instuctions however when it comes to bootstrapping the cluster with the following:

sudo cephadm bootstrap --mon-ip 127.0.0.1

I get this:

Verifying podman|docker is present...
Verifying lvm2 is present...
Verifying time synchronization is in place...
No time sync service is running; checked for ['chrony.service', 'chronyd.service', 'systemd-timesyncd.service', 'ntpd.service', 'ntp.service', 'ntpsec.service']
Installing packages ['chrony']...
Enabling unit chrony.service
Non-zero exit code 1 from systemctl enable --now chrony.service
systemctl: stderr Synchronizing state of chrony.service with SysV service script with /lib/systemd/systemd-sysv-install.
systemctl: stderr Executing: /lib/systemd/systemd-sysv-install enable chrony
systemctl: stderr System has not been booted with systemd as init system (PID 1). Can't operate.
systemctl: stderr Failed to connect to bus: Host is down
Traceback (most recent call last):
  File "/usr/sbin/cephadm", line 6242, in <module>
    r = args.func()
  File "/usr/sbin/cephadm", line 1451, in _default_image
    return func()
  File "/usr/sbin/cephadm", line 2883, in command_bootstrap
    command_prepare_host()
  File "/usr/sbin/cephadm", line 4574, in command_prepare_host
    check_time_sync(enabler=pkg)
  File "/usr/sbin/cephadm", line 4499, in check_time_sync
    if not check_units(units, enabler):
  File "/usr/sbin/cephadm", line 1725, in check_units
    enabler.enable_service(u)
  File "/usr/sbin/cephadm", line 4686, in enable_service
    call_throws(['systemctl', 'enable', '--now', service])
  File "/usr/sbin/cephadm", line 1112, in call_throws
    raise RuntimeError('Failed command: %s' % ' '.join(command))
RuntimeError: Failed command: systemctl enable --now chrony.service

Does System has not been booted with systemd as init system (PID 1). Can't operate. have anything to do with the issue? If so what is systemd and how do I boot it from WSL?

If not can anyone point me towards what I need to set up?

Thanks!

1 Answers1

1

Yes, one of the cephadm requirements is listed as Systemd. Unfortunately, WSL doesn't support Systemd. It uses its own init process as PID 1 instead, since it needs to initialize things differently due to the interop between Windows and WSL (networking, drive mounts, etc.).

While you can find methods of installing/enabling systemd on WSL, they are typically fairly buggy (by their admission -- I haven't tried it myself). Here's one I've been meaning to try, though. (Side Note -- Yes, it's on Stack Overflow, and really off-topic there, but it is too old to migrate. Thank you for moving yours over here instead.) I do now know if this would be enough to satisfy cephadm's requirements or not.

Also, while cephadm appears to be a fairly new convenience tool (and the recommended way to install now), you may be better off considering one of the alternative installation methods under WSL. I also ran across this guide.

NotTheDr01ds
  • 28,025