Project

General

Profile

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

Added by Joël Cuissinat over 4 years ago. Updated over 4 years ago.

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

100%

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

Description

http://jenkins.eole.lan/jenkins/job/2.6.1/job/test-sauvegarde-bareos-sauvegarde-full-2.6.1-amd64/lastFailedBuild/console

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 ***********************************


Related issues

Related to eole-bareos - Tâche #19842: Ajouter les clés étrangères dans le fichier de création de la base de données MySQL. Ne sera pas résolu 02/21/2017

Associated revisions

Revision d97f7864 (diff)
Added by Joël Cuissinat over 4 years ago

Retour en arrière sur la mise en place des clés étrangères

  • scripts/bareosregen.sh : ne pas charger le fichier SQL contenant les clés

Ref: #20292
Ref: #19842

History

#1 Updated by Joël Cuissinat over 4 years ago

  • Status changed from Nouveau to En cours
  • Assigned To set to 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 Updated by Joël Cuissinat over 4 years ago

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 Updated by Joël Cuissinat over 4 years ago

  • Related to Tâche #19842: Ajouter les clés étrangères dans le fichier de création de la base de données MySQL. added

#4 Updated by Joël Cuissinat over 4 years ago

  • Status changed from En cours to Résolu
  • % Done changed from 0 to 100
  • Remaining (hours) changed from 3.0 to 0.5

#5 Updated by Joël Cuissinat over 4 years ago

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

Les tests squash repassent ;)

Also available in: Atom PDF