Re: [openstack-dev] [Sahara][Horizon] Can't open "Data Processing" panel after update sahara & horizon

2015-03-18 Thread Li, Chen
Thanks all for the help.

I get help from IRC, and now I have solved my issues:


1.   The reason after I update horizon and the "Data Processing" panel do 
not work is because I missed a step for horizon to work.

The correct step to update horizon is:

a.   git pull origin master  (update horizon code)

b.  python manage.py collectstatic

c.   python manage.py compress

d.  sudo service apache2 restart



2.   I can't open "job_executions" page is due to bug:  
https://bugs.launchpad.net/horizon/+bug/1376738

It can be solved by patch https://review.openstack.org/#/c/125927/



3.   I can't delete  "job" is because a job can only be deleted after all 
related "job_executions" deleted.


Thanks.
-chen


From: Li, Chen [mailto:chen...@intel.com]
Sent: Wednesday, March 18, 2015 11:05 AM
To: OpenStack Development Mailing List (not for usage questions) 
(openstack-dev@lists.openstack.org)
Subject: [openstack-dev] [Sahara][Horizon] Can't open "Data Processing" panel 
after update sahara & horizon

Hi all,

I'm working under Ubuntu14.04 with devstack.

After the fresh devstack installation, I run a integration test to test the 
environment.
After the test, cluster and tested edp jobs remains in my environment.

Then I updated sahara to the lasted code.
To make the newest code work, I also did :

1.   manually download python-novaclient and by running "python setup.py 
install" to install it

2.   run "sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade 
head"

Then I restarted sahara.

I tried to delete things remained from last test from dashboard, but  :

1.   The table for "job_executions" can't be opened anymore.

2.   When I try to delete "job", an error happened:

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',)
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters Traceback (most 
recent call last):
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
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters context)
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
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters 
cursor.execute(statement, parameters)
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
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters 
self.errorhandler(self, exc, value)
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
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters raise 
errorclass, errorvalue
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`))')
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters
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
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
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
Error ID: e65b3fb1-b142-45a7-bc96-416efb14de84, error_name=DELETION_FAILED

I assume this might be caused by an old horizon version, so I did :

1.   update horizon code.

2.   python manage.py compress

3.   sudo python setup.py install

4.   sudo service apache2 restart

But these only make things worse.
Now, when I click "Data Processing" on dashboard, there is no return action 
anymore.

Anyone can help me here ?
What I did wrong ?
How can I fix this ?

I tested sahara CLI, command like "sahara job-list" & "sahara job-delete" c

Re: [openstack-dev] [Sahara][Horizon] Can't open "Data Processing" panel after update sahara & horizon

2015-03-18 Thread David Lyle
If you are not seeing the horizon panels for Sahara, I believe you are
seeing https://bugs.launchpad.net/horizon/+bug/1429987

The fix for that was merged on March 9
https://review.openstack.org/#/c/162736/

There are several bugs and fixes around the switch of the endpoint type
from data_processing to data-processing. Seems like you may have got caught
in the middle of the change. All should work now.

David
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Sahara][Horizon] Can't open "Data Processing" panel after update sahara & horizon

2015-03-18 Thread Trevor McKay
Hi Li,

  I am using a fresh devstack with Horizon deployed as part of devstack.
I am running Sahara separately from the command line from the git
sources (master branch).

  I use a little script to register the Sahara endpoint so that Horizon
sees it.
The only change I had to make was to register the service type  as
data-processing instead
of data_processing (below). Other than that, I don't have any problems.

  If you are really stuck, you can always wipe out the database and
rebuild to get beyond the issue.
With mysql I use

$ mysqladmin drop sahara
$ mysqladmin create sahara
$ sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head

If this error is reliably reproducible, would you create a bug in
launchpad with detailed steps to reproduce?
It's not clear to me what the issue is.

Thanks,

Trevor

-- 

#!/bin/bash
keystone service-create --name sahara --type data-processing
keystone endpoint-create --region RegionOne --service sahara --publicurl
'http://localhost:8386/v1.1/$(tenant_id)s'

On Wed, 2015-03-18 at 03:05 +, Li, Chen wrote:
> Hi all,
> 
>  
> 
> I’m working under Ubuntu14.04 with devstack.
> 
>  
> 
> After the fresh devstack installation, I run a integration test to
> test the environment.
> 
> After the test, cluster and tested edp jobs remains in my environment.
> 
>  
> 
> Then I updated sahara to the lasted code.
> 
> To make the newest code work, I also did :
> 
> 1.  manually download python-novaclient and by running “python
> setup.py install” to install it
> 
> 2.  run “sahara-db-manage --config-file /etc/sahara/sahara.conf
> upgrade head”
> 
>  
> 
> Then I restarted sahara.
> 
>  
> 
> I tried to delete things remained from last test from dashboard, but
>  :
> 
> 1.  The table for “job_executions” can’t be opened anymore.
> 
> 2.  When I try to delete “job”, an error happened:
> 
>  
> 
> 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',)
> 
> 2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters Traceback
> (most recent call last):
> 
> 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
> 
> 2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters
> context)
> 
> 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
> 
> 2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters
> cursor.execute(statement, parameters)
> 
> 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
> 
> 2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters
> self.errorhandler(self, exc, value)
> 
> 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
> 
> 2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters raise
> errorclass, errorvalue
> 
> 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`))')
> 
> 2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters
> 
> 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
> 
> 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
> 
> 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
> 
> Error ID: e65b3fb1-b142-45a7-bc96-416efb14de84,
> error_name=DELETION_FAILED
> 
>  
> 
> I assume this might be caused by an old horizon version, so I did :
> 
> 1.  update horizon code.
> 
> 2.  python manage.py compress
> 
> 3.  sudo python setup.py install
> 
> 4.  sudo service apache2 restart
> 
>  
> 
> But these only make things worse.
> 
> Now, when I click “Data Processing” on dashboard, there is no return
> action anymore.
> 
>  
> 
> Anyone can help me here ?
> 
> What I did wrong ?
> 
> How can I fix this ?
> 
>  
> 
> I tested sahara 

