Ganeti customisation using hooks
================================
-Documents ganeti version 2.0
+Documents Ganeti version 2.5
.. contents::
- stdout and stderr are directed to files
-- PATH is reset to ``/sbin:/bin:/usr/sbin:/usr/bin``
+- PATH is reset to :pyeval:`constants.HOOKS_PATH`
- the environment is cleared, and only ganeti-specific variables will
be left
:pre-execution: master node and all nodes in the group
:post-execution: master node and all nodes in the group
+OP_GROUP_EVACUATE
++++++++++++++++++
+
+Evacuates a node group.
+
+:directory: group-evacuate
+:env. vars: GROUP_NAME, TARGET_GROUPS
+:pre-execution: master node and all nodes in the group
+:post-execution: master node and all nodes in the group
+
Instance operations
~~~~~~~~~~~~~~~~~~~
Modifies the instance parameters.
:directory: instance-modify
-:env. vars: NEW_DISK_TEMPLATE
+:env. vars: NEW_DISK_TEMPLATE, RUNTIME_MEMORY
:pre-execution: master node, primary and secondary nodes
:post-execution: master node, primary and secondary nodes
:pre-execution: master node, primary and new secondary nodes
:post-execution: master node, primary and new secondary nodes
+OP_INSTANCE_CHANGE_GROUP
+++++++++++++++++++++++++
+
+Moves an instance to another group.
+
+:directory: instance-change-group
+:env. vars: TARGET_GROUPS
+:pre-execution: master node
+:post-execution: master node
+
Cluster operations
~~~~~~~~~~~~~~~~~~
:pre-execution: master node
:post-execution: master node
+:pyeval:`constants.FAKE_OP_MASTER_TURNUP`
++++++++++++++++++++++++++++++++++++++++++
+
+Called when the master IP is activated.
+
+:directory: master-ip-turnup
+:env. vars: MASTER_NETDEV, MASTER_IP, MASTER_NETMASK, CLUSTER_IP_VERSION
+:pre-execution: master node
+:post-execution: master node
+
+:pyeval:`constants.FAKE_OP_MASTER_TURNDOWN`
++++++++++++++++++++++++++++++++++++++++++++
+
+Called when the master IP is deactivated.
+
+:directory: master-ip-turndown
+:env. vars: MASTER_NETDEV, MASTER_IP, MASTER_NETMASK, CLUSTER_IP_VERSION
+:pre-execution: master node
+:post-execution: master node
+
Obsolete operations
~~~~~~~~~~~~~~~~~~~
This is the list of variables which are specific to one or more
operations.
+CLUSTER_IP_VERSION
+ IP version of the master IP (4 or 6)
+
INSTANCE_NAME
The name of the instance which is the target of the operation.
VM_CAPABLE
Whether the node can host instances.
+MASTER_NETDEV
+ Network device of the master IP
+
+MASTER_IP
+ The master IP
+
+MASTER_NETMASK
+ Netmask of the master IP
+
+INSTANCE_TAGS
+ A space-delimited list of the instance's tags.
+
NODE_NAME
The target node of this operation (not the node on which the hook
runs).