Hi all, what databases does Beaker support? I had the impression that it should support MySQL and PostgreSQL to name a few but with Postgre I keep getting errors.
When you import a distro in Cobbler and then run the osversion.trigger script on the beaker-server I get this error:
ProgrammingError: (ProgrammingError) function min(boolean) does not exist at character 639 HINT: No function matches the given name and argument types. You might need to add explicit type casts. 'SELECT watchdog.id AS watchdog_id, watchdog.system_id AS watchdog_system_id, watchdog.recipe_id AS watchdog_recipe_id, watchdog.recipetask_id AS watchdog_recipetask_id, watchdog.subtask AS watchdog_subtask, watchdog.kill_time AS watchdog_kill_time \nFROM watchdog JOIN system ON system.id = watchdog.system_id JOIN recipe ON recipe.id = watchdog.recipe_id JOIN recipe_set ON recipe_set.id = recipe.recipe_set_id \nWHERE %(param_1)s = system.lab_controller_id AND recipe_set.id IN (SELECT recipe_set.id \nFROM watchdog JOIN recipe ON recipe.id = watchdog.recipe_id JOIN recipe_set ON recipe_set.id = recipe.recipe_set_id GROUP BY recipe_set.id \nHAVING min(watchdog.kill_time <= %(kill_time_1)s)) ORDER BY watchdog.id' {'kill_time_1': datetime.datetime(2011, 4, 15, 18, 10, 26, 66766), 'param_1': 1} 2011-04-15 21:10:26,097 bkr.server.xmlrpccontroller ERROR Error handling XML-RPC method
The offending part I think is HAVING min(watchdog.kill_time <= %(kill_time_1)s))
Regards, Alexander.
On 04/15/2011 02:14 PM, Alexander Todorov wrote:
Hi all, what databases does Beaker support? I had the impression that it should support MySQL and PostgreSQL to name a few but with Postgre I keep getting errors.
When you import a distro in Cobbler and then run the osversion.trigger script on the beaker-server I get this error:
ProgrammingError: (ProgrammingError) function min(boolean) does not exist at character 639 HINT: No function matches the given name and argument types. You might need to add explicit type casts. 'SELECT watchdog.id AS watchdog_id, watchdog.system_id AS watchdog_system_id, watchdog.recipe_id AS watchdog_recipe_id, watchdog.recipetask_id AS watchdog_recipetask_id, watchdog.subtask AS watchdog_subtask, watchdog.kill_time AS watchdog_kill_time \nFROM watchdog JOIN system ON system.id = watchdog.system_id JOIN recipe ON recipe.id = watchdog.recipe_id JOIN recipe_set ON recipe_set.id = recipe.recipe_set_id \nWHERE %(param_1)s = system.lab_controller_id AND recipe_set.id IN (SELECT recipe_set.id \nFROM watchdog JOIN recipe ON recipe.id = watchdog.recipe_id JOIN recipe_set ON recipe_set.id = recipe.recipe_set_id GROUP BY recipe_set.id \nHAVING min(watchdog.kill_time<= %(kill_time_1)s)) ORDER BY watchdog.id' {'kill_time_1': datetime.datetime(2011, 4, 15, 18, 10, 26, 66766), 'param_1': 1} 2011-04-15 21:10:26,097 bkr.server.xmlrpccontroller ERROR Error handling XML-RPC method
The offending part I think is HAVING min(watchdog.kill_time<= %(kill_time_1)s))
Regards, Alexander. _______________________________________________ Beaker-devel mailing list Beaker-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/beaker-devel
I would have thought sqlalchemy would help us here. We are planning to migrate to a newer version of sqlalchemy which may help.
On 04/15/2011 02:14 PM, Alexander Todorov wrote:
Hi all, what databases does Beaker support? I had the impression that it should support MySQL and PostgreSQL to name a few but with Postgre I keep getting errors.
When you import a distro in Cobbler and then run the osversion.trigger script on the beaker-server I get this error:
ProgrammingError: (ProgrammingError) function min(boolean) does not exist at character 639 HINT: No function matches the given name and argument types. You might need to add explicit type casts. 'SELECT watchdog.id AS watchdog_id, watchdog.system_id AS watchdog_system_id, watchdog.recipe_id AS watchdog_recipe_id, watchdog.recipetask_id AS watchdog_recipetask_id, watchdog.subtask AS watchdog_subtask, watchdog.kill_time AS watchdog_kill_time \nFROM watchdog JOIN system ON system.id = watchdog.system_id JOIN recipe ON recipe.id = watchdog.recipe_id JOIN recipe_set ON recipe_set.id = recipe.recipe_set_id \nWHERE %(param_1)s = system.lab_controller_id AND recipe_set.id IN (SELECT recipe_set.id \nFROM watchdog JOIN recipe ON recipe.id = watchdog.recipe_id JOIN recipe_set ON recipe_set.id = recipe.recipe_set_id GROUP BY recipe_set.id \nHAVING min(watchdog.kill_time<= %(kill_time_1)s)) ORDER BY watchdog.id' {'kill_time_1': datetime.datetime(2011, 4, 15, 18, 10, 26, 66766), 'param_1': 1} 2011-04-15 21:10:26,097 bkr.server.xmlrpccontroller ERROR Error handling XML-RPC method
The offending part I think is HAVING min(watchdog.kill_time<= %(kill_time_1)s))
Regards, Alexander. _______________________________________________ Beaker-devel mailing list Beaker-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/beaker-devel
Can you try the attached patch?
На 15.04.2011 21:46, Bill Peck написа:
Can you try the attached patch?
Hi Bill, I think this patch helped partially (or not at all).
After cobbler import I did:
# /var/lib/cobbler/triggers/sync/post/osversion.trigger Update TreeRepos for RHEL6.0-Server-x86_64 Update Family for RHEL6.0-Server-x86_64
This appears to have completed successfully. Then in the webUI I went to Distros -> All and it showed no distros. /var/log/beaker/server.log shows:
Error handling XML-RPC method Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/bkr/server/xmlrpccontroller.py", line 38, in RPC2 response = obj(*params) File "<string>", line 3, in watchdogs File "/usr/lib/python2.4/site-packages/turbogears/identity/conditions.py", line 207, in require return fn(self, *args, **kwargs) File "/usr/lib/python2.4/site-packages/bkr/server/recipetasks.py", line 131, in watchdogs return [dict(recipe_id = w.recipe.id, File "/usr/lib/python2.4/site-packages/sqlalchemy/orm/query.py", line 938, in __iter__ return self._execute_and_instances(context) File "/usr/lib/python2.4/site-packages/sqlalchemy/orm/query.py", line 941, in _execute_and_instances result = self.session.execute(querycontext.statement, params=self._params, mapper=self.mapper, instance=self._refresh_instance) File "/usr/lib/python2.4/site-packages/sqlalchemy/orm/session.py", line 628, in execute return self.__connection(engine, close_with_result=True).execute(clause, params or {}) File "/usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py", line 844, in execute return Connection.executors[c](self, object, multiparams, params) File "/usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py", line 895, in execute_clauseelement return self._execute_compiled(elem.compile(dialect=self.dialect, column_keys=keys, inline=len(params) > 1), distilled_params=params) File "/usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py", line 907, in _execute_compiled self.__execute_raw(context) File "/usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py", line 916, in __execute_raw self._cursor_execute(context.cursor, context.statement, context.parameters[0], context=context) File "/usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py", line 960, in _cursor_execute self._handle_dbapi_exception(e, statement, parameters, cursor) File "/usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py", line 942, in _handle_dbapi_exception raise exceptions.DBAPIError.instance(statement, parameters, e, connection_invalidated=is_disconnect) ProgrammingError: (ProgrammingError) function min(boolean) does not exist at character 639 HINT: No function matches the given name and argument types. You might need to add explicit type casts. 'SELECT watchdog.id AS watchdog_id, watchdog.system_id AS watchdog_system_id, watchdog.recipe_id AS watchdog_recipe_id, watchdog.recipetask_id AS watchdog_recipetask_id, watchdog.subtask AS watchdog_subtask, watchdog.kill_time AS watchdog_kill_time \nFROM watchdog JOIN system ON system.id = watchdog.system_id JOIN recipe ON recipe.id = watchdog.recipe_id JOIN recipe_set ON recipe_set.id = recipe.recipe_set_id \nWHERE %(param_1)s = system.lab_controller_id AND recipe_set.id IN (SELECT recipe_set.id \nFROM watchdog JOIN recipe ON recipe.id = watchdog.recipe_id JOIN recipe_set ON recipe_set.id = recipe.recipe_set_id GROUP BY recipe_set.id \nHAVING min(watchdog.kill_time <= %(kill_time_1)s)) ORDER BY watchdog.id' {'kill_time_1': datetime.datetime(2011, 4, 18, 11, 56, 22, 817691), 'param_1': 1} Error handling XML-RPC method Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/bkr/server/xmlrpccontroller.py", line 34, in RPC2 raise AssertionError("method %s does not exist" % name) AssertionError: method __str__ does not exist updating visit (e7eca2be119aa71cc01ee6b7eb35c567138df7c9) to expire at 2011-04-18 20:56:22.842944 updating visit (25640e6fe68393bdbddf040f4e3c7736c5790d5b) to expire at 2011-04-18 20:56:40.527261 updating visit (e7eca2be119aa71cc01ee6b7eb35c567138df7c9) to expire at 2011-04-18 20:56:22.787863
-- Alexander.
На 18.04.2011 14:59, Alexander Todorov написа:
На 15.04.2011 21:46, Bill Peck написа:
Can you try the attached patch?
Hi Bill, I think this patch helped partially (or not at all).
I tried again, applied the patch and did cobbler import then run the osversion.trigger script. There were no errors on the cobbler side and no errors seen on the beaker-server side.
However the distros/all page doesn't show any distros. The distro_lab_controller_map DB table is empty as well.
-- Alexander.
----- Original Message -----
From: "Alexander Todorov" atodorov@redhat.com To: "List for the development of the Beaker project" beaker-devel@lists.fedorahosted.org Sent: Monday, April 18, 2011 11:08:59 PM Subject: Re: [Beaker-devel] Beaker and PostgreSQL На 18.04.2011 14:59, Alexander Todorov написа:
На 15.04.2011 21:46, Bill Peck написа:
Can you try the attached patch?
Hi Bill, I think this patch helped partially (or not at all).
I tried again, applied the patch and did cobbler import then run the osversion.trigger script. There were no errors on the cobbler side and no errors seen on the beaker-server side.
However the distros/all page doesn't show any distros. The distro_lab_controller_map DB table is empty as well.
Can you check that the names in cobbler are in the right format. They should look something like 'RHEL5-Server-U6_nfs-i386'.
-- Alexander. _______________________________________________ Beaker-devel mailing list Beaker-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/beaker-devel
На 19.04.2011 02:09, Raymond Mancy написа:
Can you check that the names in cobbler are in the right format. They should look something like 'RHEL5-Server-U6_nfs-i386'.
Hi Raymond, that doesn't seem to help either.
I switched to MySQL and started over with a clean install to eliminate any issues caused by the DB layer.
I followed your suggestion and did cobbler import/osversion.trigger where name is RHEL5-Server-U6_nfs-x86_64
Again the webUI showed no available distros and there were no errors in the log files.
How can I turn Beaker into debug mode and find out why the distros are not added to the database?
-- Alexander.
beaker-devel@lists.fedorahosted.org