Merge "Configure qemu group setting as hugetlbfs for ovs-dpdk"
This commit is contained in:
commit
91de1c223d
15
environments/neutron-ovs-dpdk-permissions.yaml
Normal file
15
environments/neutron-ovs-dpdk-permissions.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
# This permission changes should be applied only on the fresh deployment of
|
||||
# queens, minor updates in queens (and future) and then upgrades from queens
|
||||
# to future versions.
|
||||
#
|
||||
# It should NOT be used for upgrade from pike, ocata, newton as the existing
|
||||
# vhost ports and ovs will be with root permissions. Modifying the ovs to run
|
||||
# with new user during upgrades will result in errors as the existing files and
|
||||
# folders need to be updated with new permissions. If this is required during
|
||||
# the upgrade, it is preferrable to do it externally after upgrade. Once the
|
||||
# changes has been applied, this environment file can be used for further
|
||||
# updates and upgrades.
|
||||
|
||||
parameter_defaults:
|
||||
NeutronVhostuserSocketGroup: "hugetlbfs"
|
||||
|
@ -198,8 +198,47 @@ resources:
|
||||
_TUNED_PROFILE_NAME_: {get_param: [RoleParameters, TunedProfileName]}
|
||||
_TUNED_CORES_: {get_param: [RoleParameters, IsolCpusList]}
|
||||
|
||||
# Details @https://bugzilla.redhat.com/show_bug.cgi?id=1515269
|
||||
# Ensure gid of hugetlbfs matching with kolla so that container deployment
|
||||
# and baremetal (future migrating to container) deployment have same id. This
|
||||
# is a new group created from ovs2.8 onwards. 42477 is the kolla hugetlbfs
|
||||
# gid value. Ensure that it is applied and restart(ovs) or reboot(host)
|
||||
# before starting with DPDK initialization.
|
||||
DpdkVhostGroupConfig:
|
||||
type: OS::Heat::SoftwareConfig
|
||||
depends_on: HostParametersDeployment
|
||||
condition: is_dpdk_config_required
|
||||
properties:
|
||||
group: ansible
|
||||
outputs:
|
||||
- name: result
|
||||
config: |
|
||||
---
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
gather_facts: False
|
||||
tasks:
|
||||
- group:
|
||||
name: "hugetlbfs"
|
||||
gid: 42477
|
||||
|
||||
DpdkVhostGroupDeployment:
|
||||
type: OS::Heat::SoftwareDeployment
|
||||
depends_on: HostParametersDeployment
|
||||
condition: is_dpdk_config_required
|
||||
properties:
|
||||
name: DpdkVhostGroupDeployment
|
||||
server: {get_param: server}
|
||||
config: {get_resource: DpdkVhostGroupConfig}
|
||||
actions:
|
||||
if:
|
||||
- deployment_actions_empty
|
||||
- []
|
||||
- ['CREATE'] # Only do this on CREATE
|
||||
|
||||
RebootConfig:
|
||||
type: OS::Heat::SoftwareConfig
|
||||
depends_on: DpdkVhostGroupDeployment
|
||||
condition: is_reboot_config_required
|
||||
properties:
|
||||
group: script
|
||||
@ -212,7 +251,7 @@ resources:
|
||||
|
||||
RebootDeployment:
|
||||
type: OS::Heat::SoftwareDeployment
|
||||
depends_on: HostParametersDeployment
|
||||
depends_on: DpdkVhostGroupDeployment
|
||||
condition: is_reboot_config_required
|
||||
properties:
|
||||
name: RebootDeployment
|
||||
@ -234,6 +273,7 @@ resources:
|
||||
# maintained, restart of ovs is required.
|
||||
EnableDpdkConfig:
|
||||
type: OS::Heat::SoftwareConfig
|
||||
depends_on: RebootDeployment
|
||||
condition: is_dpdk_config_required
|
||||
properties:
|
||||
group: script
|
||||
|
@ -45,6 +45,24 @@ parameters:
|
||||
type: string
|
||||
tags:
|
||||
- role_specific
|
||||
NeutronVhostuserSocketGroup:
|
||||
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
|
||||
NeutronVhostuserSocketUser:
|
||||
default: "qemu"
|
||||
description: >
|
||||
The vhost-user socket directory user 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
|
||||
|
||||
resources:
|
||||
|
||||
@ -69,10 +87,14 @@ resources:
|
||||
- map_replace:
|
||||
- neutron::agents::ml2::ovs::datapath_type: NeutronDatapathType
|
||||
neutron::agents::ml2::ovs::vhostuser_socket_dir: NeutronVhostuserSocketDir
|
||||
vhostuser_socket_group: NeutronVhostuserSocketGroup
|
||||
vhostuser_socket_user: NeutronVhostuserSocketUser
|
||||
- values: {get_param: [RoleParameters]}
|
||||
- values:
|
||||
NeutronDatapathType: {get_param: NeutronDatapathType}
|
||||
NeutronVhostuserSocketDir: {get_param: NeutronVhostuserSocketDir}
|
||||
NeutronVhostuserSocketGroup: {get_param: NeutronVhostuserSocketGroup}
|
||||
NeutronVhostuserSocketUser: {get_param: NeutronVhostuserSocketUser}
|
||||
|
||||
Ovs:
|
||||
type: ./openvswitch.yaml
|
||||
@ -97,6 +119,9 @@ outputs:
|
||||
- neutron::agents::ml2::ovs::enable_dpdk: true
|
||||
- get_attr: [Ovs, role_data, config_settings]
|
||||
- get_attr: [RoleParametersValue, value]
|
||||
service_config_settings:
|
||||
nova_libvirt:
|
||||
nova::compute::libvirt::qemu::group: {get_attr: [RoleParametersValue, value, vhostuser_socket_group]}
|
||||
step_config: {get_attr: [NeutronOvsAgent, role_data, step_config]}
|
||||
upgrade_tasks:
|
||||
get_attr: [Ovs, role_data, upgrade_tasks]
|
||||
|
Loading…
Reference in New Issue
Block a user