Command: /usr/bin/smbcontrol winbindd reload-config
return value 1 if there is no winbind process. 

I believe solution maybe to change in /etc/logrotate.d/winbind
from 

        postrotate
                if [ -x /usr/bin/smbcontrol ]; then
                        /usr/bin/smbcontrol winbindd reload-config
                elif [ -f /run/samba/winbindd.pid ]; then
                        kill -HUP `cat /run/samba/winbindd.pid`
                fi
        endscript

to

        postrotate
                if [ -f /run/samba/winbindd.pid ]; then
                        if [ -x /usr/bin/smbcontrol ]; then
                                /usr/bin/smbcontrol winbindd reload-config
                        else
                                kill -HUP `cat /run/samba/winbindd.pid`
                        fi
                fi
        endscript

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1953719

Title:
  logrotate.service fails because it starts before winbind.service

Status in logrotate package in Ubuntu:
  Confirmed

Bug description:
  I have started to play with Prometheus on my Ubuntu 20.04.3. You can
  configure Prometheus to alert you when a systemd service fails, and in
  this way I noticed a problem with the logrotate.service immediately
  after booting the system.

  I looked with Cockpit, and Cockpit was reporting logrotate.service as
  "Failed to start". This is the log for logrotate.service :

  ----8<----8<----8<----
  Dez 09 08:00:56 rdiez3 systemd[1]: Starting Rotate log files...
  Dez 09 08:00:58 rdiez3 logrotate[1760]: Can't find pid for destination 
'winbindd'
  Dez 09 08:00:58 rdiez3 logrotate[1069]: error: error running non-shared 
postrotate script for /var/log/samba/log.winbindd of 
'/var/log/samba/log.winbindd '
  Dez 09 08:00:58 rdiez3 systemd[1]: logrotate.service: Main process exited, 
code=exited, status=1/FAILURE
  Dez 09 08:00:58 rdiez3 systemd[1]: logrotate.service: Failed with result 
'exit-code'.
  Dez 09 08:00:58 rdiez3 systemd[1]: Failed to start Rotate log files.
  ----8<----8<----8<----

  I then looked at winbind.service , which was fine:

  ----8<----8<----8<----
  Dez 09 08:01:01 rdiez3 systemd[1]: Starting Samba Winbind Daemon...
  Dez 09 08:01:01 rdiez3 systemd[1]: Started Samba Winbind Daemon.
  ----8<----8<----8<----

  But I noticed that winbind.service started after logrotate.service . I
  wonder whether this is a service dependency issue.

  I am using this PC only during normal working hours, and
  logrotate.timer is set to run at midnight, when the computer will
  never be turned on.

  The worry is that this problem could effectively cause the complete
  log rotation to stop working.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1953719/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to