Fix the helm-upload failure on controller-1

The user "www" is used to upload charts by using
helm-upload cmd. The root cause for the helm-upload
failure is the uid and gid of user "www" do not match
the uid and gid on controller-0.

Currently, www is created on controller-0 during ansible
configuration and the uid is set to "1877" explicitly.
On controller-1, it's created in puppet manifest but
it doesn't set the uid.

The user "www" should really be added in setup package so
that it's created after each node installation and it makes
sure the uid and gid are consistent on each node.
This is done in review https://review.opendev.org/#/c/668034/

However, we want to add the uid and gid in puppet as well
to ensure they are identical on both controllers in case
the user is not created during setup rpm installation.

Change-Id: I54035739c15eb0f5254f00f5c22d44925316e81c
Partial-Bug: 1833603
Signed-off-by: Angie Wang <angie.wang@windriver.com>
This commit is contained in:
Angie Wang 2019-06-27 10:17:24 -04:00
parent 876f063ca0
commit a7d6d31156
1 changed files with 10 additions and 2 deletions

View File

@ -43,11 +43,19 @@ class openstack::horizon
#The intention here is to set up /www as a chroot'ed
#environment for lighttpd so that it will remain in a jail under /www.
#The uid and gid for www match the uid and gid in the setup package.
user { 'www':
group { 'www':
ensure => 'present',
gid => '1877',
}
-> user { 'www':
ensure => 'present',
gid => '1877',
shell => '/sbin/nologin',
groups => ['sys_protected'],
groups => ['www', 'sys_protected'],
uid => '1877',
}
file { '/www/tmp':