From a7d6d3115674854cdb0e73995d265cd33b444f16 Mon Sep 17 00:00:00 2001 From: Angie Wang Date: Thu, 27 Jun 2019 10:17:24 -0400 Subject: [PATCH] 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 --- .../src/modules/openstack/manifests/horizon.pp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/puppet-manifests/src/modules/openstack/manifests/horizon.pp b/puppet-manifests/src/modules/openstack/manifests/horizon.pp index f5c1a1637e..3f900c1d43 100755 --- a/puppet-manifests/src/modules/openstack/manifests/horizon.pp +++ b/puppet-manifests/src/modules/openstack/manifests/horizon.pp @@ -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':