« Previous | Next » 

Revision d6a7518a

IDd6a7518ad5e0ea38ddba3cc4549a35b0617ad425

Added by Jose A. Lopes almost 7 years ago

'LUClusterSetParams' creates the instance communication net

Extend 'LUClusterSetParams' to create the user-supplied instance
communication network in case this network does not exist. Note that
if the user-supplied network already exists, nothing needs to be done
as 'CheckPrereq' already checks this network's configuration.

With this patch, Ganeti will be able to create the instance
communication network automatically. The following example shows the
command line options that instruct Ganeti to enable the instance
communication network and, if this network does not exist, then Ganeti
creates it.

gnt-cluster modify --instance-communication-network=mynetwork

The instance communication network can be disabled by setting the
parameter to the empty string, for example:

gnt-cluster modify --instance-communication-network=

This will not destroy the network itself or modify any running
instances. This will have to be done manually.

In this patch:

  • 'LUClusterSetParams._EnsureInstanceCommunicationNetwork' creates and
    connects to all groups the instance communication network by
    resorting the 'OpNetworkAdd' and 'OpNetworkConnect'.
  • 'LUClusterSetParams.ModifyInstanceCommunicationNetwork' compares the
    previous configured 'instance_communication_network' with the
    user-supplied one and determines whether the opcodes is changing the
    configuration, which might require creating the instance
    communication network.
  • Extend 'LUClusterSetParams.Exec' to call
    'ModifyInstanceCommunicationNetwork' and handle the user-supplied
    'instance_communication_network'.
  • Because 'ClusterSetParams' now may return a list of jobs, the type
    of the opcode must be updated in 'Ganeti.OpCodes'.
  • Add network related constants to 'Ganeti.Constants'.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Helga Velroyen <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences