[openstack-dev] Unable to logging to guest console on XCP/xenserver

2013-10-29 Thread Rajshree Thorat
Hi,

I am trying to use Openstack Havana to control XCP hypervisor with neutron
OVS plugin. I can launch instances normally but unable to logging to guest
console. Please see the below log from nova compute to get a clear idea.

Log:

2013-10-29 14:09:10.203 954 AUDIT nova.compute.manager
[req-157fb348-69fb-4b7f-b50c-44ef85e85f11 42ffb12172244726a1a15d044167de86
2c4acdf64eed40f7a9efcf3b7dd13259] [instance:
cf5678ec-5284-48cc-a8d6-005eac42118e] Get console output
2013-10-29 14:09:10.296 954 ERROR nova.virt.xenapi.vmops
[req-157fb348-69fb-4b7f-b50c-44ef85e85f11 42ffb12172244726a1a15d044167de86
2c4acdf64eed40f7a9efcf3b7dd13259] ['XENAPI_PLUGIN_FAILURE',
'get_console_log', 'IOError', [Errno 2] No such file or directory:
'/var/log/xen/guest/console.7']
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops Traceback (most
recent call last):
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops   File
/usr/lib/python2.7/dist-packages/nova/virt/xenapi/vmops.py, line 1446, in
get_console_output
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops
'get_console_log', {'dom_id': dom_id})
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops   File
/usr/lib/python2.7/dist-packages/nova/virt/xenapi/driver.py, line 796, in
call_plugin
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops host, plugin,
fn, args)
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops   File
/usr/lib/python2.7/dist-packages/nova/virt/xenapi/driver.py, line 851, in
_unwrap_plugin_exceptions
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops return
func(*args, **kwargs)
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops   File
/usr/local/lib/python2.7/dist-packages/XenAPI.py, line 229, in __call__
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops return
self.__send(self.__name, args)
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops   File
/usr/local/lib/python2.7/dist-packages/XenAPI.py, line 133, in
xenapi_request
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops result =
_parse_result(getattr(self, methodname)(*full_params))
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops   File
/usr/local/lib/python2.7/dist-packages/XenAPI.py, line 203, in
_parse_result
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops raise
Failure(result['ErrorDescription'])
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops Failure:
['XENAPI_PLUGIN_FAILURE', 'get_console_log', 'IOError', [Errno 2] No such
file or directory: '/var/log/xen/guest/console.7']
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops
2013-10-29 14:09:10.358 954 ERROR nova.openstack.common.rpc.amqp
[req-157fb348-69fb-4b7f-b50c-44ef85e85f11 42ffb12172244726a1a15d044167de86
2c4acdf64eed40f7a9efcf3b7dd13259] Exception during message handling
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp Traceback
(most recent call last):
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp   File
/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/amqp.py, line
461, in _process_data
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp **args)
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp   File
/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/dispatcher.py,
line 172, in dispatch
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp result
= getattr(proxyobj, method)(ctxt, **kwargs)
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp   File
/usr/lib/python2.7/dist-packages/nova/exception.py, line 90, in wrapped
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp
payload)
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp   File
/usr/lib/python2.7/dist-packages/nova/exception.py, line 73, in wrapped
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp return
f(self, context, *args, **kw)
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp   File
/usr/lib/python2.7/dist-packages/nova/compute/manager.py, line 271, in
decorated_function
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp e,
sys.exc_info())
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp   File
/usr/lib/python2.7/dist-packages/nova/compute/manager.py, line 258, in
decorated_function
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp return
function(self, context, *args, **kwargs)
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp   File
/usr/lib/python2.7/dist-packages/nova/compute/manager.py, line 3502, in
get_console_output
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp output
= self.driver.get_console_output(instance)
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp   File
/usr/lib/python2.7/dist-packages/nova/virt/xenapi/driver.py, line 374, in
get_console_output
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp return
self._vmops.get_console_output(instance)
2013-10-29 

Re: [openstack-dev] Unable to logging to guest console on XCP/xenserver

2013-10-29 Thread Bob Ball
The trace below seems to be wanting to access the console log, rather than the 
VNC console.

