<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/4.8.5">
</HEAD>
<BODY LINK="#0000ff">
Hi Li,<BR>
<BR>
I am using a fresh devstack with Horizon deployed as part of devstack.<BR>
I am running Sahara separately from the command line from the git<BR>
sources (master branch).<BR>
<BR>
I use a little script to register the Sahara endpoint so that Horizon sees it.<BR>
The only change I had to make was to register the service type as data-processing instead<BR>
of data_processing (below). Other than that, I don't have any problems.<BR>
<BR>
If you are really stuck, you can always wipe out the database and rebuild to get beyond the issue.<BR>
With mysql I use<BR>
<BR>
$ mysqladmin drop sahara<BR>
$ mysqladmin create sahara<BR>
$ sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head<BR>
<BR>
If this error is reliably reproducible, would you create a bug in launchpad with detailed steps to reproduce?<BR>
It's not clear to me what the issue is.<BR>
<BR>
Thanks,<BR>
<BR>
Trevor<BR>
<BR>
-- <BR>
<BR>
#!/bin/bash<BR>
keystone service-create --name sahara --type data-processing<BR>
keystone endpoint-create --region RegionOne --service sahara --publicurl '<A HREF="http://localhost:8386/v1.1/$(tenant_id)s'">http://localhost:8386/v1.1/$(tenant_id)s'</A><BR>
<BR>
On Wed, 2015-03-18 at 03:05 +0000, Li, Chen wrote:
<BLOCKQUOTE TYPE=CITE>
Hi all,<BR>
<BR>
<BR>
<BR>
I’m working under Ubuntu14.04 with devstack.<BR>
<BR>
<BR>
<BR>
After the fresh devstack installation, I run a integration test to test the environment.<BR>
<BR>
After the test, cluster and tested edp jobs remains in my environment.<BR>
<BR>
<BR>
<BR>
Then I updated sahara to the lasted code.<BR>
<BR>
To make the newest code work, I also did :<BR>
<BR>
1. manually download python-novaclient and by running “python setup.py install” to install it<BR>
<BR>
2. run “sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head”<BR>
<BR>
<BR>
<BR>
Then I restarted sahara.<BR>
<BR>
<BR>
<BR>
I tried to delete things remained from last test from dashboard, but :<BR>
<BR>
1. The table for “job_executions” can’t be opened anymore.<BR>
<BR>
2. When I try to delete “job”, an error happened:<BR>
<BR>
<BR>
<BR>
2015-03-18 10:34:33.031 ERROR oslo_db.sqlalchemy.exc_filters [-] DBAPIError exception wrapped from (IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`sahara`.`job_executions`, CONSTRAINT `job_executions_ibfk_3` FOREIGN KEY (`job_id`) REFERENCES `jobs` (`id`))') 'DELETE FROM jobs WHERE jobs.id = %s' ('10c36a9b-a855-44b6-af60-0effee31efc9',)<BR>
<BR>
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):<BR>
<BR>
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 951, in _execute_context<BR>
<BR>
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters context)<BR>
<BR>
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 436, in do_execute<BR>
<BR>
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters)<BR>
<BR>
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute<BR>
<BR>
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters self.errorhandler(self, exc, value)<BR>
<BR>
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler<BR>
<BR>
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters raise errorclass, errorvalue<BR>
<BR>
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters IntegrityError: (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`sahara`.`job_executions`, CONSTRAINT `job_executions_ibfk_3` FOREIGN KEY (`job_id`) REFERENCES `jobs` (`id`))')<BR>
<BR>
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters<BR>
<BR>
2015-03-18 10:34:33.073 DEBUG sahara.openstack.common.periodic_task [-] Running periodic task SaharaPeriodicTasks.terminate_unneeded_transient_clusters from (pid=8084) run_periodic_tasks /opt/stack/sahara/sahara/openstack/common/periodic_task.py:219<BR>
<BR>
2015-03-18 10:34:33.073 DEBUG sahara.service.periodic [-] Terminating unneeded transient clusters from (pid=8084) terminate_unneeded_transient_clusters /opt/stack/sahara/sahara/service/periodic.py:131<BR>
<BR>
2015-03-18 10:34:33.108 ERROR sahara.utils.api [-] Validation Error occurred: error_code=400, error_message=Job deletion failed on foreign key constraint<BR>
<BR>
Error ID: e65b3fb1-b142-45a7-bc96-416efb14de84, error_name=DELETION_FAILED<BR>
<BR>
<BR>
<BR>
I assume this might be caused by an old horizon version, so I did :<BR>
<BR>
1. update horizon code.<BR>
<BR>
2. python manage.py compress<BR>
<BR>
3. sudo python setup.py install<BR>
<BR>
4. sudo service apache2 restart<BR>
<BR>
<BR>
<BR>
But these only make things worse.<BR>
<BR>
Now, when I click “Data Processing” on dashboard, there is no return action anymore.<BR>
<BR>
<BR>
<BR>
Anyone can help me here ?<BR>
<BR>
What I did wrong ?<BR>
<BR>
How can I fix this ?<BR>
<BR>
<BR>
<BR>
I tested sahara CLI, command like “sahara job-list” & ”sahara job-delete” can still work.<BR>
<BR>
So I guess sahara is working fine.<BR>
<BR>
<BR>
<BR>
Thanks.<BR>
<BR>
-chen<BR>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<PRE>
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: <A HREF="mailto:OpenStack-dev-request@lists.openstack.org">OpenStack-dev-request@lists.openstack.org</A>?subject:unsubscribe
<A HREF="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</A>
</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>