Add openvswitch/hugetlbfs user and group on update

When we bring ovs 2.9 we will need to have openvswitch user
and hugetlbfs group, in order for ovs to work properly. As the
package is not taking care of it, create it on the update tasks.

Co-Authored-By: Zenghui Shi <zshi@redhat.com>
Change-Id: I792dd0e1cac1782499413f01b5d40d3b338fd5b1
This commit is contained in:
Yolanda Robla 2018-04-11 11:47:50 +02:00 committed by Zenghui Shi
parent 3c80ae111d
commit 59d9be694a
4 changed files with 30 additions and 0 deletions

View File

@ -153,6 +153,8 @@ outputs:
- neutron::agents::ml2::ovs::firewall_driver: {get_param: NeutronOVSFirewallDriver}
step_config: |
include ::tripleo::profile::base::neutron::ovs
update_tasks:
get_attr: [Ovs, role_data, update_tasks]
upgrade_tasks:
list_concat:
- get_attr: [Ovs, role_data, upgrade_tasks]

View File

@ -94,5 +94,7 @@ outputs:
- get_attr: [Ovs, role_data, config_settings]
- get_attr: [RoleParametersValue, value]
step_config: {get_attr: [NeutronOvsAgent, role_data, step_config]}
update_tasks:
get_attr: [Ovs, role_data, update_tasks]
upgrade_tasks:
get_attr: [Ovs, role_data, upgrade_tasks]

View File

@ -140,6 +140,8 @@ outputs:
- get_attr: [RoleParametersValue, value]
step_config: |
include tripleo::profile::base::neutron::plugins::ovs::opendaylight
update_tasks:
get_attr: [Ovs, role_data, update_tasks]
upgrade_tasks:
list_concat:
- get_attr: [Ovs, role_data, upgrade_tasks]

View File

@ -140,6 +140,30 @@ outputs:
OvsDpdkDriverType: {if: [driver_not_set, {get_param: NeutronDpdkDriverType}, {get_param: OvsDpdkDriverType}]}
OvsPmdCoreList: {if: [pmd_cores_empty, {get_param: NeutronDpdkCoreList}, {get_param: OvsPmdCoreList}]}
update_tasks:
# Ovs uses openvswitch:hugetlbfs as user and group settings
# when updating to 2.8 onwards, but openvswitch user is not
# created during package update. This adds workaround to
# make sure openvswitch user exist before running package
# update. Details can be found at:
# https://bugzilla.redhat.com/show_bug.cgi?id=1559374
# 42477 is the kolla hugetlbfs gid value.
- name: ensure hugetlbfs group is present
when: step == "2"
group:
name: hugetlbfs
gid: 42477
- name: ensure openvswitch user is present on the host
when: step == "2"
user:
name: openvswitch
home: /
system: yes
groups: hugetlbfs
shell: /sbin/nologin
comment: "OpenvSwitch Daemons"
upgrade_tasks:
- name: Check openvswitch version.
tags: step2