[openstack-dev] [Nova] Broken nova-lxd

Michael Still mikal at stillhq.com
Thu Jul 27 22:57:40 UTC 2017


I'm cc'ing openstack-dev because your email is the same as the comment you
made on the relevant review, and I think getting visibility with the wider
Nova team is a good idea.

Unfortunately this is a risk of having an out of tree Nova driver, which
has never been the recommended path for implementing drivers for Nova.
Being out of tree isn't forbidden, but it does come with the cost of
staying up to date with Nova and handling changes as they occur.

In this case, if you look at the review chain you'll see that the move is a
pre-cursor to moving this code to use oslo.privsep. Unless lxd is going to
move to privsep in lockstep with nova, your best bet would be to duplicate
this utility method in the nova-lxd codebase.


On Thu, Jul 27, 2017 at 11:25 PM, Kharkov Alexander <
kharkovalexander at gmail.com> wrote:

> Hi, Michael
> I recently found that you commit to nova break nova-lxd driver
> functionality because it utilizes last_bytes function from nova/utils.py
> which you recently move to libvirt. Could you please confirm that it was
> not expected and suggest a fix? I'm currently working on nova-lxd now and
> want to have functioning unit tests to pull my changes for review.
> Your commit and review links below:
> https://git.openstack.org/cgit/openstack/nova/commit/?id=
> 2341a41eaee5152e95379e5ed38012270af82ef5
> https://review.openstack.org/#/c/472228/9
> ...
> Failed nova-lxd
> ...
> Failed 1 tests - output below:
> ==============================
> test_driver.LXDDriverTest.test_get_console_output
> -------------------------------------------------
> Captured traceback:
> ~~~~~~~~~~~~~~~~~~~
>     b'Traceback (most recent call last):'
>     b'  File "/home/ubuntu/nova-lxd/.tox/py35/lib/python3.5/site-packages/mock/mock.py",
> line 1305, in patched'
>     b'    return func(*args, **keywargs)'
>     b'  File "/home/ubuntu/nova-lxd/nova/tests/unit/virt/lxd/test_driver.py",
> line 604, in test_get_console_output'
>     b'    contents = lxd_driver.get_console_output(context, instance)'
>     b'  File "/home/ubuntu/nova-lxd/nova/virt/lxd/driver.py", line 594,
> in get_console_output'
>     b'    log_data, _ = utils.last_bytes(f, MAX_CONSOLE_BYTES)'
>     b"AttributeError: module 'nova.utils' has no attribute 'last_bytes'"
>     b''
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170728/4aff791d/attachment.html>

More information about the OpenStack-dev mailing list