[Openstack] Problems connecting Dashboard and Nova

Rafael Durán Castañeda rafadurancastaneda at gmail.com
Tue Aug 9 22:06:46 UTC 2011


I'm trying get dashboard working (using nova.sh) and I'm getting same 
problem as Mauricio, compute is not running and after trying manually 
run it I've got:

2011-08-09 21:49:02,702 DEBUG nova.virt.libvirt_conn [-] Connecting to 
libvirt: qemu:///system from (pid=7147) _get_connection 
/home/ubuntu/openstack/deployscripts/nova/nova/virt/libvirt/connection.py:180
libvir: error : Unknown failure
2011-08-09 21:49:02,732 ERROR nova.exception [-] Uncaught exception
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE:   File 
"/home/ubuntu/openstack/deployscripts/nova/nova/exception.py", line 98, 
in wrapped
(nova.exception): TRACE:     return f(*args, **kw)
(nova.exception): TRACE:   File 
"/home/ubuntu/openstack/deployscripts/nova/nova/compute/manager.py", 
line 1255, in update_available_resource
(nova.exception): TRACE:     return 
self.driver.update_available_resource(context, self.host)
(nova.exception): TRACE:   File 
"/home/ubuntu/openstack/deployscripts/nova/nova/virt/libvirt/connection.py", 
line 1461, in update_available_resource
(nova.exception): TRACE:     'hypervisor_type': self.get_hypervisor_type(),
(nova.exception): TRACE:   File 
"/home/ubuntu/openstack/deployscripts/nova/nova/virt/libvirt/connection.py", 
line 1328, in get_hypervisor_type
(nova.exception): TRACE:     return self._conn.getType()
(nova.exception): TRACE:   File 
"/home/ubuntu/openstack/deployscripts/nova/nova/virt/libvirt/connection.py", 
line 179, in _get_connection
(nova.exception): TRACE:     if not self._wrapped_conn or not 
self._test_connection():
(nova.exception): TRACE:   File 
"/home/ubuntu/openstack/deployscripts/nova/nova/virt/libvirt/connection.py", 
line 188, in _test_connection
(nova.exception): TRACE:     self._wrapped_conn.getInfo()
(nova.exception): TRACE:   File 
"/usr/lib/python2.6/dist-packages/libvirt.py", line 1850, in getInfo
(nova.exception): TRACE:     if ret is None: raise libvirtError 
('virNodeGetInfo() failed', conn=self)
(nova.exception): TRACE: libvirtError: Unknown failure
(nova.exception): TRACE:
2011-08-09 21:49:02,734 CRITICAL nova [-] Unknown failure
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE:   File 
"/home/ubuntu/openstack/deployscripts/nova/bin/nova-compute", line 48, 
in <module>
(nova): TRACE:     service.serve()
(nova): TRACE:   File 
"/home/ubuntu/openstack/deployscripts/nova/nova/service.py", line 365, 
in serve
(nova): TRACE:     x.start()
(nova): TRACE:   File 
"/home/ubuntu/openstack/deployscripts/nova/nova/service.py", line 150, 
in start
(nova): TRACE:     self.manager.update_available_resource(ctxt)
(nova): TRACE:   File 
"/home/ubuntu/openstack/deployscripts/nova/nova/exception.py", line 129, 
in wrapped
(nova): TRACE:     raise Error(str(e))
(nova): TRACE: Error: Unknown failure
(nova): TRACE:

