Project

General

Profile

Tâche #35573

Scénario #35571: Traitement express MEN fermés 31/10/2023

bareos : reconfigure plante si le nombre de volume est supérieur à 1000

Added by Emmanuel GARETTE 7 months ago. Updated 6 months ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
09/17/2023
Due date:
% Done:

100%

Estimated time:
0.00 h
Remaining (hours):
0.0

Description

Sur un serveur EOLE 2.8.1 reconfigure plante tous les jours :

root@amon:~# /usr/share/eole/postservice/00-bareos reconfigure
Traceback (most recent call last):
  File "/usr/share/eole/postservice/00-bareos", line 58, in <module>
    if client.get_creole('activer_bareos_dir', 'non') == 'oui' and update_needed():
  File "/usr/share/eole/postservice/00-bareos", line 41, in update_needed
    volume_count = int(i)
ValueError: invalid literal for int() with base 10: '1,020'

Le nombre de volume est supérieur à 1000 :

root@amon:/mnt/sauvegardes# ls |wc -l
1021

Sur ce serveur j'ai fait un fix rapide pour que le reconfigure se fasse correctement :

volume_count = int(bareos_query('count_volumes')[0]['volumes'])

devient :

volume_count = int(bareos_query('count_volumes')[0]['volumes'].replace(',', ''))

Related issues

Related to Distribution EOLE - Demande #30531: Plantage de reconfigure si le nombre de volume dépasse 1000 Fermé

Associated revisions

Revision 501c1c9e (diff)
Added by Joël Cuissinat 7 months ago

Remove commas in number of volumes

Ref: #35573

Revision ea3fac21
Added by Joël Cuissinat 7 months ago

Merge branch '2.8.0/master' into 2.8.1/master

Conflicts:
  • postservice/00-bareos

Ref: #35573

Revision 01500fe6 (diff)
Added by Joël Cuissinat 7 months ago

With EOLE ≥ 2.8.1, 'volumes' key is in lower case

Ref: #35573

History

#1 Updated by Joël Cuissinat 7 months ago

  • Related to Demande #30531: Plantage de reconfigure si le nombre de volume dépasse 1000 added

#3 Updated by Joël Cuissinat 7 months ago

  • Parent task set to #34668

#4 Updated by Joël Cuissinat 7 months ago

  • Status changed from Nouveau to Résolu
  • Assigned To set to Joël Cuissinat
  • % Done changed from 0 to 100

#5 Updated by Joël Cuissinat 7 months ago

  • Status changed from Résolu to En cours

#6 Updated by Joël Cuissinat 7 months ago

Le test https://dev-eole.ac-dijon.fr/jenkins/job/2.8.1/job/test-instance-etb1amon-2.8.1-amd64/ semble en erreur depuis mon commit !

run-parts: executing /usr/share/eole/postservice/00-bareos instance
'Volumes'
● bareos-director.service - Bareos Director Daemon service
     Loaded: loaded (/lib/systemd/system/bareos-director.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-09-21 16:39:56 CEST; 12s ago
       Docs: man:bareos-dir(8)
    Process: 17714 ExecStartPre=/usr/sbin/bareos-dir -t -f (code=exited, status=0/SUCCESS)
    Process: 17728 ExecStart=/usr/sbin/bareos-dir (code=exited, status=0/SUCCESS)
   Main PID: 17731 (bareos-dir)
      Tasks: 4 (limit: 3495)
     Memory: 7.4M
     CGroup: /system.slice/bareos-director.service
             └─17731 /usr/sbin/bareos-dir

sept. 21 16:39:56 amon systemd[1]: Stopped Bareos Director Daemon service.
sept. 21 16:39:56 amon systemd[1]: Starting Bareos Director Daemon service...
sept. 21 16:39:56 amon systemd[1]: bareos-director.service: Can't open PID file /var/lib/bareos/bareos-dir.9101.pid (yet?) after start: Operation not permitted
sept. 21 16:39:56 amon systemd[1]: Started Bareos Director Daemon service.
run-parts: /usr/share/eole/postservice/00-bareos exited with return code 1
Erreur : postservice

#7 Updated by Joël Cuissinat 7 months ago

En 2.8.1, c'est bien "volumes" en minuscules et plus "Volumes", cf. #31484 !
La régression a été ajoutée à mon insu lors du merge :\

#8 Updated by Joël Cuissinat 7 months ago

  • Status changed from En cours to Résolu

#9 Updated by Joël Cuissinat 6 months ago

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

#10 Updated by Joël Cuissinat 6 months ago

  • Estimated time set to 0.00 h
  • Parent task changed from #34668 to #35571

Also available in: Atom PDF