Nova-api requires nova-compute templates in order to run.

Bug #677537 reported by Chuck Short
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Unassigned

Bug Description

Recently, in order for the nova-api daemon it needs the --libvirt_xml_template, --libvirt_uml_xml_template, --libvirt_rescue_xml_template, and --libvirt_rescue_uml_xml_template. It is behavior that I did not expect and looks odd to me.

chuck

Revision history for this message
Soren Hansen (soren) wrote :

Agreed. Why does the API server need to instantiate the compute manager?

Changed in nova:
importance: Undecided → Medium
Revision history for this message
Vish Ishaya (vishvananda) wrote : Re: [Bug 677537] Re: Nova-api requires nova-compute templates in order to run.

This was part of moving the code to create the instance db record into ComputeManager. Ideally, the important info will be passed in a message instead of the api calling the method. Regardless, if we are going to continue to use Manager's in two modes (locally via python import, remotely via rpc and the Service class), we need to be careful about where we are loading additional objects like templates.

The init_host() method is for initialization that should only happen if the manager is run as a standalone service. Perhaps we should move the hyperisor connection in ComputeManager to init_host() instead of __init__? I think compute manager only needs to connect to the hypervisor when it is standalone. This problem may also go away with the distributed data model.

Vish
On Nov 22, 2010, at 1:41 AM, Soren Hansen wrote:

> Agreed. Why does the API server need to instantiate the compute manager?
>
> ** Changed in: nova
> Importance: Undecided => Medium
>
> --
> Nova-api requires nova-compute templates in order to run.
> https://bugs.launchpad.net/bugs/677537
> You received this bug notification because you are a member of Nova
> Bugs, which is subscribed to OpenStack Compute (nova).
>
> Status in OpenStack Compute (Nova): New
>
> Bug description:
> Recently, in order for the nova-api daemon it needs the --libvirt_xml_template, --libvirt_uml_xml_template, --libvirt_rescue_xml_template, and --libvirt_rescue_uml_xml_template. It is behavior that I did not expect and looks odd to me.
>
> chuck
>
>

Revision history for this message
Soren Hansen (soren) wrote :

2010/11/22 Vish Ishaya <email address hidden>:
> The init_host() method is for initialization that should only happen if
> the manager is run as a standalone service.  Perhaps we should move the
> hyperisor connection in ComputeManager to init_host() instead of
> __init__?  I think compute manager only needs to connect to the
> hypervisor when it is standalone.  This problem may also go away with
> the distributed data model.

The compute manager very much should only connect to the hypervisor when run
standalone. Sounds like a plan. Takers?

--
Soren Hansen
Ubuntu Developer    http://www.ubuntu.com/
OpenStack Developer http://www.openstack.org/

Soren Hansen (soren)
Changed in nova:
status: New → Triaged
Revision history for this message
Ryan Lucio (rlucio) wrote :

It appears that lp:~eday/nova/compute-abstraction will address the dependency through its separation of the api bits of compute manager. Technically speaking, however, compute's virt driver connection could still be moved from __init__ to init_host() in the manager. Is it still worth doing or are we good to go with eday's solution?

Revision history for this message
Vish Ishaya (vishvananda) wrote :

If compute_manager is only going to be run on the compute host, the change isn't strictly necessary. In fact, i think in the split model, the reverse is better. That is, we can get rid of init_host completely and move the code into init

On Dec 1, 2010, at 11:50 AM, Ryan Lucio wrote:

> It appears that lp:~eday/nova/compute-abstraction will address the
> dependency through its separation of the api bits of compute manager.
> Technically speaking, however, compute's virt driver connection could
> still be moved from __init__ to init_host() in the manager. Is it
> still worth doing or are we good to go with eday's solution?
>
> --
> Nova-api requires nova-compute templates in order to run.
> https://bugs.launchpad.net/bugs/677537
> You received this bug notification because you are a member of Nova
> Bugs, which is subscribed to OpenStack Compute (nova).
>
> Status in OpenStack Compute (Nova): Triaged
>
> Bug description:
> Recently, in order for the nova-api daemon it needs the --libvirt_xml_template, --libvirt_uml_xml_template, --libvirt_rescue_xml_template, and --libvirt_rescue_uml_xml_template. It is behavior that I did not expect and looks odd to me.
>
> chuck
>
>

Revision history for this message
dirakx (dirakx) wrote :

Also this is crucial for Nova's initial installation, as today i've tested the code, and while running somthing like

sudo nova-manage project zipfile PROJECT admin.user

I'm getting this error http://paste.openstack.org/show/217/

Revision history for this message
dirakx (dirakx) wrote :

a las how can I workaround this errors ? .

Revision history for this message
Vish Ishaya (vishvananda) wrote :

This should be fixed as of a revision that just merged. Try current trunk?

On Dec 2, 2010, at 12:07 PM, dirakx wrote:

> a las how can I workaround this errors ? .
>
> --
> You received this bug notification because you are a member of Nova
> Bugs, which is subscribed to OpenStack Compute (nova).
> https://bugs.launchpad.net/bugs/677537
>
> Title:
> Nova-api requires nova-compute templates in order to run.
>
> Status in OpenStack Compute (Nova):
> Triaged
>
> Bug description:
> Recently, in order for the nova-api daemon it needs the --libvirt_xml_template, --libvirt_uml_xml_template, --libvirt_rescue_xml_template, and --libvirt_rescue_uml_xml_template. It is behavior that I did not expect and looks odd to me.
>
> chuck
>
>

Revision history for this message
dirakx (dirakx) wrote :

tried just hours ago with

bzr clone lp:nova

Should i try again ?

Revision history for this message
Vish Ishaya (vishvananda) wrote :

if you are running from a bzr branch, you should not be getting those errors. They only happen when running from a packaged version.

Vish

On Dec 2, 2010, at 12:56 PM, dirakx wrote:

> tried just hours ago with
>
> bzr clone lp:nova
>
>
> Should i try again ?
>
> --
> You received this bug notification because you are a member of Nova
> Bugs, which is subscribed to OpenStack Compute (nova).
> https://bugs.launchpad.net/bugs/677537
>
> Title:
> Nova-api requires nova-compute templates in order to run.
>
> Status in OpenStack Compute (Nova):
> Triaged
>
> Bug description:
> Recently, in order for the nova-api daemon it needs the --libvirt_xml_template, --libvirt_uml_xml_template, --libvirt_rescue_xml_template, and --libvirt_rescue_uml_xml_template. It is behavior that I did not expect and looks odd to me.
>
> chuck
>
>

Revision history for this message
dirakx (dirakx) wrote :

I guess i found the root for this error.

This is what i'm doing.

check out the code
running nova scrpts

..
euca-add-keypair test > test.pem
euca-run-instances -k test -t m1.tiny ami-tiny (No response)

...

I guess without running initial instances is not useful to create a project.

why is the euca-run-instances not working ?

Revision history for this message
dirakx (dirakx) wrote :

I'm trying with

...

euca-run-instances --debug -k test -t m1.tiny ami-tiny

...

Without response.

Revision history for this message
dirakx (dirakx) wrote :

Jfyi This is my novarc configuration

NOVA_KEY_DIR=$(pushd $(dirname $BASH_SOURCE)>/dev/null; pwd; popd>/dev/null)
export EC2_ACCESS_KEY="admin:admin"
export EC2_SECRET_KEY="admin"
export EC2_URL="http://127.0.0.1:8773/services/Cloud"
export S3_URL="http://127.0.0.1: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}"

Revision history for this message
dirakx (dirakx) wrote :

other relevant info is the bzr code revision 437

Revision history for this message
Soren Hansen (soren) wrote :

dirakx, your problem is completely separate from "Nova-api requires
nova-compute templates in order to run".

Please file a new bug about your problem instead of hijacking an existing one.

--
Soren Hansen
Ubuntu Developer    http://www.ubuntu.com/
OpenStack Developer http://www.openstack.org/

Revision history for this message
dirakx (dirakx) wrote :

sorry, at the time i begun to comment, this seem related to lack of templates, now it is not so.
using other bug if other problems arise.

Revision history for this message
Thierry Carrez (ttx) wrote :

Looks fixed now to me, through various refactorings of nova-api...
Chuck, could you check and reopen if you disagree ?

Changed in nova:
status: Triaged → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.1
status: Fix Committed → Fix Released
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.