YARN-8384. stdout.txt, stderr.txt logs of a launched docker container is coming with primary group of submit user instead of hadoop. (Eric Yang via wangda)
Change-Id: Idbb2cd250f4f62dc32993e0d3ca3ec5684616baa
(cherry picked from commit 3a6bd77550
)
This commit is contained in:
parent
09fd1348e8
commit
cc460fea2d
|
@ -1140,8 +1140,8 @@ char *init_log_path(const char *container_log_dir, const char *logfile) {
|
|||
int fd = open(tmp_buffer, O_CREAT | O_WRONLY, permissions);
|
||||
if (fd >= 0) {
|
||||
close(fd);
|
||||
if (change_owner(tmp_buffer, user_detail->pw_uid, user_detail->pw_gid) != 0) {
|
||||
fprintf(ERRORFILE, "Failed to chown %s to %d:%d: %s\n", tmp_buffer, user_detail->pw_uid, user_detail->pw_gid,
|
||||
if (change_owner(tmp_buffer, user_detail->pw_uid, nm_gid) != 0) {
|
||||
fprintf(ERRORFILE, "Failed to chown %s to %d:%d: %s\n", tmp_buffer, user_detail->pw_uid, nm_gid,
|
||||
strerror(errno));
|
||||
free(tmp_buffer);
|
||||
tmp_buffer = NULL;
|
||||
|
|
Loading…
Reference in New Issue