I believe there is a blog post about how to enable this, but basically you need 
a cronjob to run in dom0 to rotate the logs.  This is because the Xen console 
logging is not ring-based, and therefore without a cronjob it will fill the 
logging up.  Therefore it is not enabled by default.

To enable the console log, check out 
https://github.com/openstack/nova/blob/master/tools/xenserver/rotate_xen_guest_logs.sh
 and add crontab entries for that script as described at the top of the file.

The first invocation of the script will enable the console logs for your VMs 
and you then won't see the error log.

Thanks,

Bob


From: Rajshree Thorat [rajshree.tho...@gslab.com]
Sent: 29 October 2013 09:25
To: openstack Users; OpenStack Development Mailing List
Subject: [openstack-dev] Unable to logging to guest console on XCP/xenserver

Hi,

I am trying to use Openstack Havana to control XCP hypervisor with neutron OVS 
plugin. I can launch instances normally but unable to logging to guest console. 
Please see the below log from nova compute to get a clear idea.

Log:

2013-10-29 14:09:10.203 954 AUDIT nova.compute.manager 
[req-157fb348-69fb-4b7f-b50c-44ef85e85f11 42ffb12172244726a1a15d044167de86 
2c4acdf64eed40f7a9efcf3b7dd13259] [instance: 
cf5678ec-5284-48cc-a8d6-005eac42118e] Get console output
2013-10-29 14:09:10.296 954 ERROR nova.virt.xenapi.vmops 
[req-157fb348-69fb-4b7f-b50c-44ef85e85f11 42ffb12172244726a1a15d044167de86 
2c4acdf64eed40f7a9efcf3b7dd13259] ['XENAPI_PLUGIN_FAILURE', 'get_console_log', 
'IOError', [Errno 2] No such file or directory: 
'/var/log/xen/guest/console.7']
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops Traceback (most recent 
call last):
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops   File 
/usr/lib/python2.7/dist-packages/nova/virt/xenapi/vmops.py, line 1446, in 
get_console_output
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops 'get_console_log', 
{'dom_id': dom_id})
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops   File 
/usr/lib/python2.7/dist-packages/nova/virt/xenapi/driver.py, line 796, in 
call_plugin
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops host, plugin, fn, 
args)
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops   File 
/usr/lib/python2.7/dist-packages/nova/virt/xenapi/driver.py, line 851, in 
_unwrap_plugin_exceptions
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops return func(*args, 
**kwargs)
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops   File 
/usr/local/lib/python2.7/dist-packages/XenAPI.py, line 229, in __call__
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops return 
self.__send(self.__name, args)
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops   File 
/usr/local/lib/python2.7/dist-packages/XenAPI.py, line 133, in xenapi_request
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops result = 
_parse_result(getattr(self, methodname)(*full_params))
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops   File 
/usr/local/lib/python2.7/dist-packages/XenAPI.py, line 203, in _parse_result
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops raise 
Failure(result['ErrorDescription'])
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops Failure: 
['XENAPI_PLUGIN_FAILURE', 'get_console_log', 'IOError', [Errno 2] No such file 
or directory: '/var/log/xen/guest/console.7']
2013-10-29 14:09:10.296 954 TRACE nova.virt.xenapi.vmops
2013-10-29 14:09:10.358 954 ERROR nova.openstack.common.rpc.amqp 
[req-157fb348-69fb-4b7f-b50c-44ef85e85f11 42ffb12172244726a1a15d044167de86 
2c4acdf64eed40f7a9efcf3b7dd13259] Exception during message handling
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp Traceback 
(most recent call last):
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp   File 
/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/amqp.py, line 461, 
in _process_data
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp **args)
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp   File 
/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/dispatcher.py, 
line 172, in dispatch
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp result = 
getattr(proxyobj, method)(ctxt, **kwargs)
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp   File 
/usr/lib/python2.7/dist-packages/nova/exception.py, line 90, in wrapped
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp payload)
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp   File 
/usr/lib/python2.7/dist-packages/nova/exception.py, line 73, in wrapped
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp return 
f(self, context, *args, **kw)
2013-10-29 14:09:10.358 954 TRACE nova.openstack.common.rpc.amqp   File