Sudo-g5k: Difference between revisions

From Grid5000
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:
While this is a very quick way to become root on a node, note that using <code class="command">kadeploy</code> provides more features, such as choosing the operating system, for instance not a Debian, or having right away a customized operating system for your experiment (with the software stack of your experimentation already deployed). See the [[Environment creation]] page for more details.
While this is a very quick way to become root on a node, note that using <code class="command">kadeploy</code> provides more features, such as choosing the operating system, for instance not a Debian, or having right away a customized operating system for your experiment (with the software stack of your experimentation already deployed). See the [[Environment creation]] page for more details.


Also note that <code class="command">sudo-g5k</code> does not grant the root privileges on all the nodes of a job, but only on the node the user is currently logged in.
Also note that <code class="command">sudo-g5k</code> does not grant the root privileges on all the nodes of a job, but only on the node the user is currently logged in. In a job with many nodes, <code class="command">sudo-g5k</code> has to be called on every node where to become root.


== Some explanations ==
== Some explanations ==

Revision as of 16:38, 8 July 2020

About sudo-g5k

sudo-g5k is a command available in the Grid'5000 standard environment (the operating system running on nodes when not deploying), which allows to gain the root privileges, just like with sudo. This allows modifying the operating system, for instance installing additional Debian packages, or changing the system configuration, without requiring to first deploy (with kadeploy).

While this is a very quick way to become root on a node, note that using kadeploy provides more features, such as choosing the operating system, for instance not a Debian, or having right away a customized operating system for your experiment (with the software stack of your experimentation already deployed). See the Environment creation page for more details.

Also note that sudo-g5k does not grant the root privileges on all the nodes of a job, but only on the node the user is currently logged in. In a job with many nodes, sudo-g5k has to be called on every node where to become root.

Some explanations

sudo-g5k is a wrapper script on top of sudo, which adds some verifications with regard to the rights obtained within a job (first of all, to use sudo-g5k, the job must have reserved the whole node, not just some of the CPUs, cores or GPUs). The wrapper also notify that the system of the node is modified, so that the node must be redeployed after the job. As such, using sudo-g5k has quite a huge impact on the platform. For instance, if you end an interactive job on a node after using sudo-g5k, that node won't be available before some time, due to the redeployement process triggered by Grid'5000.

Usage

sudo-g5k can be run just once, and then the user can just use sudo afterward. Or sudo-g5k can be used anytime with the same arguments and option as sudo.