Richard Young wrote: > I am attempting to install Oscar 6.0.5-1 on RHEL 5.5 and have run into a > problem configuring the Mysql database. When running oscar-config > --bootstrap, the configuration has gone past the installation of the extra > rpms then started the configuration of the Oscar databases but produced the > errors below. I have looked at the created databases and they seem to be > correct with the required tables. The installed Mysql rpms are > mysql-5.0.77-4.el5_5.3 and mysql-server-5.0.77-4.el5_5.3. I have attached the > bootstrap log from the last attempt, I have also used the --startover option > to clean out the installation and started again. Has anybody come across this > error before and/or know how to fix it? > > > DBD::mysql::db do failed: Cannot add or update a child row: a foreign key > constraint fails (`oscar/Nodes`, CONSTRAINT `Nodes_ibfk_2` FOREIGN KEY > (`group_name`) REFERENCES `Groups` (`name`) ON DELETE CASCADE ON UPDATE > CASCADE) at /usr/lib/perl5/vendor_perl/5.8.8/OSCAR/oda.pm line 713. > DB_DEBUG>/usr/bin/create_and_populate_basic_node_info: > ====> in Database::do_insert SQL : INSERT INTO Nodes (cluster_id, hostname, > name, group_name) SELECT 1, 'oscar_server', 'oscar_server', 'oscar_server' > Error message: Failed to insert values into Nodes table in database <oscar>: > Cannot add or update a child row: a foreign key constraint fails > (`oscar/Nodes`, CONSTRAINT `Nodes_ibfk_2` FOREIGN KEY (`group_name`) > REFERENCES `Groups` (`name`) ON DELETE CASCADE ON UPDATE CASCADE) at > /usr/lib/perl5/vendor_perl/5.8.8/OSCAR/oda.pm line 719. > /usr/bin/create_and_populate_basic_node_info: SQL command that failed was: > <INSERT INTO Nodes (cluster_id, hostname, name, group_name) SELECT 1, > 'oscar_server', 'oscar_server', 'oscar_server'> at > /usr/lib/perl5/vendor_perl/5.8.8/OSCAR/oda.pm line 719. > DB_DEBUG>/usr/bin/create_and_populate_basic_node_info: > ====>Failed to insert values via << INSERT INTO Nodes (cluster_id, hostname, > name, group_name) SELECT 1, 'oscar_server', 'oscar_server', 'oscar_server' >> > at /usr/bin/create_and_populate_basic_node_info line 80 > ERROR: Impossible to set headnode information in the database at > /usr/bin/create_and_populate_basic_node_info line 84.
<etc. etc.> I'm using version 5.1, so the line numbers in your scripts don't match up with mine. The one thing I can tell from the error messages is that your table "Groups" doesn't seem to have a row with "oscar_server" in the "name" column. Can you check that? Here's what my Groups table looks like: mysql> select * from Groups; +----+---------------+----------+---------+ | id | name | selected | type | +----+---------------+----------+---------+ | 1 | core | 0 | package | | 2 | Default | 1 | package | | 3 | oscar_clients | 0 | node | | 4 | included | 0 | package | | 5 | oscar_server | 0 | node | | 6 | image | 0 | image | | 7 | all | 0 | node | | 8 | Default_node | 0 | node | +----+---------------+----------+---------+ 8 rows in set (0.00 sec) Your mileage may vary. I hope someone who knows about 6.0.5 can comment on this. In my early struggles I sometimes found it necessary to drop the whole "oscar" database and let the installation process create it again from scratch. Otherwise corrupt data would persist and cause confusion. ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Oscar-users mailing list Oscar-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oscar-users