Bug 37919 - Failed to open '/var/log/garbd/garbd.log' for appending
Summary: Failed to open '/var/log/garbd/garbd.log' for appending
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: galera-garbd (show other bugs)
Version: unstable
Hardware: all Linux
: P5 normal
Assignee: Alexey Shabalin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-24 12:18 MSK by Alexander Makeenkov
Modified: 2020-09-11 20:31 MSK (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Makeenkov 2020-01-24 12:18:41 MSK
Сервис garbd не запускается из-за ошибки:

# systemctl status garbd
● garbd.service - Galera Arbitrator Daemon
     Loaded: loaded (/lib/systemd/system/garbd.service; disabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Fri 2020-01-24 11:54:11 MSK; 1s ago
       Docs: http://www.codership.com/wiki/doku.php?id=galera_arbitrator
    Process: 2776 ExecStart=/usr/sbin/garbd -c /etc/garbd/garbd.conf (code=exited, status=1/FAILURE)
   Main PID: 2776 (code=exited, status=1/FAILURE)
        CPU: 7ms

янв 24 11:54:11 servg systemd[1]: Started Galera Arbitrator Daemon.
янв 24 11:54:11 servg garbd[2776]: 2020-01-24 11:54:11.703 FATAL: Failed to open '/var/log/garbd/garbd.log' for appending: 2 (No such file or directory)
янв 24 11:54:11 servg garbd[2776]:          at garb/garb_logger.cpp:set_logfile():20
янв 24 11:54:11 servg systemd[1]: garbd.service: Main process exited, code=exited, status=1/FAILURE
янв 24 11:54:11 servg systemd[1]: garbd.service: Failed with result 'exit-code'.

Создаю файл лога вручную и даю права пользователю nobody (сервис запускается от этого пользователя):

# mkdir /var/log/garbd
# touch /var/log/garbd/garbd.log
# chown -R nobody:nobody /var/log/garbd/

Но garbd всё также не запускается с этой ошибкой.

Если запустить garbd вручную:

# su - nobody -s /bin/bash
-bash-4.4$ /usr/sbin/garbd -c /etc/garbd/garbd.conf

То всё корректно запускается и логи в /var/log/garbd/garbd.log пишутся.

Версия: galera-garbd-26.4.3-alt1
Система: ALT Server x86_64
Comment 1 Repository Robot 2020-09-11 20:31:50 MSK
galera-26.4.5-alt2 -> sisyphus:

 Wed Sep 09 2020 Alexey Shabalin <shaba@altlinux> 26.4.5-alt2
 - run daemon garbd as _garbd user
 - add /var/log/garbd dir with perm (ALT #37919)
 - update default config
 - /var/run -> /run, /var/lock -> /run/lock