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

Error: /Stage[main]/Bareos::Director/Service[bareos-dir]: Failed to call refresh: Systemd restart for bareos-dir failed! #82

Open
jarekherisz opened this issue Jul 8, 2021 · 0 comments

Comments

@jarekherisz
Copy link
Contributor

Affected Puppet, Ruby, OS and module versions/distributions

Puppet: 7.8.0
Distribution: Debian 10 
Module version: 1.0.1-rc0
Bareos: 20.0.1

When module notify Scheduling refresh of Service[bareos-dir], puppet return error:

Info: /Stage[main]/Main/Node[backup.mistal.local]/Bareos::Director::Console[admin]/File[/etc/bareos/bareos-dir.d/console/admin.conf]: Scheduling refresh of Service[bareos-dir]
Error: /Stage[main]/Bareos::Director/Service[bareos-dir]: Failed to call refresh: Systemd restart for bareos-dir failed!
journalctl log for bareos-dir:
-- Logs begin at Thu 2021-07-08 12:30:18 CEST, end at Thu 2021-07-08 13:17:28 CEST. --
-- No entries --

Error: /Stage[main]/Bareos::Director/Service[bareos-dir]: Systemd restart for bareos-dir failed!
journalctl log for bareos-dir:
-- Logs begin at Thu 2021-07-08 12:30:18 CEST, end at Thu 2021-07-08 13:17:28 CEST. --
-- No entries --

When i check:

service { $service_name:
      ensure     => $service_ensure,
      enable     => $service_enable,
      hasrestart => false,
      restart    => $reload_command,
      tag        => ['bareos', 'bareos_director'],
    }

it use reload_command:

$reload_command = $facts['service_provider'] ? {
      'systemd' => "systemctl reload ${service_name}",
      default   => "service ${service_name} relaod",
    }

in my case value of reload_command is:

'systemctl reload bareos-dir'

when i try it in bash command return

root@backup:/etc/apache2# systemctl reload bareos-dir
Failed to reload bareos-dir.service: Job type reload is not applicable for unit bareos-director.service.

Works:

root@backup:/etc/apache2# /etc/init.d/bareos-dir reload
[ ok ] Reloading Bareos Director: bareos-dir.

or

root@backup:/etc/apache2# /etc/init.d/bareos-dir reload
systemctl restart bareos-dir
@kenyon kenyon changed the title Compatybile witch Debian 10 and bareos 20 Error: /Stage[main]/Bareos::Director/Service[bareos-dir]: Failed to call refresh: Systemd restart for bareos-dir failed! Aug 3, 2021
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

1 participant