VMware: error while get serial console log

Bug #1752824 reported by yan97ao
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
yan97ao
Queens
Fix Committed
High
Matt Riedemann

Bug Description

Description
===========
We are survey using vmware as nova compute backend and got trouble about get vm's serial console log.

Steps to reproduce
==================
nova console-log <VM-UUID>

Expected result
===============
Get the serial console log of VM-UUID

Actual result
=============
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<type 'exceptions.TypeError'> (HTTP 500) (Request-ID: req-cfd43272-2a1a-4296-b56d-86c394c29e64)

Logs
===========
2018-03-02 16:55:12.395 15462 INFO nova.compute.manager [req-cfd43272-2a1a-4296-b56d-86c394c29e64 75ee831637464e53a5a5e63dd88671e9 750d99c807e94c039c694f10ca1bb244 - default default] [instance: ff784d6d-178c-4237-9621-92cc52421dc1] Get console output
2018-03-02 16:55:12.396 15462 WARNING nova.virt.vmwareapi.driver [req-cfd43272-2a1a-4296-b56d-86c394c29e64 75ee831637464e53a5a5e63dd88671e9 750d99c807e94c039c694f10ca1bb244 - default default] yangtao /opt/vmware/vspc/ff784d6d178c4237962192cc52421dc1
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server [req-cfd43272-2a1a-4296-b56d-86c394c29e64 75ee831637464e53a5a5e63dd88671e9 750d99c807e94c039c694f10ca1bb244 - default default] Exception during message handling: TypeError: coercing to Unicode: need string or buffer, file found
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 160, in _process_incoming
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 213, in dispatch
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 183, in _do_dispatch
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 232, in inner
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server return func(*args, **kwargs)
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/nova/exception_wrapper.py", line 76, in wrapped
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server function_name, call_dict, binary)
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server self.force_reraise()
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server six.reraise(self.type_, self.value, self.tb)
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/nova/exception_wrapper.py", line 67, in wrapped
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server return f(self, context, *args, **kw)
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 217, in decorated_function
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server kwargs['instance'], e, sys.exc_info())
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server self.force_reraise()
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server six.reraise(self.type_, self.value, self.tb)
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 205, in decorated_function
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server return function(self, context, *args, **kwargs)
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 4653, in get_console_output
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server output = self.driver.get_console_output(context, instance)
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/nova/virt/vmwareapi/driver.py", line 278, in get_console_output
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server fp, MAX_CONSOLE_BYTES)
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/nova/privsep/path.py", line 96, in last_bytes
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server with open(path, 'rb') as f:
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server TypeError: coercing to Unicode: need string or buffer, file found
2018-03-02 16:55:12.484 15462 ERROR oslo_messaging.rpc.server

Tags: console vmware
yan97ao (yan97ao)
Changed in nova:
assignee: nobody → yan97ao (yan97ao)
tags: added: vmware
tags: added: console
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/549182

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/549182
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=87a6bb4184efb0e7da2d8a7ad7f189a3bc4cf03e
Submitter: Zuul
Branch: master

commit 87a6bb4184efb0e7da2d8a7ad7f189a3bc4cf03e
Author: Tao Yang <email address hidden>
Date: Fri Mar 2 17:46:14 2018 +0800

    VMware: fix TypeError while get console log

    nova.privsep.path.last_bytes needs path instead of FILE.

    Change-Id: Ifad71b4583b23ff018d757760a7b79f7f838c755
    Closes-Bug: #1752824

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b1

This issue was fixed in the openstack/nova 18.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/591365

Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/queens)

Reviewed: https://review.openstack.org/591365
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=997b38503b1ced8acab031bbaa24f3d82f1c6336
Submitter: Zuul
Branch: stable/queens

commit 997b38503b1ced8acab031bbaa24f3d82f1c6336
Author: Tao Yang <email address hidden>
Date: Fri Mar 2 17:46:14 2018 +0800

    VMware: fix TypeError while get console log

    nova.privsep.path.last_bytes needs path instead of FILE.

    Change-Id: Ifad71b4583b23ff018d757760a7b79f7f838c755
    Closes-Bug: #1752824
    (cherry picked from commit 87a6bb4184efb0e7da2d8a7ad7f189a3bc4cf03e)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.6

This issue was fixed in the openstack/nova 17.0.6 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.