Dear all,
I had a look at the problem I sent a mail about earlier and found the root
cause.
1. In image.pm (Line #900-901) the insert statement has a hard coded "4" in
column "basedoffrevisionid":
INSERT INTO image (name, prettyname, ownerid, platformid, OSid,
imagemetaid, deleted, lastupdate, size, architecture, basedoffrevisionid)
VALUES ('$image_name', '$image_prettyname', '$user_id', '1', $os_id,
$imagemeta_id, '1', NOW( ), '1450', '$architecture_choice', '4')
2. I found a new DB constraint that causes the insert statement to fail (see
the log part below):
KEY `basedoffrevisionid` (`basedoffrevisionid`)
ALTER TABLE `image` ADD CONSTRAINT FOREIGN KEY (`basedoffrevisionid`)
REFERENCES `imagerevision` (`id`) ON UPDATE CASCADE;
SVN commit:
Revision: 1646344
Author: arkurth
Date: 2014. december 17. 22:51:21
Message:
VCL-763
Added constraints to the several columns which reference another table.
----
Modified : /vcl/trunk/mysql/vcl.sql
Due to this, we are simply unable to create base images in a 2.4 (test version)
clean install (using the install script provided by Josh). We are testing 2.4
internally and certainly could hack around this issue, but we would appreciate
if you could fix it in the trunk. I suspect that this error is not specific to
our environment and actually effects any clean install of the current 2.4
version...
Br,
Aaron Toth
[email protected] ezt írta: -----
Címzett: [email protected]
Feladó: [email protected]
Dátum: 2015/01/21 11:36de.
Tárgy: Base image creation issue VCL2.4
Dear all,
I found a possible bug in VCL 2.4, base image creation is not working, because
image name cannot be set.
Message:
ERROR: failed to insert into image table. Please choose another name.
Relevant log part:
|20949|||vcld|utils.pm:database_execute|2928| ---- WARNING ----
|20949|||vcld|utils.pm:database_execute|2928| 2015-01-21
09:04:18|20949|||vcld|utils.pm:database_execute|2928|could not execute SQL
statement: INSERT INTO image (name, prettyname, ownerid, platformid, OSid,
imagemetaid, deleted, lastupdate, size, architecture, basedoffrevisionid)
|20949|||vcld|utils.pm:database_execute|2928| VALUES
('xenserverlinux-centos-v0', 'centos', '1', '1', 56, 1, '1', NOW( ), '1450',
'x86_64', '4')
|20949|||vcld|utils.pm:database_execute|2928| Cannot add or update a child row:
a foreign key constraint fails (`vcl`.`image`, CONSTRAINT `image_ibfk_6`
FOREIGN KEY (`basedoffrevisionid`) REFERENCES `imagerevision` (`id`) ON UPDATE
CASCADE)
|20949|||vcld|utils.pm:database_execute|2928| ( 0) utils.pm, database_execute
(line: 2928)
|20949|||vcld|utils.pm:database_execute|2928| (-1) image.pm,
setup_capture_base_image (line: 904)
|20949|||vcld|utils.pm:database_execute|2928| (-2) vcld, setup_management_node
(line: 929)
VCL was installed with the script Josh provided.
Frontend issue:
I add a new provisioning type(XenServer) to the VCL(database), but on the
frontend I cannot select it when I add new virtual machines to VCL.
I would like to request your assitance.
Br,
Aaron Toth
VCL System Administrator
Fault Tolerant Systems Research Group
Department of Measurement and Information Systems
Budapest University of Technology and Economics