However virsh -c qemu:///system works, so I think is a problem with 
libvirt and I think there was an issue about libvirt version under 
virtual machines (I'm running all under vm), am I right?


On 09/08/11 23:23, Arvind Somya wrote:
> Weird, creating a dummy database solved this error for me.
>
> In the script, it doesn't check to see if a database called nova 
> exists, lines 312-314:
>
> if [ "$USE_MYSQL" == 1 ]; then
>         mysql -p$MYSQL_PASS -e 'DROP DATABASE nova;'
>         mysql -p$MYSQL_PASS -e 'CREATE DATABASE nova;'
>
> I'm assuming you're running the script as root so db permissions to 
> drop should not be an issue. You might try dropping nova manually and 
> commenting out the drop database line from the script.
>
> Thanks
> Arvind
>
> On 08/09/2011 05:06 PM, Mauricio Arango wrote:
>> Tied it, no luck, error indicating db nova already exists:
>>
>> + mysql -pnova -e 'CREATE DATABASE nova;'
>> ERROR 1007 (HY000) at line 1: Can't create database 'nova'; database 
>> exists
>>
>> Thanks,
>>
>> Mauricio
>>
>>
>>
>>
>> On Tue, Aug 9, 2011 at 3:52 PM, Arvind Somya <asomya at cisco.com 
>> <mailto:asomya at cisco.com>> wrote:
>>
>>     Yeah
>>
>>     It's trying to clear an existing database named nova in mysql..
>>     try the following before install and run:
>>
>>     mysql -u root -p <root_password> -e"create database nova"
>>
>>     This should create an empty database called nova for it to whack.
>>
>>     Thanks
>>     Arvind
>>
>>
>>     On 08/09/2011 03:34 PM, Mauricio Arango wrote:
>>>     Arvind,
>>>
>>>     I ran the script with USE_MYSQL=1, also inverted the order of
>>>     lines 321 & 322 in the nova.sh script (was generating an error).
>>>     Didn't complete due to the following db-related error:
>>>
>>>     "Command failed, please check log for more info
>>>     2011-08-09 14:58:47,555 CRITICAL nova [-] (OperationalError)
>>>     (1049, "Unknown database 'nova'") None None ...."
>>>
>>>     Any ideas what could be the problem?
>>>
>>>     Thanks for your help,
>>>
>>>     Mauricio
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>     On Tue, Aug 9, 2011 at 1:49 PM, Arvind Somya <asomya at cisco.com
>>>     <mailto:asomya at cisco.com>> wrote:
>>>
>>>         Mauricio,
>>>
>>>         The cloudbuilders script starts the server on port 80
>>>         automatically. Afaik it also runs the sampledata script from
>>>         keystone to set up a couple of users. You might try
>>>         user:'joeuser' pass: 'secrete' or user:'joeadmin'
>>>         pass:'secrete' .. both accounts are autocreated from the
>>>         sample data script.
>>>
>>>         As to your sql problem.. I ran into the same when using
>>>         sqlite with the cloudbuilders image. Try this, install mysql
>>>         and:
>>>
>>>         export USE_MYSQL=1
>>>         export MYSQL_PASS=<your mysql root password>
>>>
>>>         then
>>>         // Clear our existing install data
>>>         nova.sh terminate
>>>         nova.sh clean
>>>         nova.sh scrub
>>>         nova.sh install
>>>         nova.sh run
>>>
>>>         The nova processes are run in a SCREEN command. The script
>>>         does not install euca2ools so you'll need to install those
>>>         separately.
>>>
>>>         Thanks
>>>         Arvind
>>>
>>>
>>>
>>>         On 08/09/2011 01:15 PM, Mauricio Arango wrote:
>>>>         Got the environment up and went to the Dashboard's entry
>>>>         page by pointing my browser to http://localhost:80/
>>>>         (http://localhost:8000/ doesn't work).
>>>>
>>>>         Logged successfully with 'admin' user name;
>>>>         entered the System Panel page;
>>>>         got error in the Overview page:
>>>>         "Unable to get service info: User does not have admin
>>>>         privileges"
>>>>
>>>>         got error in the Instances page:
>>>>         "Unable to get instance list: (InterfaceError) Error
>>>>         binding parameter 6 - probably unsupported type......"
>>>>
>>>>         got error in the System Panel Services page:
>>>>         "Unable to get service info: User does not have admin
>>>>         privileges"
>>>>         it does display glance, identity , nova-compat, nova as up.
>>>>
>>>>         got error in User Dashboard Image when launching the only
>>>>         listed image (id=3, ami-tty):
>>>>         "Unable to launch instance: (InterfaceError) Error binding
>>>>         parameter 0 - probably unsupported type. ....."
>>>>
>>>>
>>>>         I didn't see any of the nova processes running with
>>>>         'nova-*' names. What names do they have?
>>>>
>>>>         I wasn't able to run either the nova-manage nor the euca
>>>>         tools. How can I do this? It is very helpful to have both
>>>>         access to the command line tools in nova as well as the
>>>>         Dashboard.
>>>>
>>>>         Thanks,
>>>>
>>>>         Mauricio
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>         On Mon, Aug 8, 2011 at 8:55 PM, Mark Gius
>>>>         <mark at markgius.com <mailto:mark at markgius.com>> wrote:
>>>>
>>>>             $ sudo ./nova.sh branch
>>>>             $ sudo ./nova.sh install
>>>>             $ sudo ./nova.sh run
>>>>
>>>>             This starts up everything in a screen session.  When
>>>>             you detach the screen with Ctrl-A, D all of the
>>>>             openstack components will shut down.
>>>>
>>>>             The nova.sh script generally sets up a clean
>>>>             environment every time it is run.  This makes it mostly
>>>>             useful for demo and test environments.
>>>>
>>>>             Hopefully this helps.
>>>>
>>>>             Mark
>>>>
>>>>
>>>>             On Mon, Aug 8, 2011 at 5:40 PM, Mauricio Arango
>>>>             <arango.mauricio at gmail.com
>>>>             <mailto:arango.mauricio at gmail.com>> wrote:
>>>>
>>>>                 Thanks Mark,
>>>>
>>>>                 I'm trying your nova.sh script. I run it in a clean
>>>>                 Ubuntu instance as 'nova.sh install'. However it
>>>>                 didn't start the nova processes.
>>>>
>>>>                 Please let me know what is the correct way of
>>>>                 runnig the scrpt to get everything running.
>>>>
>>>>                 Mauricio
>>>>
>>>>
>>>>
>>>>
>>>>                 On Mon, Aug 8, 2011 at 5:28 PM, Mark Gius
>>>>                 <mark at markgius.com <mailto:mark at markgius.com>> wrote:
>>>>
>>>>                     Have you set up and configured a keystone
>>>>                     instance for authentication?  The dashboard
>>>>                     only supports Keystone based authentication
>>>>                     right now, and it looks like you're trying to
>>>>                     connect to nova using Nova's builtin auth.
>>>>                      That howto you are following is quite old.  
>>>>                     If you're looking to get openstack up and
>>>>                     running on a single box, you might want to try
>>>>                     this script
>>>>                     (https://github.com/4P/deployscripts/blob/master/nova.sh)
>>>>                     which sets up nova+keystone+glance+dashboard on
>>>>                     a single host.
>>>>
>>>>                      If you'd like to modify your existing setup,
>>>>                     take a look at
>>>>                     https://github.com/openstack/keystone, which
>>>>                     talks about how to set up keystone and
>>>>                     integrate it into your nova installation.
>>>>
>>>>                     Mark
>>>>
>>>>                     On Mon, Aug 8, 2011 at 10:15 AM, Mauricio
>>>>                     Arango <arango.mauricio at gmail.com
>>>>                     <mailto:arango.mauricio at gmail.com>> wrote:
>>>>
>>>>                         Hi,
>>>>
>>>>                         I installed Nova and Dashboard on a single
>>>>                         VirtualBox Ubuntu guest, following the
>>>>                         instructions in:
>>>>                         http://uksysadmin.wordpress.com/2011/02/17/running-openstack-under-virtualbox-a-complete-guide/
>>>>                         and
>>>>                         http://wiki.openstack.org/OpenStackDashboard
>>>>
>>>>                         I added the following lines in Dahsboard's
>>>>                          local_settings.py, based on information
>>>>                         extracted from the novarc file in Nova:
>>>>                         [
>>>>                         EC2_ACCESS_KEY="afa00c4d-7c1f-4a26-8986-1e291abb4e9d:myproject"
>>>>                         EC2_SECRET_KEY="e77a7fd0-bd94-4e67-9dc1-75a9ee2da45c"
>>>>                         EC2_URL="http://172.241.0.101:8773/services/Cloud"
>>>>
>>>>                         NOVA_API_KEY="afa00c4d-7c1f-4a26-8986-1e291abb4e9d"
>>>>                         NOVA_USERNAME="mauricio"
>>>>                         NOVA_URL="http://172.241.0.101:8774/v1.0/"
>>>>                         NOVA_CERT="/home/mauricio/ostack/cloud/creds/cacert.pem"
>>>>                         ]
>>>>
>>>>                         The nova install, runs well, tested it
>>>>                         using euca tools.
>>>>
>>>>                         The GUI part of Dashboard works but fails
>>>>                         connecting to Nova, generating the this
>>>>                         error on any connection attempt:
>>>>                         [
>>>>                         DEBUG:django_openstack.api:extras_api
>>>>                         connection created using token
>>>>                         "e1d4b8ca-9386-4f8e-b194-de6e504d6fa5" and
>>>>                         url "http://localhost:8774/v1.1"
>>>>                         ERROR:django_openstack.dash:ApiException in
>>>>                         instance usage
>>>>                         Traceback (most recent call last):
>>>>                           File
>>>>                         "/home/mauricio/ostack/openstack-dashboard/django-openstack/django_openstack/dash/views/instances.py",
>>>>                         line 167, in usage
>>>>                             usage = api.usage_get(request,
>>>>                         tenant_id, datetime_start, datetime_end)
>>>>                           File
>>>>                         "/home/mauricio/ostack/openstack-dashboard/django-openstack/django_openstack/api.py",
>>>>                         line 270, in inner
>>>>                             return f(*args, **kwargs)
>>>>                           File
>>>>                         "/home/mauricio/ostack/openstack-dashboard/django-openstack/django_openstack/api.py",
>>>>                         line 520, in usage_get
>>>>                             return
>>>>                         Usage(extras_api(request).usage.get(tenant_id,
>>>>                         start, end))
>>>>                           File
>>>>                         "/home/mauricio/ostack/openstack-dashboard/openstack-dashboard/.dashboard-venv/src/openstackx/openstackx/extras/usage.py",
>>>>                         line 15, in get
>>>>                             return
>>>>                         self._get("/extras/usage/%s?start=%s&end=%s" %
>>>>                         (tenant_id, start.isoformat(),
>>>>                         end.isoformat()), "usage")
>>>>                           File
>>>>                         "/home/mauricio/ostack/openstack-dashboard/openstack-dashboard/.dashboard-venv/src/openstackx/openstackx/api/base.py",
>>>>                         line 36, in _get
>>>>                             resp, body = self.api.connection.get(url)
>>>>                           File
>>>>                         "/home/mauricio/ostack/openstack-dashboard/openstack-dashboard/.dashboard-venv/src/openstackx/openstackx/api/connection.py",
>>>>                         line 78, in get
>>>>                             return self._cs_request(url, 'GET',
>>>>                         **kwargs)
>>>>                           File
>>>>                         "/home/mauricio/ostack/openstack-dashboard/openstack-dashboard/.dashboard-venv/src/openstackx/openstackx/api/connection.py",
>>>>                         line 66, in _cs_request
>>>>                             raise ex
>>>>                         Unauthorized: This server could not verify
>>>>                         that you are authorized to access the
>>>>                         document you requested. Either you supplied
>>>>                         the wrong credentials (e.g., bad password),
>>>>                         or your browser does not understand how to
>>>>                         supply the credentials required. (HTTP 401)
>>>>                         ]
>>>>
>>>>
>>>>                         I'm including the contents of the novarc file:
>>>>                         [
>>>>                         NOVA_KEY_DIR=$(pushd $(dirname
>>>>                         $BASH_SOURCE)>/dev/null; pwd; popd>/dev/null)
>>>>                         export
>>>>                         EC2_ACCESS_KEY="afa00c4d-7c1f-4a26-8986-1e291abb4e9d:myproject"
>>>>                         export
>>>>                         EC2_SECRET_KEY="e77a7fd0-bd94-4e67-9dc1-75a9ee2da45c"
>>>>                         export
>>>>                         EC2_URL="http://172.241.0.101:8773/services/Cloud"
>>>>                         export S3_URL="http://172.241.0.101:3333"
>>>>                         export EC2_USER_ID=42 # nova does not use
>>>>                         user id, but bundling requires it
>>>>                         export EC2_PRIVATE_KEY=${NOVA_KEY_DIR}/pk.pem
>>>>                         export EC2_CERT=${NOVA_KEY_DIR}/cert.pem
>>>>                         export NOVA_CERT=${NOVA_KEY_DIR}/cacert.pem
>>>>                         export EUCALYPTUS_CERT=${NOVA_CERT} #
>>>>                         euca-bundle-image seems to require this set
>>>>                         alias ec2-bundle-image="ec2-bundle-image
>>>>                         --cert ${EC2_CERT} --privatekey
>>>>                         ${EC2_PRIVATE_KEY} --user 42 --ec2cert
>>>>                         ${NOVA_CERT}"
>>>>                         alias ec2-upload-bundle="ec2-upload-bundle
>>>>                         -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_KEY}
>>>>                         --url ${S3_URL} --ec2cert ${NOVA_CERT}"
>>>>                         export
>>>>                         NOVA_API_KEY="afa00c4d-7c1f-4a26-8986-1e291abb4e9d"
>>>>                         export NOVA_USERNAME="mauricio"
>>>>                         export
>>>>                         NOVA_URL="http://172.241.0.101:8774/v1.0/"
>>>>                         ]
>>>>
>>>>
>>>>                         Thanks in advance for your help,
>>>>
>>>>                         Mauricio
>>>>
>>>>
>>>>                         _______________________________________________
>>>>                         Mailing list:
>>>>                         https://launchpad.net/~openstack
>>>>                         <https://launchpad.net/%7Eopenstack>
>>>>                         Post to     : openstack at lists.launchpad.net
>>>>                         <mailto:openstack at lists.launchpad.net>
>>>>                         Unsubscribe :
>>>>                         https://launchpad.net/~openstack
>>>>                         <https://launchpad.net/%7Eopenstack>
>>>>                         More help   :
>>>>                         https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>         _______________________________________________
>>>>         Mailing list:https://launchpad.net/~openstack  <https://launchpad.net/%7Eopenstack>
>>>>         Post to     :openstack at lists.launchpad.net  <mailto:openstack at lists.launchpad.net>
>>>>         Unsubscribe :https://launchpad.net/~openstack  <https://launchpad.net/%7Eopenstack>
>>>>         More help   :https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20110810/435426c2/attachment.html>


More information about the Openstack mailing list