Pre-Setup Action on Enviroment

26 views
Skip to first unread message

f.gra...@gmail.com

unread,
Nov 22, 2013, 8:49:00 AM11/22/13
to kwa...@googlegroups.com
Hi
I've installed Kwatee Version 2.1.13[build2]
I have a problem with Pre-Setup action on Environment
Instead there are no problem when I've used pre-deployment action from packages section and it work correctly.

But this features doesn't work on Pre-Setup environment.

I've configured a simply shell command to execute in pre-setup action:
touch examplefile.txt

But in log section the messages show that there aren't no script configured.

Establishing server connection...
No pre-setup script configured
Deploying packages
Deployment of package myApp in SKETCH-myApp@server1
No post-setup action configured
Done

Where I'am wrong? or it is a possible bug?

Thanks
Francesco

f.gra...@gmail.com

unread,
Nov 22, 2013, 9:15:35 AM11/22/13
to kwa...@googlegroups.com
Probably I've found the problem...

If there are pre and post-setup action it works. But if there is only pre-setup action it doesn't work

Establishing server connection...
Pre-setup script...
> undetermined result


Deploying packages
Deployment of package myApp in SKETCH-myApp@server1

Post-setup action...
> undetermined result
Done

Mac

unread,
Nov 25, 2013, 1:07:42 AM11/25/13
to
Hi Francesco,

There is an issue and you workaround is correct. The bug is fixed in update 2.1.14 which was released on Nov 24, 2013

Thanks for your feedback

f.gra...@gmail.com

unread,
Nov 25, 2013, 5:15:12 AM11/25/13
to kwa...@googlegroups.com
Hi Mac
Thanks for your answer

Today I'm trying to update version from 2.1.13 to 2.1.14 but there are some errors in updgradedatabase, and kwatee not works

INFO : 2013nov25 10:43:09,191 - Executing upgrade script upgrade_2.1.4
ERROR: 2013nov25 10:43:09,209 - ALTER TABLE KWDeploymentVariable CHANGE name value VARCHAR(200)
==> 1060 - Duplicate column name 'value'
INFO : 2013nov25 10:50:35,613 - MyServiceLocator initialized
INFO : 2013nov25 10:50:58,781 - Login attempt by quantiqa
DEBUG: 2013nov25 10:50:59,313 - getCurrentUser
DEBUG: 2013nov25 10:50:59,315 - getVersion
DEBUG: 2013nov25 10:50:59,368 - getVersion ok
DEBUG: 2013nov25 10:50:59,462 - getCurrentUser ok
DEBUG: 2013nov25 10:50:59,546 - getPackages
DEBUG: 2013nov25 10:50:59,564 - getPackages ok
DEBUG: 2013nov25 10:51:02,426 - getEnvironments
DEBUG: 2013nov25 10:51:02,513 - getMergedDeploymentFiles for package XDRGenerator[112760] in SKETCH-XDRGenerator@strombo_z2
DEBUG: 2013nov25 10:51:02,545 - getMergedDeploymentFiles ok
WARN : 2013nov25 10:51:02,558 - SQL Error: 1054, SQLState: 42S22
ERROR: 2013nov25 10:51:02,558 - Unknown column 'variables_0_.name' in 'field list'


To solve the problem, I'm trying to instal an empty version of kwatee-2.1.14 and see the DB schema difference and to apply these modification manualy on original DB.

The difference:

