Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird error on install in Debian bookworm: Could not execute systemctl #8

Open
yaleman opened this issue Oct 18, 2024 · 2 comments
Open

Comments

@yaleman
Copy link
Member

yaleman commented Oct 18, 2024

Setting up kanidm-unixd (1.4.0~dev-202410160358+8c8f723) ...
=============================
Thanks for installing Kanidm!
=============================
Please ensure you modify the configuration files at /etc/kanidm/unixd and /etc/kanidm/config
Full examples are in /usr/share/kanidm-unixd/
To configure nsswitch, please follow instructions in https://kanidm.github.io/kanidm/master/integrations/pam_and_nsswitch.html
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 145.

That last line's ... odd.

Edit, found what it's doing:

if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
        if [ -d /run/systemd/system ]; then
                systemctl --system daemon-reload >/dev/null || true
                if [ -n "$2" ]; then
                        _dh_action=restart
                else
                        _dh_action=start
                fi
                deb-systemd-invoke $_dh_action kanidm-unixd-tasks.service kanidm-unixd.service >/dev/null || true
        fi
fi

... So it's failing to invoke systemctl somehow? 🤦🏻 deb-systemd-invoke... should just work?

deb-systemd-invoke is a Debian-specific helper script which asks /usr/sbin/policy-rc.d before performing a systemctl call.

deb-systemd-invoke is intended to be used from maintscripts to manage systemd unit files. It is specifically NOT intended to be used interactively by users. Instead, users should run systemd and use systemctl, or not bother about the systemd enabled state in case they are not running systemd.

Full postinst file here:
postinst.txt

@jinnatar
Copy link
Collaborator

What I've gathered is that it might be because the service start can't succeed with the default config, i.e. without uri configured. Hopefully that's something that the next-gen unixd rewrite could address, i.e. that the service can start without a configured kanidmd URI.

@jinnatar jinnatar changed the title Weird error on install in Debian bookworm Weird error on install in Debian bookworm: Could not execute systemctl Oct 19, 2024
@yaleman
Copy link
Member Author

yaleman commented Oct 19, 2024

Ooh, that's possible... terrible error message from the OS tooling though without any context 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants