Bug 1006682 - nova.compute.manager: Instance failed to spawn - NameError: global name '_' is not defined
nova.compute.manager: Instance failed to spawn - NameError: global name '_' i...
Status: CLOSED NOTABUG
Product: RDO
Classification: Community
Component: openstack-nova (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Nikola Dipanov
Ami Jeain
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-11 01:49 EDT by Gilles Dubreuil
Modified: 2016-04-22 01:02 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-11 07:05:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/var/log/nova/compute.log excerpt (4.34 KB, text/plain)
2013-09-11 01:49 EDT, Gilles Dubreuil
no flags Details

  None (edit)
Description Gilles Dubreuil 2013-09-11 01:49:48 EDT
Created attachment 796253 [details]
/var/log/nova/compute.log excerpt

Description of problem:
Cannot launch instances from either Horizon GUI or command line.

Version-Release number of selected component:
RDO/Havana3
python-nova-2013.2-0.19.b3.el6.noarch
/usr/lib/python2.6/site-packages/nova/virt/disk/vfs/guestfs.py

Steps to Reproduce:
nova boot --image F19-x86_64 --flavor 2 --key_name key --nic net-id=e08a2e48-c9a4-49fb-aa4c-8db80c997a59 f19-1

Actual results:
The instance will come back with Status:
ERROR

Expected results:
Instance Status:
ACTIVE

Additional info:
Ian Wienand actually troubleshoot that one for me:
https://github.com/openstack/nova/commit/cd9d8e45c6b8a747069d0cec2c1ff0360ebe6d73

Therefore work around is to add following line to /usr/lib/python2.6/site-packages/nova/virt/disk/vfs/guestfs.py 

from nova.openstack.common.gettextutils import _
Comment 1 Xavier Queralt 2013-09-11 03:56:51 EDT
This a weird error, the file in question (nova/virt/disk/vfs/guestfs.py) is already patched in havana-3 and there is no reason for this exception.

How did you install RDO? Did you upgrade from Grizzly or it was a fresh install?

See below the contents of the file in question in the RDO package for F19:

[fedora@rdo1 ~]$ rpm -qa python-nova
python-nova-2013.2-0.19.b3.fc20.noarch

[fedora@rdo1 ~]$ head -n25 /usr/lib/python2.7/site-packages/nova/virt/disk/vfs/guestfs.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4

# Copyright 2012 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from eventlet import tpool
import guestfs

from nova import exception
from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova.virt.disk.vfs import api as vfs
from nova.virt.libvirt import driver as libvirt_driver
Comment 2 Pádraig Brady 2013-09-11 05:52:19 EDT
Also happens with nova/objects/pci_device.py as per:
http://lists.openstack.org/pipermail/openstack-dev/2013-September/014881.html
Comment 3 Pádraig Brady 2013-09-11 06:07:04 EDT
Note the nova/objects/pci_device.py error, even though the same may be due to some other issue. So if the guestfs error is invalid, we can close this
Comment 4 Alan Pevec 2013-09-11 07:05:43 EDT
From Gilles: "That was due to guestfs.py file copied from previous version"
Comment 5 Gilles Dubreuil 2013-09-11 09:07:41 EDT
Sorry, my previous comment didn't make it through.

Yes the guestfs.py file was overriden with an older version.

My bad!

Thanks

Note You need to log in before you can comment on or make changes to this bug.