Skip to content

Commit

Permalink
fix(manager): use valid group name when calling groupadd (#566)
Browse files Browse the repository at this point in the history
Use a valid name when creating a new group with `groupadd`, as numbers
are not valid group names.

Closes #561
  • Loading branch information
mdonadoni committed Feb 2, 2024
1 parent 199c163 commit a4b568f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion reana_workflow_controller/workflow_run_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
REANA_RUNTIME_JOBS_KUBERNETES_NODE_LABEL,
REANA_RUNTIME_KUBERNETES_SERVICEACCOUNT_NAME,
REANA_STORAGE_BACKEND,
WORKFLOW_RUNTIME_GROUP_NAME,
WORKFLOW_RUNTIME_USER_GID,
WORKFLOW_RUNTIME_USER_NAME,
WORKFLOW_RUNTIME_USER_UID,
Expand Down Expand Up @@ -701,7 +702,7 @@ def _create_job_controller_startup_cmd(self, user=None):
base_cmd = "exec flask run -h 0.0.0.0;"
if user:
add_group_cmd = "groupadd -f -g {} {};".format(
WORKFLOW_RUNTIME_USER_GID, WORKFLOW_RUNTIME_USER_GID
WORKFLOW_RUNTIME_USER_GID, WORKFLOW_RUNTIME_GROUP_NAME
)
add_user_cmd = "useradd -u {} -g {} -M {};".format(
WORKFLOW_RUNTIME_USER_UID, WORKFLOW_RUNTIME_USER_GID, user
Expand Down

0 comments on commit a4b568f

Please sign in to comment.