From 611830fd7621325fbbea5267492a631312aca767 Mon Sep 17 00:00:00 2001 From: Saravanan KR Date: Tue, 27 Feb 2018 17:44:04 +0530 Subject: [PATCH] Apply the vhost group parameter for the vhost_sockets directory creation Directory /var/lib/vhost_sockets will be used to create vhost sockets which should have the the group name as hugetlbfs, which is common between qemu and openvswitch to share the vhost_sockets. And the correct selinux context to be applied on the vhost_sockets directory. Closes-Bug: #1751711 Change-Id: Ib917cf86bd9a4ce57af243ab43337ea6c88bf76c --- docker/services/nova-libvirt.yaml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/docker/services/nova-libvirt.yaml b/docker/services/nova-libvirt.yaml index 3dd9142af6..75e43c9aa1 100644 --- a/docker/services/nova-libvirt.yaml +++ b/docker/services/nova-libvirt.yaml @@ -116,7 +116,15 @@ parameters: the InternalTLSVncCAFile parameter) is not desired. The current default reflects TripleO's default CA, which is FreeIPA. It will only be used if internal TLS is enabled. - + VhostuserSocketGroup: + default: "qemu" + description: > + The vhost-user socket directory group name. + Defaults to 'qemu'. When vhostuser mode is 'dpdkvhostuserclient' + (which is the default mode), the vhost socket is created by qemu. + type: string + tags: + - role_specific conditions: @@ -159,6 +167,18 @@ conditions: resources: + RoleParametersValue: + type: OS::Heat::Value + properties: + type: json + value: + map_replace: + - map_replace: + - vhostuser_socket_group: VhostuserSocketGroup + - values: {get_param: [RoleParameters]} + - values: + VhostuserSocketGroup: {get_param: VhostuserSocketGroup} + ContainersCommon: type: ./containers-common.yaml @@ -396,7 +416,9 @@ outputs: path: /var/lib/vhost_sockets state: directory owner: qemu - group: qemu + group: {get_attr: [RoleParametersValue, value, vhostuser_socket_group]} + setype: virt_cache_t + seuser: system_u - name: ensure ceph configurations exist file: path: /etc/ceph