Project

General

Profile

Tâche #20778

Scénario #20630: Tests et qualification (23-25)

La restauration d'un module amon 2.6.2 a besoin d'un redémarrage de creoled

Added by Gilles Grandgérard over 2 years ago. Updated over 2 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
04/18/2017
Due date:
% Done:

100%

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

Description

Même problème que #19802 mais en 2.6.2


Related issues

Related to Distribution EOLE - Scénario #19802: La restauration d'un module amon 2.6.1 a besoin d'un redémarrage de creoled Terminé (Sprint) 04/04/2017 04/14/2017

Associated revisions

Revision 960669be (diff)
Added by Daniel Dehennin over 2 years ago

Race condition between reloading the configuration and the values

The “lock.acquire()” is called after saving the actual configuration
in a local variable, this could result:

- in the code being blocked by another thread because of an “INOTIFY”
event

- then the global configuration is written with the old configuration

  • creole/server.py (CreoleServer.reload_eol): Do not use a local copy
    of the configuration before the “lock.acquire()”.

Revision ccdff647 (diff)
Added by Daniel Dehennin over 2 years ago

Fix reference before assignment

  • creole/server.py (CreoleServer.reload_eol): Use self.config since
    config is not already defined.

Revision 5495fe30 (diff)
Added by Daniel Dehennin over 2 years ago

Notify systemd under lock protection

This avoid the situation with a reloaded creoled and systemd waiting
for the reload to finish.

  • creole/server.py (CreoleServer.reload_config): Move “lock.acquire()”
    and “lock.release()” to protect systemd notifications.

History

#1 Updated by Gilles Grandgérard over 2 years ago

  • Related to Scénario #19802: La restauration d'un module amon 2.6.1 a besoin d'un redémarrage de creoled added

#3 Updated by Joël Cuissinat over 2 years ago

  • Estimated time set to 3.00 h
  • Remaining (hours) set to 2.5

Le rechargement de creoled est bien demandé mais plante.
Extrait de /var/log/syslog correspondant à l'exécution de apt-eole install eole-bareos :

