Next revision | Previous revision |
technical:generic:workgroup-cmd [2020-07-23 13:50] – created frey | technical:generic:workgroup-cmd [2020-07-23 16:15] (current) – [Alterations to the workgroup Command] anita |
---|
====== Alterations to the workgroup Command ====== | ====== Alterations to the workgroup Command ====== |
| |
Users of the IT-RCI clusters have a primary gid (group id) of //everyone// (or //900//), but when submitting and executing jobs the user needs an effective gid other than that. The ''workgroup'' command is used to execute a command or spawn a new shell that has an effective gid of a secondary group of which the user is a member. For example, a member of the ``it_nss`` workgroup on Caviness can do the following: | Users of the IT-RCI clusters have a primary gid (group id) of //everyone// (or //900//), but when submitting and executing jobs the user needs an effective gid other than that. The ''workgroup'' command is used to execute a command or spawn a new shell that has an effective gid of a secondary group of which the user is a member. For example, a member of the ''it_nss'' workgroup on Caviness can do the following: |
| |
<code bash> | <code bash> |
===== Issues ===== | ===== Issues ===== |
| |
One issue with the ``workgroup`` command is in the inheritance of the environment. The Bash shell environment includes unexported variables, aliases, array-valued variables, and functions that are not a part of the POSIX environment that sub-processes will inherit: | One issue with the ''workgroup'' command is in the inheritance of the environment. The Bash shell environment includes unexported variables, aliases, array-valued variables, and functions that are not a part of the POSIX environment that sub-processes will inherit: |
| |
<code bash> | <code bash> |
The workgroup shell starts with a clean environment: the ''vpkg_require r/default'' from the original shell did not carry over into the workgroup shell. The workgroup shell's prompt is working as before. This is the desired behavior. | The workgroup shell starts with a clean environment: the ''vpkg_require r/default'' from the original shell did not carry over into the workgroup shell. The workgroup shell's prompt is working as before. This is the desired behavior. |
| |
| <note important>Note that this is **not** the desired behavior when ''workgroup'' is used to execute commands (using the ''-C'' flag). In that mode, all variables in the parent shell will be passed to the command when it is executed.</note> |
| |
| ===== Implementation ===== |
| |
| Updates to the code have been pushed to the [[https://gitlab.com/jtfrey/workgroup|official repository]]. The updated version of the ''workgroup'' command is available under ''/opt/shared/workgroup/20200723/bin'' on Caviness and Farber for testing. |
| |
| ===== Timeline ===== |
| |
| ^Date ^Time ^Goal/Description ^ |
| |2020-07-23| |Authoring of this document| |
| |2020-07-30|09:00|Activation on Caviness and Farber| |