Announcement

Collapse
No announcement yet.

Erreur Mysql lors de la migration de Oreon 1.4 vers 1.4.1

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Erreur Mysql lors de la migration de Oreon 1.4 vers 1.4.1

    Tout d'abord, bonjour à tous.

    J'ai une installation en production avec Nagios 2.9, Oreon 1.4 patché, Nagvis et NaReTo.

    J'ai fait une copie de cette machine sous xen pour expérimenter la migration vers Oreon 1.4.1

    La partie ./install.sh se passe sans problèmes mais lors du UpdateDB-1.4_to_1.4.1.sql j'ai l'erreur suivante en sortie :

    Error on rename of './oreon/extended_host_information' to './oreon/#sql2-e29-1e9' (errno: 152)
    Je ne suis pas très à l'aise avec MySQL , quelqu'un aurait-il une piste ?

    Merci d'avance.

  • #2
    Personne n'aurait ne serait-ce qu'une piste ?

    Comment


    • #3
      Alors,

      Si ton update SQL a petee a cette endroit, il doit te manquer pas mal de choses.

      En gros la modif qui a ete effectuee sur cette table est la suivante :

      Code:
      ALTER TABLE `extended_host_information`  DROP FOREIGN KEY `extended_host_information_ibfk_2`;
      ALTER TABLE `extended_host_information`  DROP FOREIGN KEY `extended_host_information_ibfk_3`;
      Afin de pouvoir virer ces champs qui ont des relations avec des cles etrangeres.
      Code:
      ALTER TABLE `extended_host_information` DROP `country_id` , DROP `city_id` ;
      On fait la meme operation pour hostgroup et service group, c etonnant que seul la table extended ne marche pas chez toi..

      Code:
      ALTER TABLE `hostgroup`  DROP FOREIGN KEY `hostgroup_ibfk_1`;
      ALTER TABLE `hostgroup`  DROP FOREIGN KEY `hostgroup_ibfk_2`;
      ALTER TABLE `servicegroup`  DROP FOREIGN KEY `servicegroup_ibfk_1`;
      ALTER TABLE `servicegroup`  DROP FOREIGN KEY `servicegroup_ibfk_2`;
      
      ALTER TABLE `hostgroup` DROP `country_id` ,DROP `city_id` ;
      ALTER TABLE `servicegroup` DROP `country_id` ,DROP `city_id` ;
      Regarde si ces cles/champs existent encore dans des tables.

      Ensuite, pour savoir si la suite de l'update SQL a foiré, regarde quelle version de Centreon apparait sur la page de login.
      Si c'est pas 1.4.1 c'est que le fihcier SQL ne s'est pas termine, donc il reste ca je pense :
      Code:
      DELETE FROM `topology_JS` WHERE `id_page` = 6;
      DELETE FROM `topology_JS` WHERE `id_page` =  601;
      DELETE FROM `topology_JS` WHERE `id_page` =  60101;
      DELETE FROM `topology_JS` WHERE `id_page` =  60102;
      DELETE FROM `topology_JS` WHERE `id_page` =  60103;
      
      ALTER TABLE `giv_graphs_template`
        DROP `title`,
        DROP `img_format`,
        DROP `period`,
        DROP `step`,
        DROP `default_tpl2`;
        
      ALTER TABLE `giv_components_template`
        DROP `ds_legend`,
        DROP `default_tpl2`;
        
      ALTER TABLE `giv_graphs_template` ADD `split_component` ENUM("0", "1") NOT NULL DEFAULT '0' AFTER `stacked` ;
      ALTER TABLE `giv_graphs_template` ADD `base` INT NULL DEFAULT '1000' AFTER `height` ;
      
      INSERT INTO `topology` (`topology_id` , `topology_name` , `topology_icone` , `topology_parent` , `topology_page` , `topology_order` , `topology_group` , `topology_url` , `topology_url_opt` , `topology_popup` , `topology_modules` , `topology_show`) VALUES ('', 'menu_ODS', './img/icones/16x16/chart.gif', 501, 50106, 60, 1, './include/options/ods/manageData.php', NULL, '0', '0', '1');
      INSERT INTO `topology` (`topology_id` , `topology_name` , `topology_icone` , `topology_parent` , `topology_page` , `topology_order` , `topology_group` , `topology_url` , `topology_url_opt` , `topology_popup` , `topology_modules` , `topology_show`) VALUES ('', 'menu_ODS_manage', './img/icones/16x16/data_down.gif', 50106, 5010602, 20, 1, './include/options/ods/manageData.php', NULL, '0', '0', '1');
      
      -- 23/07/2007
      ALTER TABLE `giv_graphs`  DROP FOREIGN KEY `giv_graphs_ibfk_1`;
      ALTER TABLE `giv_components`  DROP FOREIGN KEY `giv_components_ibfk_1`;
      DROP TABLE `giv_graphs`;
      DROP TABLE `giv_components`;
      
      UPDATE `topology` SET `topology_icone` = './img/icones/16x16/about.gif' WHERE `topology_page` =50601 LIMIT 1;
      
      UPDATE `oreon_informations` SET `value` = '1.4.1-RC1' WHERE CONVERT( `oreon_informations`.`key` USING utf8 ) = 'version' AND CONVERT( `oreon_informations`.`value` USING utf8 ) = '1.4' LIMIT 1 ;
      UPDATE `oreon_informations` SET `value` = '1.4.1-RC2' WHERE CONVERT( `oreon_informations`.`key` USING utf8 ) = 'version' AND CONVERT( `oreon_informations`.`value` USING utf8 ) = '1.4.1-RC1' LIMIT 1 ;
      
      -- 03/08/2007
      UPDATE `oreon_informations` SET `value` = '1.4.1-RC3' WHERE CONVERT( `oreon_informations`.`key` USING utf8 ) = 'version' AND CONVERT( `oreon_informations`.`value` USING utf8 ) = '1.4.1-RC2' LIMIT 1 ;
      
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 601, 'a',
      './include/common/javascript/autoSelectCommandExample.js', NULL);
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 601, 'c',
      './include/common/javascript/autoSelectCommandExample.js', NULL);
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 601, 'mc',
      './include/common/javascript/autoSelectCommandExample.js', NULL);
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 60103, 'a',
      './include/common/javascript/autoSelectCommandExample.js', NULL);
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 60103, 'c',
      './include/common/javascript/autoSelectCommandExample.js', NULL);
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 60103, 'mc',
      './include/common/javascript/autoSelectCommandExample.js', NULL);
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 6, 'a',
      './include/common/javascript/autoSelectCommandExample.js', NULL);
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 6, 'c',
      './include/common/javascript/autoSelectCommandExample.js', NULL);
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 6, 'mc',
      './include/common/javascript/autoSelectCommandExample.js', NULL);
      
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 6, 'a', './include/common/javascript/changetab.js',
      'initChangeTab');
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 6, 'w', './include/common/javascript/changetab.js',
      'initChangeTab');
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 6, 'c', './include/common/javascript/changetab.js',
      'initChangeTab');
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 6, 'mc', './include/common/javascript/changetab.js',
      'initChangeTab');
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 601, 'w',
      './include/common/javascript/changetab.js', 'initChangeTab');
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 601, 'c',
      './include/common/javascript/changetab.js', 'initChangeTab');
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 601, 'a',
      './include/common/javascript/changetab.js', 'initChangeTab');
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 601, 'mc',
      './include/common/javascript/changetab.js', 'initChangeTab');
      
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 60101, 'c',
      './include/common/javascript/changetab.js', 'initChangeTab');
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 60101, 'w',
      './include/common/javascript/changetab.js', 'initChangeTab');
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 60101, 'a',
      './include/common/javascript/changetab.js', 'initChangeTab');
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 60101, 'mc',
      './include/common/javascript/changetab.js', 'initChangeTab');
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 60103, 'a',
      './include/common/javascript/changetab.js', 'initChangeTab');
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 60103, 'c',
      './include/common/javascript/changetab.js', 'initChangeTab');
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 60103, 'w',
      './include/common/javascript/changetab.js', 'initChangeTab');
      INSERT INTO `topology_JS` (`id_t_js` , `id_page` , `o` , `PathName_js` ,
      `Init`) VALUES ('', 60103, 'mc',
      './include/common/javascript/changetab.js', 'initChangeTab');
      
      UPDATE `oreon_informations` SET `value` = '1.4.1' WHERE CONVERT( `oreon_informations`.`key` USING utf8 ) = 'version' AND CONVERT( `oreon_informations`.`value` USING utf8 ) = '1.4.1-RC3' LIMIT 1 ;
      Romain Le Merlus
      Centreon Forge
      MERETHIS

      Comment


      • #4
        Ok merci pour ta réponse.

        J'ai vérifier, apparement les champs n'existent plus.

        Par contre je ne peux arriver sur la page de login, vu que l'install n'est pas terminée je me fait rediriger sur la procédure de mise à jour.
        Puis-je forcer l'acces à la page de login ?

        Marci d'avance

        Mat.

        Comment


        • #5
          Pour ne pas passer par la page d'update, renomme le repertoire oreon/install
          Romain Le Merlus
          Centreon Forge
          MERETHIS

          Comment

          Working...
          X