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
(cherry picked from commit 611830fd76)
This commit is contained in:
Saravanan KR 2018-02-27 17:44:04 +05:30
parent 7ade87ceb6
commit b055eb339b
1 changed files with 24 additions and 2 deletions

View File

@ -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