[openstack-dev] [Sahara][Horizon] Can't open "Data Processing" panel after update sahara & horizon

2015-03-17 Thread Li, Chen
Hi all,

I'm working under Ubuntu14.04 with devstack.

After the fresh devstack installation, I run a integration test to test the 
environment.
After the test, cluster and tested edp jobs remains in my environment.

Then I updated sahara to the lasted code.
To make the newest code work, I also did :

1.   manually download python-novaclient and by running "python setup.py 
install" to install it

2.   run "sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade 
head"

Then I restarted sahara.

I tried to delete things remained from last test from dashboard, but  :

1.   The table for "job_executions" can't be opened anymore.

2.   When I try to delete "job", an error happened:

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',)
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters Traceback (most 
recent call last):
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
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters context)
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
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters 
cursor.execute(statement, parameters)
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
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters 
self.errorhandler(self, exc, value)
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
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters raise 
errorclass, errorvalue
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`))')
2015-03-18 10:34:33.031 TRACE oslo_db.sqlalchemy.exc_filters
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
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
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
Error ID: e65b3fb1-b142-45a7-bc96-416efb14de84, error_name=DELETION_FAILED

I assume this might be caused by an old horizon version, so I did :

1.   update horizon code.

2.   python manage.py compress

3.   sudo python setup.py install

4.   sudo service apache2 restart

But these only make things worse.
Now, when I click "Data Processing" on dashboard, there is no return action 
anymore.

Anyone can help me here ?
What I did wrong ?
How can I fix this ?

I tested sahara CLI, command like "sahara job-list" & "sahara job-delete" can 
still work.
So I guess sahara is working fine.

Thanks.
-chen
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev