Honor --heat-user argument in heat launcher

Previously, the --heat-user argument was not honored, and the "heat"
user was assumed. This patch corrects the issue so that the user
specified by --heat-user is used by the heat launcher.

Change-Id: I5b4a93f652272c781fc57373a483a9c2289dc248
This commit is contained in:
James Slagle 2019-10-29 15:55:02 -04:00
parent 43896a6bc4
commit 93f61cfa14
1 changed files with 2 additions and 2 deletions

View File

@ -347,10 +347,10 @@ class HeatNativeLauncher(HeatBaseLauncher):
self.config_file, 'db_sync'])
def get_heat_uid(self):
return pwd.getpwnam('heat').pw_uid
return pwd.getpwnam(self.user).pw_uid
def get_heat_gid(self):
return grp.getgrnam('heat').gr_gid
return grp.getgrnam(self.user).gr_gid
def kill_heat(self, pid):
os.kill(pid, signal.SIGKILL)