Downloading Juju settings causes 500 Internal Server Error

Bug #988748 reported by Kevin Jackson
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
openstack-dashboard (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I'm running the following packages

ii openstack-dashboard 2012.1-0ubuntu8 django web interface to Openstack
ii openstack-dashboard-ubuntu-theme 2012.1-0ubuntu8 Ubuntu theme for the Openstack dashboard

And doing the following I get a 500:

1. Log into dashboard using any user
2. Click on Settings
3. Click on Juju Environment Config
4. Choose a project
5. Download Juju Environment Config

I get the following responses s at the same time so looks like lots of missing files causing this...

/settings/ 200
/settings/juju/ 200
/settings/juju/ 500
/settings/juju/dashboard/css/ubuntu.css 404
/settings/juju/bootstrap/js/bootstrap.min.js 404
/settings/juju/horizon/js/hogan-1.0.5.min.js 404
/settings/juju/horizon/js/horizon.js 404
/settings/juju/horizon/js/tabs.js 404
/settings/juju/horizon/js/plugins.js 404
/settings/juju/bootstrap/css/bootstrap.min.css 404
/settings/juju/horizon/js/jquery/jquery.min.js 404
/settings/juju/horizon/js/jquery/jquery.cookie.js 404
/settings/juju/horizon/js/jquery/jquery.table-sorter.js 404
/settings/juju/horizon/js/jquery/jquery.quicksearch.js 404
/settings/juju/horizon/js/json2.js 404
/settings/juju/horizon/js/modals.js 404
/settings/juju/horizon/js/jquery/jquery.example.min.js 404
/settings/juju/horizon/js/jquery/jquery.cookie.js 404
/settings/juju/horizon/js/jquery/jquery.quicksearch.js 404
/settings/juju/horizon/js/forms.js 404
/settings/juju/horizon/js/tables.js 404
/settings/juju/horizon/js/form_examples.js 404
/settings/juju/horizon/js/jquery/jquery.example.min.js 404
/settings/juju/horizon/js/jquery/jquery.table-sorter.js 404
/settings/juju/bootstrap/js/bootstrap.min.js 404
/settings/juju/horizon/js/hogan-1.0.5.min.js 404
/settings/juju/horizon/js/horizon.js 404
/settings/juju/horizon/js/tabs.js 404
/settings/juju/horizon/js/plugins.js 404
/settings/juju/horizon/js/tables.js 404
/settings/juju/horizon/js/modals.js 404
/settings/juju/horizon/js/forms.js 404
/settings/juju/horizon/js/form_examples.js 404

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openstack-dashboard (Ubuntu):
status: New → Confirmed
Revision history for this message
Pierre Amadio (pierre-amadio) wrote :
Download full text (3.5 KiB)

i have the same problem on a test install.
When changing /etc/openstack-dashboard/local_settings.py so i have debug, this is the kind of error i have:

[Fri Jul 20 10:04:28 2012] [error] File "/usr/lib/python2.7/dist-packages/horizon/forms/base.py", line 99, in maybe_handle
[Fri Jul 20 10:04:28 2012] [error] return form, form.handle(request, form.cleaned_data)
[Fri Jul 20 10:04:28 2012] [error] File "/usr/lib/python2.7/dist-packages/horizon/dashboards/settings/juju/forms.py", line 88, in handle
[Fri Jul 20 10:04:28 2012] [error] redirect=request.build_absolute_uri())
[Fri Jul 20 10:04:28 2012] [error] File "/usr/lib/python2.7/dist-packages/horizon/dashboards/settings/juju/forms.py", line 81, in handle
[Fri Jul 20 10:04:28 2012] [error] 's3_url': api.url_for(request, 's3'),
[Fri Jul 20 10:04:28 2012] [error] File "/usr/lib/python2.7/dist-packages/horizon/api/base.py", line 112, in url_for
[Fri Jul 20 10:04:28 2012] [error] raise exceptions.ServiceCatalogException(service_type)
[Fri Jul 20 10:04:28 2012] [error] ServiceCatalogException: Invalid service catalog service: s3

I do not have swift installed, but my "manager node" runs nova-storage with some s3 thingy.
Excerpt from my nova.conf:
--s3_host=192.168.122.4
--s3_port=3333

Looks like horizon is not able to get the value of s3_url ( api.url_for(request, 's3')).

As a workaround, if i change
/usr/lib/python2.7/dist-packages/horizon/dashboards/settings/juju/forms.py so i hard code the s3 url in the code, it "works":

ubuntu@messaging:~$ diff -u /usr/lib/python2.7/dist-packages/horizon/dashboards/settings/juju/forms.py-vanilla /usr/lib/python2.7/dist-packages/horizon/dashboards/settings/juju/forms.py
--- /usr/lib/python2.7/dist-packages/horizon/dashboards/settings/juju/forms.py-vanilla 2012-07-20 10:57:02.000000000 +0100
+++ /usr/lib/python2.7/dist-packages/horizon/dashboards/settings/juju/forms.py 2012-07-20 10:58:02.000000000 +0100
@@ -78,7 +78,7 @@
             context = {'ec2_access_key': keys.access,
                        'ec2_secret_key': keys.secret,
                        'ec2_url': api.url_for(request, 'ec2'),
- 's3_url': api.url_for(request, 's3'),
+ 's3_url': 'http://192.168.122.4:3333',
                        'juju_admin_secret': uuid.uuid4().hex,
                        'control_bucket': control_bucket
                       }

I do not know exactly how horizon is getting service catalog entry, but it looks like there s one missing on mine.

This is what keystone service-list tells:

ubuntu@messaging:~$ keystone service-list
+----------------------------------+----------+--------------+----------------------------+
| id | name | type | description |
+----------------------------------+----------+--------------+----------------------------+
| 1585378098384e00a6db821ca638ecc6 | glance | image | OpenStack Image Service |
| 2b66256adc5e4282afd631b58c15ad57 | keystone | identity | OpenStack Identity Service |
| 7f22b61afcce43be80252083fbc21341 | nova | compute | OpenStack Compute Service |
| 99eab6fe63774934ad4dee5709c57187 | e...

Read more...

Revision history for this message
Pierre Amadio (pierre-amadio) wrote :

same behaviour if i remove the swift service and its associated endpoint.

Revision history for this message
Pierre Amadio (pierre-amadio) wrote :

Things works ok after creating a s3 type service.
i create a s3 service and associate endpoints with it the following way:

keystone service-create --name=s3 \
                               --type=s3 \
                               --description="S3"

 keystone endpoint-create --region RegionOne --service_id 85d3c0f8eb944cdfa9da5b66f6e192ca \
    --publicurl http://192.168.122.4:3333 --adminurl http://192.168.122.4:3333 --internalurl http://192.168.122.4:3333

i restarted apache, memcache and keystone, and i had my juju.yaml file ready !

Revision history for this message
Pranav Salunke (dguitarbite) wrote :

thanks a lot, creating the S3 service and juju config download works for me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.