Jun 13 11:34:18 amon creoled[1623]: 127.0.0.1 - - [13/Jun/2017:11:34:18] "GET /get/creole?variable=mode_conteneur_actif HTTP/1.1" 200 32 "" "restkit/4.2.2" 
Jun 13 11:34:26 amon systemd[1]: Reloading.
Jun 13 11:34:26 amon systemd[1]: Started ACPI event daemon.
Jun 13 11:34:27 amon bareos-dbcheck: dbcheck ABORTING due to ERROR#012Unknown database type: XXX_REPLACE_WITH_DATABASE_DRIVER_XXX
Jun 13 11:34:27 amon bareos-dbcheck: BAREOS forced SEG FAULT to obtain traceback.
Jun 13 11:34:27 amon kernel: [ 2302.565331] show_signal_msg: 9 callbacks suppressed
Jun 13 11:34:27 amon kernel: [ 2302.565336] bareos-dbcheck[4558]: segfault at 0 ip 00007f208a906d4d sp 00007ffde456ae90 error 6 in libbareos-14.2.6.so[7f208a8d2000+5d000]
Jun 13 11:34:27 amon systemd[1]: Reloading.
Jun 13 11:34:27 amon systemd[1]: Started ACPI event daemon.
Jun 13 11:34:28 amon systemd[1]: Reloading.
Jun 13 11:34:28 amon systemd[1]: Started ACPI event daemon.
Jun 13 11:34:28 amon systemd[1]: Reloading.
Jun 13 11:34:28 amon systemd[1]: Started ACPI event daemon.
Jun 13 11:34:28 amon systemd[1]: Starting LSB: Bareos File Daemon...
Jun 13 11:34:28 amon systemd[1]: Started LSB: Bareos File Daemon.
Jun 13 11:34:28 amon systemd[1]: Reloading.
Jun 13 11:34:28 amon systemd[1]: Started ACPI event daemon.
Jun 13 11:34:29 amon systemd[1]: Reloading.
Jun 13 11:34:29 amon systemd[1]: Started ACPI event daemon.
Jun 13 11:34:31 amon creoled[1623]: creoled - Rechargement du fichier config.eol suite à l'évènement IN_MODIFY sur /etc/eole/extra/backuponce/config.eol
Jun 13 11:34:31 amon creoled[1623]: creoled - Impossible de charger la configuration Creole depuis le fichier config.eolImpossible de trouver le fichier /etc/eole/config.eol
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/get_etc_hosts.py - déjà défini : _gen_crossed_hosts
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/get_etc_hosts.py - déjà défini : _gen_hosts
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/get_etc_hosts.py - déjà défini : get_etc_hosts
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/get_etc_hosts.py - déjà défini : stderr
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/partitioning_utils.py - déjà défini : calc_free_PE
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/partitioning_utils.py - déjà défini : check_free_space
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/partitioning_utils.py - déjà défini : enable_lv_creation
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/partitioning_utils.py - déjà défini : is_fs_type
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/partitioning_utils.py - déjà défini : is_lv_name
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/master_network_interfaces.py - déjà défini : _gen_alias_interfaces
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/master_network_interfaces.py - déjà défini : _gen_bonding_option
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/master_network_interfaces.py - déjà défini : _gen_bridge_interface
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/master_network_interfaces.py - déjà défini : _gen_mtu_option
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/master_network_interfaces.py - déjà défini : _gen_physical_interface
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/master_network_interfaces.py - déjà défini : _gen_pppoe_interface
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/master_network_interfaces.py - déjà défini : _gen_unmanage_interface
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/master_network_interfaces.py - déjà défini : _gen_vlan_interfaces
Jun 13 11:34:31 amon creoled[1623]: /usr/share/creole/funcs/master_network_interfaces.py - déjà défini : get_master_interfaces
Jun 13 11:34:31 amon creoled[1623]: 127.0.0.1 - - [13/Jun/2017:11:34:31] "GET /reload_config HTTP/1.1" 200 31 "" "restkit/4.2.2" 
Jun 13 11:34:31 amon creoled[1623]: creoled - Rechargement du fichier config.eol suite à l'évènement IN_CREATE sur /etc/eole/extra/bareos/config.eol
Jun 13 11:34:31 amon creoled[1623]: creoled - Impossible de charger la configuration Creole depuis le fichier config.eolImpossible de trouver le fichier /etc/eole/config.eol
Jun 13 11:34:31 amon systemd[1]: Stopping Eole flask server...
Jun 13 11:34:31 amon creoled[1623]: creoled - Rechargement du fichier config.eol suite à l'évènement IN_CREATE sur /etc/eole/extra/backupreport/config.eol
Jun 13 11:34:31 amon creoled[1623]: creoled - Impossible de charger la configuration Creole depuis le fichier config.eolImpossible de trouver le fichier /etc/eole/config.eol
Jun 13 11:34:32 amon systemd[1]: Stopped Eole flask server.
Jun 13 11:34:32 amon systemd[1]: Starting Eole flask server...
Jun 13 11:34:32 amon systemd[1]: eoleflask.service: PID file /run/eoleflask.pid not readable (yet?) after start: No such file or directory
Jun 13 11:34:32 amon systemd[1]: Started Eole flask server.

Si on exécute à nouveau CreoleGet --reload, cela fonctionne.

#4 Updated by Daniel Dehennin over 2 years ago

Les fichiers .eol extras sont créés car ils ont des auto_save, ce qui engendre un rechargement de creoled (#19519#note-5).

Je pense que la procédure de rechargement devrait prendre en compte la non présence de /etc/eole/config.eol afin de ne pas tenter de recharger la configuration sans fichier de configuration.

À moins qu’il n’y ait besoin d’accéder aux nouvelles valeurs extras stockées dans les nouveaux fichier ?

#5 Updated by Scrum Master over 2 years ago

  • Status changed from Nouveau to En cours

#6 Updated by Scrum Master over 2 years ago

  • Description updated (diff)
  • Assigned To set to Daniel Dehennin

#7 Updated by Daniel Dehennin over 2 years ago

  • Project changed from Distribution EOLE to creole

#8 Updated by Daniel Dehennin over 2 years ago

  • % Done changed from 0 to 100
  • Remaining (hours) changed from 2.5 to 0.25

#9 Updated by Scrum Master over 2 years ago

  • Project changed from creole to Distribution EOLE
  • Status changed from En cours to Résolu

#10 Updated by Scrum Master over 2 years ago

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

Also available in: Atom PDF