Skip to content

Commit 63802e4

Browse files
authored
Suppress missing GID warnings with supplemental groups (#3091)
1 parent b315cbe commit 63802e4

File tree

1 file changed

+9
-1
lines changed
  • src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/jupyterhub/files/jupyterhub

1 file changed

+9
-1
lines changed

src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/jupyterhub/files/jupyterhub/03-profiles.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,17 @@ def configure_user(username, groups, uid=1000, gid=100):
357357
"PIP_REQUIRE_VIRTUALENV": "true",
358358
}
359359

360+
# Map supplemental GIDs to dummy group names to suppress 'missing GID'
361+
# warnings at startup. This is a temporary workaround; see issue #3044
362+
# for context and planned improvements.
363+
additional_gids = [4, 20, 24, 25, 27, 29, 30, 44, 46]
364+
group_entries = [{"groupname": "users", "gid": gid}] + [
365+
{"groupname": f"nogroup{g}", "gid": g} for g in additional_gids
366+
]
367+
360368
etc_passwd, etc_group = generate_nss_files(
361369
users=[{"username": username, "uid": uid, "gid": gid}],
362-
groups=[{"groupname": "users", "gid": gid}],
370+
groups=group_entries,
363371
)
364372

365373
jupyter_config = json.dumps(

0 commit comments

Comments
 (0)