← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1177820] Re: ComputeManager._check_image_size should log error when ImageTooLarge

 

We really need to document some guidelines on various log levels.

My gut feeling says that info() is fine here.  This is an "expected"
type of failure.  It's something that the user can try to do that's not
allowed, but is handled gracefully.  I think the more important question
is whether or not it is easy to determine why the request was denied
from the API.

** Changed in: nova
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1177820

Title:
  ComputeManager._check_image_size should log error when ImageTooLarge

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  A customer reported this issue on stable/grizzly but it also exists in
  havana.  They tried to boot an instance into a flavor that was too
  small for the image and got this exception:

  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp Traceback (most recent call last):
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\openstack\common\rpc\amqp.py", line 430, in _process_data
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     rval = self.proxy.dispatch(ctxt, version, method, **args)
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\openstack\common\rpc\dispatcher.py", line 133, in dispatch
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     return getattr(proxyobj, method)(ctxt, **kwargs)
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\exception.py", line 120, in wrapped
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     temp_level, payload)
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\contextlib.py", line 24, in __exit__
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     self.gen.next()
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\exception.py", line 97, in wrapped
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     return f(self, context, *args, **kw)
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\compute\manager.py", line 215, in decorated_function
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     pass
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\contextlib.py", line 24, in __exit__
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     self.gen.next()
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\compute\manager.py", line 201, in decorated_function
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     return function(self, context, *args, **kwargs)
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\compute\manager.py", line 266, in decorated_function
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     function(self, context, *args, **kwargs)
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\compute\manager.py", line 243, in decorated_function
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     e, sys.exc_info())
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\contextlib.py", line 24, in __exit__
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     self.gen.next()
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\compute\manager.py", line 230, in decorated_function
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     return function(self, context, *args, **kwargs)
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\compute\manager.py", line 1230, in run_instance
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     do_run_instance()
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\openstack\common\lockutils.py", line 242, in inner
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     retval = f(*args, **kwargs)
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\compute\manager.py", line 1229, in do_run_instance
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     admin_password, is_first_time, node, instance)
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\compute\manager.py", line 877, in _run_instance
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     self._set_instance_error_state(context, instance['uuid'])
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\contextlib.py", line 24, in __exit__
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     self.gen.next()
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\compute\manager.py", line 798, in _run_instance
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     image_meta = self._check_image_size(context, instance)
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp   File "C:\Program Files (x86)\IBM\SmartCloud Entry\Hyper-V Agent\Python27\lib\site-packages\nova\compute\manager.py", line 1040, in _check_image_size
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp     raise exception.ImageTooLarge()
  2013-05-08 01:30:44.210 9188 TRACE nova.openstack.common.rpc.amqp ImageTooLarge: Image is larger than instance type allows

  The problem is in serviceability.  There is debug and info level
  messages in ComputeManager._check_image_size but if the customer does
  not have verbose or debug logging enabled (off by default in their
  nova.conf), then the size values don't show up in the logs and we have
  to get the customer to recreate.

  Changing this log level from info to error is a simple way to get the
  error details into the logs:

  https://github.com/openstack/nova/blob/stable/grizzly/nova/compute/manager.py#L1038

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1177820/+subscriptions