Skip to content

beegfs-mgmt --init cannot run without systemd #120

Description

@rixon

Describe the bug
If beegfs-mgmt --init is run without systemd running, it will fail with the following error:

[root@test-beegfs8-mgmt beegfs]# /opt/beegfs/sbin/beegfs-mgmtd --init
PANIC: panicked at mgmtd/src/main.rs:60:6:
Logger initialization failed: No such file or directory (os error 2)

In the above case, this is being run in a chroot to set up an image that will later be sent to the management node.

With strace, we can see the failure:

...
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/run/systemd/journal/socket"}, 30) = -1 ENOENT (No such file or directory)
close(3)                                = 0
write(2, "PANIC: panicked at mgmtd/src/mai"..., 111PANIC: panicked at mgmtd/src/main.rs:60:6:
Logger initialization failed: No such file or directory (os error 2)) = 111
write(2, "\n", 1
)                       = 1
sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=8192}, NULL) = 0
munmap(0x7f690d569000, 12288)           = 0
exit_group(101)                         = ?
+++ exited with 101 +++

Describe the system
Test system is BeeGFS 8.3 on Rocky 9.6.

To Reproduce
Steps to reproduce the behavior:

  1. Create an OS image in a tree. Mount /proc, /sys, /dev, and chroot to that tree.
  2. Run beegfs-mgmt --init

Expected behavior
It would be beneficial to be able to handle bootstrapping functions without systemd actually being up and running. Our workflow is to install and handle most initial component setup in the chroot, enable (but of course not start) systemd services, then push image to node. Would it be possible to support this, or does this fundamentally go against the current design pattern of BeeGFS?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnewIssues that haven't been triaged yet

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions