We want to run CI/CD for our saltstack formulars. With debian buster it worked fine; now I try it with bookworm and I get some errors.
My CI-yaml file in gitlab looks like this:
image:
name: debian:bookworm
default:
before_script:
- DEBIAN_FRONTEND=noninteractive apt update -qq
- DEBIAN_FRONTEND=noninteractive apt install -yqq python3-pip pipx curl apt-utils gnupg2 ssh
- pipx install yamllint
- pipx install salt-lint
- pipx ensurepath
- mkdir -p /etc/apt/keyrings/
- curl -fsSL https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public | tee /etc/apt/keyrings/salt-archive-keyring.pgp
- "echo 'deb [signed-by=/etc/apt/keyrings/salt-archive-keyring.pgp arch=amd64] https://packages.broadcom.com/artifactory/saltproject-deb stable main' > /etc/apt/sources.list.d/saltstack.list"
- DEBIAN_FRONTEND=noninteractive apt update -qq && DEBIAN_FRONTEND=noninteractive apt install salt-minion -yqq
- "echo 'file_client: local' >> /etc/salt/minion"
- "echo -e 'grains:\n fqdn: test-minion.example.de' >> /etc/salt/minion"
- "echo -e ' host: test-minion' >> /etc/salt/minion"
- mkdir -p /srv/salt
- cp -r $CI_PROJECT_DIR/* /srv/salt
[...]
highstate:
stage: Test
needs: ["linux:lint"]
tags:
- docker
script:
- salt-call state.highstate --id=test-minion.example.de --file-root=/srv/salt/states --pillar-root=/srv/salt/pillars --retcode-passthrough mocked=True --state-output=mixed --state_verbose=True
only:
- master
and I get the following error:
salt-call state.highstate --id=test-minion.example.de --file-root=/srv/salt/states --pillar-root=/srv/salt/pillars --retcode-passthrough mocked=True --state-output=mixed --state_verbose=True
[ERROR ] Command '/usr/bin/systemctl' failed with return code: 1
[ERROR ] stdout: System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
[ERROR ] retcode: 1
[ERROR ] Module function service.systemctl_reload threw an exception. Exception: Problem performing systemctl daemon-reload: System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
[ERROR ] Command 'runlevel' failed with return code: 1
[ERROR ] stdout: unknown
[ERROR ] retcode: 1
[ERROR ] Command 'runlevel' failed with return code: 1
[ERROR ] output: unknown
[ERROR ] Command 'runlevel' failed with return code: 1
[ERROR ] stdout: unknown
[ERROR ] retcode: 1
[ERROR ] Command 'runlevel' failed with return code: 1
[ERROR ] output: unknown
[ERROR ] Command 'insserv' failed with return code: 127
[ERROR ] stdout: /bin/sh: 1: insserv: not found
[ERROR ] retcode: 127
[ERROR ] Failed when setting service zabbix-agent2 to start at boot, but the service was already running
[ERROR ] Command 'service' failed with return code: 1
[ERROR ] stdout: systemd-timesyncd: unrecognized service
[ERROR ] retcode: 1
[ERROR ] Command 'service' failed with return code: 1
[ERROR ] stdout: systemd-timesyncd: unrecognized service
[ERROR ] retcode: 1
[ERROR ] {'systemd-timesyncd': False}
[ERROR ] Command '/usr/sbin/sysctl' failed with return code: 1
[ERROR ] stderr: sysctl: permission denied on key "vm.swappiness"
[ERROR ] retcode: 1
[ERROR ] Failed to set vm.swappiness to 5: sysctl -w failed: sysctl: permission denied on key "vm.swappiness"
[...]
----------
ID: systemd-salt-minion
Function: module.run
Name: service.systemctl_reload
Result: False
Comment: Module function service.systemctl_reload threw an exception. Exception: Problem performing systemctl daemon-reload: System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Started: 14:35:18.642296
Duration: 11.847 ms
Changes:
----------
Asked by colttt
(111 rep)
Jun 25, 2025, 03:06 PM
Last activity: Jun 25, 2025, 03:28 PM
Last activity: Jun 25, 2025, 03:28 PM