[ 1 ] D:\Download\Kwatee-Deploy\kwatee-2.1.13.db-schema.sql 25/11/2013, 11:11:08
[ 2 ] D:\Download\Kwatee-Deploy\kwatee-2.1.14.db-schema.sql 25/11/2013, 11:09:21
------------------------------------------------------------------------------------------------------------------------
=======
6 * --·Creato························:2013-11-25·11:09:03
* --·Creato························:2013-11-25·11:09:20
=======
=======
112 * ··`name`·varchar(40)·NOT·NULL,
* ··`name`·varchar(200)·NOT·NULL,
=======
=======
311 * ··`value`·varchar(40)·DEFAULT·NULL,
* ··`name`·varchar(200)·NOT·NULL,
=======
=======
314 * ··UNIQUE·KEY·`kwuc_versionvariable_name`·(`version_id`,`value`),
* ··UNIQUE·KEY·`kwuc_versionvariable_name`·(`version_id`,`name`),
=======
=======
328 * ··CONSTRAINT·`kwfk_dp_file_dp`·FOREIGN·KEY·(`dp_id`)·REFERENCES·`KWDeploymentPackage`·(`id`),
* ··CONSTRAINT·`kwfk_dp_file_file`·FOREIGN·KEY·(`file_id`)·REFERENCES·`KWRepositoryFile`·(`id`),
329 * ··CONSTRAINT·`kwfk_dp_file_file`·FOREIGN·KEY·(`file_id`)·REFERENCES·`KWRepositoryFile`·(`id`)
* ··CONSTRAINT·`kwfk_dp_file_dp`·FOREIGN·KEY·(`dp_id`)·REFERENCES·`KWDeploymentPackage`·(`id`)
=======
=======
343 * ··CONSTRAINT·`kwfk_environment_package_environment`·FOREIGN·KEY·(`environment_id`)·REFERENCES·`KWEnvironment`·(`id`),
* ··CONSTRAINT·`kwfk_environment_package_package`·FOREIGN·KEY·(`package_id`)·REFERENCES·`KWPackage`·(`id`),
344 * ··CONSTRAINT·`kwfk_environment_package_package`·FOREIGN·KEY·(`package_id`)·REFERENCES·`KWPackage`·(`id`)
* ··CONSTRAINT·`kwfk_environment_package_environment`·FOREIGN·KEY·(`environment_id`)·REFERENCES·`KWEnvironment`·(`id`)
=======
=======
358 * ··CONSTRAINT·`kwfk_environment_server_environment`·FOREIGN·KEY·(`environment_id`)·REFERENCES·`KWEnvironment`·(`id`),
* ··CONSTRAINT·`kwfk_environment_server_server`·FOREIGN·KEY·(`server_id`)·REFERENCES·`KWServer`·(`id`),
359 * ··CONSTRAINT·`kwfk_environment_server_server`·FOREIGN·KEY·(`server_id`)·REFERENCES·`KWServer`·(`id`)
* ··CONSTRAINT·`kwfk_environment_server_environment`·FOREIGN·KEY·(`environment_id`)·REFERENCES·`KWEnvironment`·(`id`)
=======
Message has been deleted
Message has been deleted

f.gra...@gmail.com

unread,
Nov 25, 2013, 5:35:20 AM11/25/13
to kwa...@googlegroups.com
With manually modification on old DB that I've backupped, kwatee 2.1.14 works correctly

The problem was due to a rename column from "value" to "name" and it relative unique key in table KWVersionVariable


BR
Francesco

CREATE TABLE IF NOT EXISTS `KWVersionVariable` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`version_id` bigint(20) NOT NULL,
`name` varchar(200) NOT NULL,
`default_value` varchar(2000) NOT NULL,
PRIMARY KEY (`id`),


UNIQUE KEY `kwuc_versionvariable_name` (`version_id`,`name`),

CONSTRAINT `kwfk_versionvariable_version` FOREIGN KEY (`version_id`) REFERENCES `KWVersion` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Mac

unread,
Nov 25, 2013, 1:43:56 PM11/25/13
to kwa...@googlegroups.com
There was a bug in the upgrade script for mysql. At the end of the day, the only changes are the length of KWVersionVariable.name (from 40 to 200) and that of KWDeploymentVariable.name (from 40 to 200).

The upgrade can be performed manually as follows:

ALTER TABLE KWDeploymentVariable CHANGE name name VARCHAR(200);
ALTER TABLE KWVersionVariable CHANGE name name VARCHAR(200);
UPDATE KWSystemProperty set value='2.1.14' WHERE name='kwatee_schema_version';

This is fixed in release 2.1.15, apologies for the annoying error 
Reply all
Reply to author
Forward
0 new messages