Tâche #20292
Scénario #20093: Les sauvegardes Bareos doivent être fonctionnelles sur un partage windows 10
La mise en place des clés étrangères Bareos révèle de nouveaux problèmes
Restant à faire (heures):
0.0
Description
00:05:16.149 ********************* BCONSOLE: messages dir ********************************* 00:05:16.149 Connecting to Director 127.0.0.1:9101 00:05:16.149 1000 OK: scribe-dir Version: 14.2.6 (16 Nov 2015) 00:05:16.149 Enter a period to cancel a command. 00:05:16.149 messages 00:05:16.149 20-avril 05:57 scribe-dir JobId 0: Fatal error: sql_create.c:98 Create DB Job record INSERT INTO Job (Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES ('JobSchedulePre.2017-04-20_05.57.40_08','JobSchedulePre','B','F','C','2017-04-20 05:57:40',1492660660,1,'') failed. ERR=Cannot add or update a child row: a foreign key constraint fails (`bareos`.`Job`, CONSTRAINT `Job_ibfk_2` FOREIGN KEY (`PoolId`) REFERENCES `Pool` (`PoolId`)) 00:05:16.149 20-avril 05:57 scribe-dir JobId 0: Fatal error: sql_create.c:98 Create DB Job record INSERT INTO Job (Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES ('JobSauvegarde.2017-04-20_05.57.40_10','JobSauvegarde','B','F','C','2017-04-20 05:57:40',1492660660,1,'') failed. ERR=Cannot add or update a child row: a foreign key constraint fails (`bareos`.`Job`, CONSTRAINT `Job_ibfk_2` FOREIGN KEY (`PoolId`) REFERENCES `Pool` (`PoolId`)) 00:05:16.149 20-avril 05:57 scribe-dir JobId 0: Fatal error: sql_create.c:98 Create DB Job record INSERT INTO Job (Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES ('BackupCatalog.2017-04-20_05.57.40_12','BackupCatalog','B','F','C','2017-04-20 05:57:40',1492660660,1,'') failed. ERR=Cannot add or update a child row: a foreign key constraint fails (`bareos`.`Job`, CONSTRAINT `Job_ibfk_2` FOREIGN KEY (`PoolId`) REFERENCES `Pool` (`PoolId`)) 00:05:16.149 ********************* BCONSOLE: status dir ***********************************
Demandes liées
Révisions associées
Historique
#1 Mis à jour par Joël Cuissinat il y a environ 7 ans
- Statut changé de Nouveau à En cours
- Assigné à mis à Joël Cuissinat
Dans le script "original" : /usr/lib/bareos/scripts/ddl/creates/mysql.sql, on a bien :
CREATE TABLE Job ( JobId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, Job TINYBLOB NOT NULL, [ ... ] PoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool, [ ... ]
CREATE TABLE Pool ( PoolId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, [ ... ]
Ces lignes ne sont pas modifiées par /usr/share/eole/sbin/bareosregen.sh
#2 Mis à jour par Joël Cuissinat il y a environ 7 ans
Tests réalisés :
# bareosconfig.py -s manual # bareosconfig.py -d | grep ^Support Support : {u'support_type': u'manual'} # bareosconfig.py -n --level=Full tail -f /var/log/rsyslog/local/bareos-dir/bareos-dir.crit.log 2017-04-20T16:55:43.920174+02:00 scribe.etb1.lan bareos-dir: scribe-dir JobId 0: Fatal error: sql_create.c:98 Create DB Job record INSERT INTO Job (Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES ('JobSchedulePre.2017-04-20_16.55.43_09','JobSchedulePre','B','F','C','2017-04-20 16:55:43',1492700143,1,'') failed. ERR=Cannot add or update a child row: a foreign key constraint fails (`bareos`.`Job`, CONSTRAINT `Job_ibfk_2` FOREIGN KEY (`PoolId`) REFERENCES `Pool` (`PoolId`))
À chaque fois qu'on corrige (suppression de "DEFAULT 0" ou mise en commentaire de la clé étrangère), ça plante sur une autre !
Je propose de revenir en arrière sur #19842 afin notamment de ne pas bloquer la sortie d'EOLE 2.6.1.
#3 Mis à jour par Joël Cuissinat il y a environ 7 ans
- Lié à Tâche #19842: Ajouter les clés étrangères dans le fichier de création de la base de données MySQL. ajouté
#4 Mis à jour par Joël Cuissinat il y a environ 7 ans
- Statut changé de En cours à Résolu
- % réalisé changé de 0 à 100
- Restant à faire (heures) changé de 3.0 à 0.5
#5 Mis à jour par Joël Cuissinat il y a environ 7 ans
- Statut changé de Résolu à Fermé
- Restant à faire (heures) changé de 0.5 à 0.0
Les tests squash repassent ;)