Project

General

Profile

Tâche #17083

eole-bareos - Scénario #16747: Faire fonctionner Bareos pour EOLE 2.6.0

Erreur lors de la sauvegarde de la base ejabberd par Bareos

Added by Joël Cuissinat about 7 years ago. Updated about 7 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
09/13/2016
Due date:
% Done:

100%

Estimated time:
2.00 h
Spent time:
Remaining (hours):
0.0

Description

Test SR-T02-001 - Sauvegarde totale en local pas n°5 :

2016-09-13T16:29:27.679760+02:00 scribe.etb1.lan bareos-dir: scribe-fd JobId 1: ClientBeforeJob: eole-schedule - /usr/share/eole/schedule/daily/pre/ejabberd:
2016-09-13T16:29:27.679875+02:00 scribe.etb1.lan bareos-dir: scribe-fd JobId 1: ClientBeforeJob: eole-schedule - This command can only be run by root or the user ejabberd
2016-09-13T16:29:27.679986+02:00 scribe.etb1.lan bareos-dir: scribe-fd JobId 1: ClientBeforeJob: eole-schedule - run-parts: /usr/share/eole/schedule/daily/pre/ejabberd exited with return code 4
2016-09-13T16:29:27.680124+02:00 scribe.etb1.lan bareos-dir: scribe-fd JobId 1: ClientBeforeJob: /usr/share/eole/schedule/daily/pre/annuaire:
2016-09-13T16:29:27.680235+02:00 scribe.etb1.lan bareos-dir: scribe-fd JobId 1: ClientBeforeJob: Stop Systemd service slapd                                              [  OK  ]
2016-09-13T16:29:27.680355+02:00 scribe.etb1.lan bareos-dir: scribe-fd JobId 1: ClientBeforeJob: Start Systemd service slapd                                             [  OK  ]
2016-09-13T16:29:27.680462+02:00 scribe.etb1.lan bareos-dir: scribe-fd JobId 1: ClientBeforeJob: /usr/share/eole/schedule/daily/pre/ejabberd:
2016-09-13T16:29:27.680568+02:00 scribe.etb1.lan bareos-dir: scribe-fd JobId 1: ClientBeforeJob: This command can only be run by root or the user ejabberd
2016-09-13T16:29:27.680682+02:00 scribe.etb1.lan bareos-dir: scribe-fd JobId 1: ClientBeforeJob: run-parts: /usr/share/eole/schedule/daily/pre/ejabberd exited with return code 4
2016-09-13T16:29:27.680802+02:00 scribe.etb1.lan bareos-dir: scribe-fd JobId 1: ClientBeforeJob: Une erreur a été détectée
2016-09-13T16:29:27.680910+02:00 scribe.etb1.lan bareos-dir: scribe-fd JobId 1: ClientBeforeJob: eole-schedule - Sortie de pre schedule daily avec un code d'erreur

Associated revisions

Revision d3b3f83b (diff)
Added by Laurent Flori about 7 years ago

La sauvgarde doit être lancé par l'utilisateur ejabberd

ref: #17083 @20min

schedule/scripts/ejabberd:
- Ajout d'un su -l ejabberd -c à la commande CreoleRun
- Le path complet vers ejabberdctl est obligatoire

History

#1 Updated by Joël Cuissinat about 7 years ago

  • Description updated (diff)

#2 Updated by Emmanuel GARETTE about 7 years ago

Résultat de la commande "id" au moment du schedule :

 uid=0(root) gid=114(bareos) groupes=114(bareos)

Dans le code on voit qu'il vérifie l'utilisateur ET le groupe :

    for GID in `id -G`; do
[..]
    if [ `id -nu` = "$INSTALLUSER" -o `id -g` -eq `id -g $INSTALLUSER` ] ; then

#3 Updated by Emmanuel GARETTE about 7 years ago

  • % Done changed from 0 to 20

Dans /usr/sbin/ejabberdctl si on remplace :

INSTALLUSER=ejabberd"

par

"INSTALLUSER=" 
export HOME=/var/lib/ejabberd

Cela fonctionne :/

(le export on doit pouvoir le mettre dans le script qui appel la commande, par contre pour le "INSTALLUSER" je n'ai pas de solution. Peut être utiliser un script modifié ?)

#4 Updated by Emmanuel GARETTE about 7 years ago

  • Parent task set to #16747

#5 Updated by Laurent Flori about 7 years ago

  • Description updated (diff)
  • Assigned To set to Laurent Flori

#6 Updated by Joël Cuissinat about 7 years ago

  • Status changed from Nouveau to Résolu
  • % Done changed from 20 to 100

#7 Updated by Joël Cuissinat about 7 years ago

Validé par test squash

#8 Updated by Joël Cuissinat about 7 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) changed from 2.0 to 0.0

Also available in: Atom PDF