This repository has been archived by the owner on Jan 15, 2025. It is now read-only.
Puppet-Agent running in docker can't manage host systemd services #2467
Labels
bug
Something isn't working
Describe the Bug
The puppet-agent ( https://hub.docker.com/r/puppet/puppet-agent ), running in a docker-container, can't manage the hosts systemd services like a native puppet-agent can.
I'm running the puppet-agent like the Overview Page on Docker Hub
docker run --rm --privileged --hostname agent -v /tmp:/tmp -v /etc:/etc -v /var:/var -v /usr:/usr -v /lib64:/lib64 puppet/puppet-agent-ubuntu
Hope there is a way to get this working.
Expected Behavior
Puppet-Agent running in container behaves like the native running binary.
Steps to Reproduce
Steps to reproduce the behavior:
docker run --rm --privileged --hostname agent -v /tmp:/tmp -v /etc:/etc -v /var:/var -v /usr:/usr -v /lib64:/lib64 puppet/puppet-agent-ubuntu
docker exec -ti <name_of_container> bash
service { 'chrony': ensure => 'stopped', enable => true, provider => 'systemd', }
puppet apply ./init.pp ... Notice: Compiled catalog for agent in environment production in 0.01 seconds Error: /Stage[main]/Main/Service[chrony]: Provider systemd is not functional on this host
Environment
Additional Context
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
Error: /Stage[main]/Main/Service[chrony]: Provider systemd is not functional on this host
The text was updated successfully, but these errors were encountered: