Skip to content
Snippets Groups Projects
  1. Dec 02, 2008
    • Guido Trotter's avatar
      cluster init: don't discard the hypervisor · 8f348e36
      Guido Trotter authored
      On cluster init if the user specifies a default hypervisor (with -t)
      which is not in the default list of enabled hypervisors (currently just
      xen-pvm) without explicitely specifying the list we silently override
      the choice.
      
      With this patch we set the list by default to just the required one, and
      we bail out should the list be hand-specified and not contain the
      default one. This still has an issue when the user doesn't specify a
      default hypervisor but specifies a list which doesn't include xen-pvm:
      in this case though we give an error, rather than silently discarding
      choices.
      
      Reviewed-by: imsnah
      8f348e36
    • Guido Trotter's avatar
      Use the new utils.CheckBEParams function · d4b72030
      Guido Trotter authored
      Where we used/forgot to validate beparams we now use the new common function.
      
      Reviewed-by: imsnah
      d4b72030
    • Guido Trotter's avatar
      Add utils.CheckBEParams · 42ce2e13
      Guido Trotter authored
      This function will be used in LUCreateInstance, LUSetInstanceParams,
      LUSetClusterParams and InitCluster to check the backend parameters
      validity and convert the relevant values to integer, without duplicating
      code. It lives in utils as bootstrap.py is calling it too.
      
      Reviewed-by: imsnah
      42ce2e13
    • Guido Trotter's avatar
      Add constants.VALUE_TRUE and VALUE_FALSE · 1817f49b
      Guido Trotter authored
      Reviewed-by: imsnah
      1817f49b
    • Guido Trotter's avatar
      Handle default/none values in hv/be params · 8edcd611
      Guido Trotter authored
      When a value is set to constants.VALUE_DEFAULT we have to remove it from
      the specific instance dict, as this way it will be populated from the
      cluster before. If instead it's specified as constants.VALUE_NONE we'll
      explicitely set it to None, to override its presence with a different
      values in such defaults. However, currently, we handle None values only
      for hvparams, that have a real use case for them.
      
      Reviewed-by: imsnah
      8edcd611
    • Guido Trotter's avatar
      SetInstanceParams: handle default/none values · 467ae11e
      Guido Trotter authored
      If the hv/be parameter lowercase value is set to "default" we'll pass
      constants.VALUE_DEFAULT, if it's set to "none" we'll pass
      constants.VALUE_NONE.
      
      Reviewed-by: imsnah
      467ae11e
    • Guido Trotter's avatar
      Update gnt-backup online help · 021f5d6f
      Guido Trotter authored
      --src-node and --src-dir are not mandatory anymore
      
      Reviewed-by: iustinp
      021f5d6f
    • Guido Trotter's avatar
      ImportExport: make src_node and src_path optional · b9322a9f
      Guido Trotter authored
      If src_node is not there we'll default to using the currently exported
      instance name as src_path. Also, if src_path is not absolute we'll look
      for it in EXPORT_DIR.
      
      Reviewed-by: iustinp
      b9322a9f
    • Guido Trotter's avatar
      LUCreateInstance: handle import without src_node · c0cbdc67
      Guido Trotter authored
      If we get called with no source node we'll thread src_path as an
      instance name exported in EXPORT_DIR in one of the nodes and look for
      it with the export_list rpc call.
      
      Reviewed-by: iustinp
      c0cbdc67
    • Guido Trotter's avatar
      LUCreateInstance: keep src node lock on import · 9c8971d7
      Guido Trotter authored
      Currently the node lock also guards against removing the import at the
      wrong time, so if we're importing an instance image we want to keep the
      source node locked. In the future we might want to put export locks at a
      different level than node locks.
      
      Reviewed-by: iustinp
      9c8971d7
    • Iustin Pop's avatar
      Fix master failover · bbe19c17
      Iustin Pop authored
      The ssconf files were not updated by the master failover. We need to
      push them, and since we already have RPC initialized, we can use the
      standard ConfigWriter to do so - this will take care of both the config
      file and the ssconf files.
      
      Reviewed-by: imsnah
      bbe19c17
    • Iustin Pop's avatar
      Adjust cluster-verify to check for candidate role · 112f18a5
      Iustin Pop authored
      Currently cluster verify checks all nodes for the same set of files,
      even if the nodes are not master candidates.
      
      This patch adds back checking of ssconf files for consistency and splits
      the checksum check into different error reporting messages based on
      candidate role.
      
      Reviewed-by: imsnah
      112f18a5
    • Iustin Pop's avatar
      Add candidate pool size checks in verify · a8efbb40
      Iustin Pop authored
      Reviewed-by: imsnah
      a8efbb40
    • Iustin Pop's avatar
      Prevent demotion from candidate based on pool size · 3e83dd48
      Iustin Pop authored
      In gnt-cluster modify we prevent demotion from the candidate role if
      there are not enough master candidates left.
      
      Reviewed-by: imsnah
      3e83dd48
    • Iustin Pop's avatar
      Add cluster candidate pool size parameter · 4b7735f9
      Iustin Pop authored
      This patch adds a new cluster paramater "candidate_pool_size" which
      tracks the desired size of the list of nodes with the master_candidate
      flag set.
      
      Reviewed-by: imsnah
      4b7735f9
    • Iustin Pop's avatar
      Prevent master failover to a non candidate node · 8135a2db
      Iustin Pop authored
      Reviewed-by: imsnah
      8135a2db
    • Iustin Pop's avatar
      Add the list of master candidates to ssconf · f56618e0
      Iustin Pop authored
      Reviewed-by: imsnah
      f56618e0
    • Iustin Pop's avatar
      Restrict job propagation to master candidates only · 59303563
      Iustin Pop authored
      This patch restricts the job propagation to master candidates only, by
      not registering non-candidates in the job queue node lists.
      
      Note that we do intentionally purge the job queue if a node is toggled
      to non-master status.
      
      Reviewed-by: imsnah
      59303563
    • Iustin Pop's avatar
      Restrict config replication to master candidates · 6a5b8b4b
      Iustin Pop authored
      This patch restricts the config data replication to master candidates
      only.
      
      Reviewed-by: imsnah
      6a5b8b4b
    • Iustin Pop's avatar
      Add a gnt-node modify operation · b31c8676
      Iustin Pop authored
      This patch adds the OpCode, LogicalUnit and gnt-node command for
      modifying node parameters, more specifically the master candidate flag
      for a node.
      
      Reviewed-by: imsnah
      b31c8676
    • Iustin Pop's avatar
      Add master/master_candidate fields to node list · 0e67cdbe
      Iustin Pop authored
      This patch adds listing of the master_candidate field (as Y/N) and of
      the master role (again Y/N) for nodes.
      
      Reviewed-by: imsnah
      0e67cdbe
    • Iustin Pop's avatar
      Introduce a new 'master_candidate' node attribute · 8b8b8b81
      Iustin Pop authored
      The field is not yet used.
      
      Reviewed-by: imsnah
      8b8b8b81
    • Iustin Pop's avatar
      Simplify a little the ssconf update · 89b14f05
      Iustin Pop authored
      We have (again) the KeyToFilename function, so we move the writing of
      the files to a method under SimpleStore.
      
      Reviewed-by: imsnah
      89b14f05
    • Iustin Pop's avatar
      Replicate the node list in ssconf · 054596f0
      Iustin Pop authored
      This patch adds node_list in the list of replicated values from
      ConfigWriter.
      
      Reviewed-by: imsnah
      054596f0
    • Iustin Pop's avatar
      Revert "Get rid of ssconf" · 93384844
      Iustin Pop authored
      This partially reverts the "Get rid of ssconf" patch.
      
      It adds back a simpler version of the SimpleStore class, and drops the
      WritableSimpleStore class. The new version of the class also has
      node_list as a new key, and increases the size of the keys so that big
      clusters will fit the node list. Also, the SS_* constants are moved to
      constants.py, since the ConfigWriter class will need them too in order
      to generate the values dictionary.
      
      It also changes the GetMasterAndMyself function to use the SimpleStore
      by default, and the backend._GetConfig to use it too (it has all the
      needed keys).
      
      Reviewed-by: imsnah
      93384844
    • Iustin Pop's avatar
      burnin: fix usage of diskless template · b518a14a
      Iustin Pop authored
      This allows burnin to work with diskless instances (since we cannot pass
      right now no disks to it).
      
      Reviewed-by: imsnah
      b518a14a
  2. Dec 01, 2008
  3. Nov 28, 2008
  4. Nov 27, 2008
    • Iustin Pop's avatar
      Improve the node add operation · 87622829
      Iustin Pop authored
      Currently, the node add operation uses a job to query the node name and
      the bootstrap function directly reads the config file for the cluster
      name.
      
      This patch changes to that both the cluster name and the verification of
      the node is done via queries to the master.
      
      Reviewed-by: ultrotter
      87622829
    • Iustin Pop's avatar
      Fix logic bug in rev 2072 · f34901f8
      Iustin Pop authored
      In revision 2072 "ConfigWriter: change cluster serial meaning" I misread
      the serial_no update logic: it was about updating the serial number on
      the object itself, not on the cluster.
      
      So we don't actually have at all cluster serial number increase when a
      node is changed (not removed/added).
      
      This patch revers to the original always increase the target serial
      number and adds increase of the cluster serial number in case a node has
      been changed.
      
      Reviewed-by: ultrotter
      f34901f8
    • Iustin Pop's avatar
      jqueue: fix a bug in an error path · 33987705
      Iustin Pop authored
      Dictionaries raise KeyError, and not ValueError when invalid keys are
      passes to del.
      
      Reviewed-by: imsnah
      33987705
    • Iustin Pop's avatar
      ConfigWriter: change cluster serial meaning · cff4c037
      Iustin Pop authored
      Currently, we increase the cluster serial number for instance additions,
      removals and renames. This is conforming with the REST paradigm, however
      it means that for each of these operations, we need to push ssconf
      updates to all nodes.
      
      In order to support future cases with reduced set of master-eligible
      nodes, we want to reduce the ssconf pushes (which need to be to all
      nodes). This patch changes the meaning for the cluster serial number so
      that it doesn't track instance operations at all.
      
      This means that addition of an instance can fail due to concurrent
      additions, even if the cluster serial has not changed. It slightly
      breaks the REST paradigm, but IMHO it's better for actual usage.
      
      Reviewed-by: ultrotter
      cff4c037
Loading