VM creation fails on DPDK network in a containerized deployment

Bug #1712732 reported by Saravanan KR
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Saravanan KR

Bug Description

vhost sockets directory
----------------------
vhost user sockets are created on /var/lib/vhost_sockets which has appropriate permissions for qemu user and SELinux policies, this folder should be mouted for libvirt container to create sockets.

uid/gid mismatch for qemu user between libvirt and qemu user
------------------------------------------------------------
Currently, OpenvSwitch is running as baremetal service where as libvirt is containerized. When a VM is created with DPDK network, a vhost-user socket file will be created by qemu in server mode and ovs will connect to it as client mode. The socket file will be created on the host at "/var/lib/vhost_sockets" by the libvrit container, which is running with qemu user ids as 42427:42427 [1]. Where as OpenvSwitch, running on baremetal, patched [2] to run with "Group=qemu", will run with group id as 107. Need to fix this permission mimatch for creating DPDK enabled VMs.

More Details on - http://lists.openstack.org/pipermail/openstack-dev/2017-August/121367.html

Saravanan KR (skramaja)
Changed in tripleo:
milestone: none → pike-rc1
importance: Undecided → High
status: New → Triaged
assignee: nobody → Saravanan KR (skramaja)
summary: - uid/gid mismatch for qemu user between libvirt and qemu user
+ DPDK: uid/gid mismatch for qemu user between libvirt and qemu user
tags: added: containers
Changed in tripleo:
milestone: pike-rc1 → pike-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)

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

Changed in tripleo:
status: Triaged → In Progress
Saravanan KR (skramaja)
summary: - DPDK: uid/gid mismatch for qemu user between libvirt and qemu user
+ VM creation fails on DPDK network in a containerized deployment
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

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

Changed in tripleo:
milestone: pike-rc2 → queens-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/499053
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=fcdca87024d99e3eac61bdb227f179b286ca6e04
Submitter: Jenkins
Branch: master

commit fcdca87024d99e3eac61bdb227f179b286ca6e04
Author: Saravanan KR <email address hidden>
Date: Wed Aug 30 12:39:55 2017 +0530

    Added a kolla config file for building contaner images with qemu uid

    Guest VMs created for DPDK will have the vhost-user socket files
    created by qemu and used by openvswitch. The uid of qemu in host
    is 107 where as the uid set by kolla config is 42427. Because of
    this mismatch, VM creation is failing because of permission.

    Setting the same uid and gid for qemu user for building kolla
    images to ensure that the files are created and used with same
    permission. This patch adds a config file for TripleO to be
    used for building kolla images, which will have the qemu
    user id values override to match the host values.

    Change-Id: I9a2d6b48eb44e294a8501ac0768ea0b97abb4b5c
    Partial-Bug: #1712732

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/501696

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/499086
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=3ea04744c22ae4cd2e1f2b77fc7d5ade012899e0
Submitter: Jenkins
Branch: master

commit 3ea04744c22ae4cd2e1f2b77fc7d5ade012899e0
Author: Saravanan KR <email address hidden>
Date: Wed Aug 30 14:44:53 2017 +0530

    Mount vhost_sockets directory for vhost-user socket creation

    For DPDK, vhost-user sockets are created on the host at
    /var/lib/vhost_sockets directory, which will be used by
    libvirt and openvswitch. This directory has the necessary
    permissions and SELinux policies. Mount this folder for
    libvirt container.

    Change-Id: Id8be208d1b05886ac45dfdcf48fe766ee5724d1c
    Partial-Bug: #1712732

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/501980

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/pike)

Reviewed: https://review.openstack.org/501696
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=1119f35bd7d6999c415de897bf5959057ca50bed
Submitter: Jenkins
Branch: stable/pike

commit 1119f35bd7d6999c415de897bf5959057ca50bed
Author: Saravanan KR <email address hidden>
Date: Wed Aug 30 12:39:55 2017 +0530

    Added a kolla config file for building contaner images with qemu uid

    Guest VMs created for DPDK will have the vhost-user socket files
    created by qemu and used by openvswitch. The uid of qemu in host
    is 107 where as the uid set by kolla config is 42427. Because of
    this mismatch, VM creation is failing because of permission.

    Setting the same uid and gid for qemu user for building kolla
    images to ensure that the files are created and used with same
    permission. This patch adds a config file for TripleO to be
    used for building kolla images, which will have the qemu
    user id values override to match the host values.

    Change-Id: I9a2d6b48eb44e294a8501ac0768ea0b97abb4b5c
    Partial-Bug: #1712732
    (cherry picked from commit fcdca87024d99e3eac61bdb227f179b286ca6e04)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/pike)

Reviewed: https://review.openstack.org/501980
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=260648ffe3c28ee294e977346c0289adaa114118
Submitter: Jenkins
Branch: stable/pike

commit 260648ffe3c28ee294e977346c0289adaa114118
Author: Saravanan KR <email address hidden>
Date: Wed Aug 30 14:44:53 2017 +0530

    Mount vhost_sockets directory for vhost-user socket creation

    For DPDK, vhost-user sockets are created on the host at
    /var/lib/vhost_sockets directory, which will be used by
    libvirt and openvswitch. This directory has the necessary
    permissions and SELinux policies. Mount this folder for
    libvirt container.

    Change-Id: Id8be208d1b05886ac45dfdcf48fe766ee5724d1c
    Partial-Bug: #1712732
    (cherry picked from commit 3ea04744c22ae4cd2e1f2b77fc7d5ade012899e0)

Changed in tripleo:
milestone: queens-1 → queens-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/500475
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=3f58d0db0fbe7e02f54cebb2a8eb89b29bfa6def
Submitter: Zuul
Branch: master

commit 3f58d0db0fbe7e02f54cebb2a8eb89b29bfa6def
Author: Saravanan KR <email address hidden>
Date: Mon Sep 4 13:45:34 2017 +0530

    Add default kolla conf file for TripleO to build container images

    A default kolla conf file is added to the tripleo-common-continers
    package, which should be added for building container images by
    default.
    Closes-Bug: #1712732
    Depends-On: I9a2d6b48eb44e294a8501ac0768ea0b97abb4b5c

    Change-Id: Id7c665593d8105cadb90bcc7d10b91b17e430922

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 8.1.0

This issue was fixed in the openstack/python-tripleoclient 8.1.0 release.

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

Other bug subscribers

Remote bug watches

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