3.38
mvcctl (Moab Virtual Container Control)
3.38.1 Synopsis
3.38.2 Overview
A virtual container (VC) is a logical grouping of objects with a shared variable space and applied policies. Containers can hold virtual machines, jobs, reservations, and nodes. Containers can also be nested inside other containers.
A VC can be owned by a user, group, or account. Users can only view VCs to which they have access. Level 1 administrators (Admin1) can view and modify all VCs. The owner can also be changed. When modifying the owner, you must also specify the owner type:
mvcctl -m OWNER=acct:bob myvc
Adding objects to VCs at submission: You associate jobs, VMs, and reservations with a specified VC upon submission. For example,
- mrsvctl -c ... -H <VC>
- msub ... -W x="vc=<VC>"
- mvmctl -c ...,vc=<VC>
The user who submits objects must have access to the VC or the command is rejected.
3.38.3 FullXML flag
The FullXML flag will cause the mvcctl -q command to show VCs in a hierarchical manner. If doing a non-XML (plaintext) query, sub-VCs will be listed inside their parent VCs. Each VC will be indented more than its parent.
VC[vc1] (vc1)
Owner: user:jason
VCs:
VC[vc2] (vc2)
Owner: user:jason
Jobs: Moab.1
Rsvs: system.1
VCs:
VC[vc3] (vc3)
Owner: user:jason
VC[vc4] (vc4)
Owner: user:jason
If doing an XML query, the XML for all sub-objects (VCs, but also reservations, jobs, etc.) will also be included in the VC.
<Data>
<vcs>
<vc CREATETIME="1460666817" CREATOR="tshaw" DESCRIPTION="vc1"
NAME="vc1" OWNER="user:tshaw" VCS="vc2,vc4">
<ACL aff="positive" cmp="%=" name="tshaw" type="USER" />
</vc>
<vc CREATETIME="1460666818" CREATOR="tshaw" DESCRIPTION="vc2"
JOBS="moab.1" NAME="vc2" OWNER="user:tshaw" RSVS="system.2"
VCS="vc3">
<ACL aff="positive" cmp="%=" name="tshaw" type="USER" />
</vc>
<vc CREATETIME="1460666818" CREATOR="tshaw" DESCRIPTION="vc3"
NAME="vc3" OWNER="user:tshaw">
<ACL aff="positive" cmp="%=" name="tshaw" type="USER" />
</vc>
<vc CREATETIME="1460666818" CREATOR="tshaw" DESCRIPTION="vc4"
NAME="vc4" OWNER="user:tshaw">
<ACL aff="positive" cmp="%=" name="tshaw" type="USER" />
</vc>
</vcs>
</Data>
Note that the XML from the blocking and non-blocking commands may differ.
3.38.4 Virtual Container Flags
The following table indicates available virtual container (VC) flags and associated descriptions. Note that the Deleting, HasStarted, and Workflow flags cannot be set by a user but are helpful indicators of status.
VC Flags |
DestroyObjects |
When the VC is destroyed, any reservations, jobs, and VMs in the VC are also destroyed. This is recursive, so any objects in sub-VCs are also destroyed. Nodes are not removed. |
DestroyWhenEmpty |
When the VC is empty, it is destroyed. |
Deleting |
Set by the scheduler when the VC has been instructed to be removed.
Internal flag. Administrators cannot set or clear this flag.
|
HasStarted |
This flag is set on a VC workflow where at least one job has started.
Internal flag. Administrators cannot set or clear this flag.
|
HoldJobs |
This flag will place a hold on any job that is submitted to the VC while this flag is set. It is not applied for already existing jobs that are added into the VC. If a job with a workflow is submitted to the VC, all jobs within the workflow are placed on hold. |
NoReleaseWhenScheduled |
Prevents Moab from lifting the UserHold on the workflow when it is scheduled. This enables an approval method in which an administrator must release the hold manually before the service is allowed to start as scheduled. |
Workflow |
Designates this VC as a VC that is for workflows. This flag is set when generated by a job template workflow. Workflow jobs can only be attached to one workflow VC.
Internal flag. Administrators cannot set or clear this flag.
|
3.38.5 Options
-a |
Format |
mvcctl -a<OType>:<OName>[,<OType>:<OName>] <name>
Where <OType> is one of JOB, RSV, NODE, VC, or VM.
|
Description |
Add the given object(s). |
Example |
mvcctl -a JOB:Moab.45 vc13
>>job 'Moab.45' added to VC 'vc13'
|
-c |
Format |
mvcctl -c [<description>] |
Description |
Create a virtual container (VC). The VC name is auto-generated. It is recommended that you supply a description; otherwise the description is the same as the auto-generated name. |
Example |
mvcctl -c "Linux testing machine"
>>VC 'vc13' created
|
-d |
Format |
mvcctl -d<lab01>
|
Description |
Destroy the VC. |
Example |
mvcctl -d vc13
>>VC 'vc13' destroyed
|
-m |
Format |
mvcctl -m<ATTR>=VAL[,<ATTR>=<VAL>] <name> |
Description |
Modify the VC. Attributes are flags, owner, reqstarttime, reqnodeset, variables, and owner; note that only the owner can modify owner. Use reqstarttime when implementing guaranteed start time to specify when jobs should start. The reqnodeset attribute indicates the node set that jobs should run in that are submitted to a virtual container. |
Example |
mvcctl -m variables+=HV=node8 vc13
>>VC 'vc13' successfully modified
mvcctl -m flags+=DESTROYWHENEMPTY vc1
>>VC 'vc1' successfully modified
mvcctl -m messages="\"This VC is for internal use, etc.\"" vc5
>>VC 'vc5' successfully modified
|
-q |
Format |
mvcctl -q [<name>|ALL] [--xml][--blocking][--flags=fullxml] |
Description |
Query VCs |
Example
|
mvcctl -q ALL
VC[vc13] (Linux testing machine)
Create Time: 1311027343 Creator: jdoe
Owner: user:jdoe
ACL: USER=%=jdoe+;
Jobs: Moab.45
Vars: HV=node88
Flags: DESTROYWHENEMPTY
|
-r |
Format |
mvcctl -r<OType>:<OName>[,<OType>:<OName>] <name>
Where <OType> is one of JOB, RSV, NODE, VC, or VM.
|
Description |
Remove the given object(s) from the VC. |
Example |
mvcctl -r JOB:Moab.45 vc13
>>job 'Moab.45' removed from VC 'vc13'
|
-x |
Format |
mvcctl -x<action><name>
|
Description |
Executes the given action on the virtual container (VC).
|
Example |
|