Project

General

Profile

Tâche #31046

Scénario #30626: Upgrade-Auto horus 2.5.2 vers 2.6.2 : problème gestion upgrade du fichier extra/schedule (suite)

Corriger le problème weekday et monthday identique

Added by Emmanuel GARETTE 11 months ago. Updated 11 months ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
11/06/2020
Due date:
% Done:

100%

Remaining (hours):
0.0

Description

J'ai lancé toute la nuit le script suivant :

from creole.loader import creole_loader
from os import unlink
from os.path import isfile
from json import load
i = 0
while i != 100000:
    print(i)
    if isfile('/etc/eole/extra/schedule/config.eol'):
        unlink('/etc/eole/extra/schedule/config.eol')
    creole_loader(load_extra=True)
    with open('/etc/eole/extra/schedule/config.eol') as fh:
        a = load(fh)
    assert a['schedule.schedule.monthday'] != a['schedule.schedule.weekday']
    i += 1

Je l'ai arrêté à 46670 test, et jamais je n'ai monthday == weekday. C'est possible une version inférieur qui pose pb.

Durant l'upgrade de la conf on devrait corriger le problème.

Associated revisions

Revision 30ca0d60 (diff)
Added by Emmanuel GARETTE 11 months ago

recalculer une nouvelle valeur pour monthday si monthday == weekday dans les schedules (ref #31046)

History

#1 Updated by Emmanuel GARETTE 11 months ago

Il n'y a pas de procédure pour migrer les variables extra, cela demanderait pas mal de modification.

C'est trop dangereux sur 2.6.2 et supérieur.

#2 Updated by Emmanuel GARETTE 11 months ago

  • Status changed from Nouveau to Résolu
  • Assigned To set to Emmanuel GARETTE
  • % Done changed from 0 to 100

#3 Updated by Joël Cuissinat 11 months ago

root@scribe:~# cat /etc/eole/extra/schedule/config.eol { "schedule.schedule.monthday": {"owner": "forced", "val": 1} , "___version___": "2.6.2", "schedule.schedule.minute": {"owner": "creoled", "val": 38}, "schedule.schedule.weekday": {"owner": "creoled", "val": 1} , "schedule.schedule.hour": {"owner": "creoled", "val": 1}}
root@scribe:~# service creoled start
root@scribe:~# cat /etc/eole/extra/schedule/config.eol { "schedule.schedule.monthday": {"owner": "forced", "val": 7} , "___version___": "2.6.2", "schedule.schedule.minute": {"owner": "creoled", "val": 38}, "schedule.schedule.weekday": {"owner": "creoled", "val": 1} , "schedule.schedule.hour": {"owner": "creoled", "val": 1}}root@scribe:~#

#4 Updated by Joël Cuissinat 11 months ago

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

Also available in: Atom PDF