Commit 108c0a3e authored by Iustin Pop's avatar Iustin Pop
Browse files

Merge branch 'devel-2.6'

* devel-2.6:
  Final update of NEWS file for 2.6.2 and version bump
  Fix job completion with big job queues
  confd: reduce noise during normal config reload
  Change hbal handling of !auto_balance instances
  Small corrections in man pages
  Fix gnt-instance(8) w.r.t. growable disk templates
  Stop verifying opcode results in dry_run mode
  Update NEWS for 2.6.2
  Fix TypeError when unsetting OS parameters don't use GetHypervisor

        NEWS (trivial, integrated the 2.6.2 news)
        autotools/build-bash-completion (trivial: pathutils)
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarBernardo Dal Seno <>
parents ce003543 478a3308
......@@ -54,6 +54,66 @@ Version 2.7.0 beta1
retried thereafter, with or without opportunistic locking.
Version 2.6.2
*(Released Fri, 21 Dec 2012)*
Important behaviour change: hbal won't rebalance anymore instances which
have the ``auto_balance`` attribute set to false. This was the intention
all along, but until now it only skipped those from the N+1 memory
reservation (DRBD-specific).
A significant number of bug fixes in this release:
- Fixed disk adoption interaction with ipolicy checks.
- Fixed networking issues when instances are started, stopped or
migrated, by forcing the tap device's MAC prefix to "fe" (issue 217).
- Fixed the warning in cluster verify for shared storage instances not
being redundant.
- Fixed removal of storage directory on shared file storage (issue 262).
- Fixed validation of LVM volume group name in OpClusterSetParams
(``gnt-cluster modify``) (issue 285).
- Fixed runtime memory increases (``gnt-instance modify -m``).
- Fixed live migration under Xen's ``xl`` mode.
- Fixed ``gnt-instance console`` with ``xl``.
- Fixed building with newer Haskell compiler/libraries.
- Fixed PID file writing in Haskell daemons (confd); this prevents
restart issues if confd was launched manually (outside of
``daemon-util``) while another copy of it was running
- Fixed a type error when doing live migrations with KVM (issue 297) and
the error messages for failing migrations have been improved.
- Fixed opcode validation for the out-of-band commands (``gnt-node
- Fixed a type error when unsetting OS hypervisor parameters (issue
311); now it's possible to unset all OS-specific hypervisor
- Fixed the ``dry-run`` mode for many operations: verification of
results was over-zealous but didn't take into account the ``dry-run``
operation, resulting in "wrong" failures.
- Fixed bash completion in ``gnt-job list`` when the job queue has
hundreds of entries; especially with older ``bash`` versions, this
results in significant CPU usage.
And lastly, a few other improvements have been made:
- Added option to force master-failover without voting (issue 282).
- Clarified error message on lock conflict (issue 287).
- Logging of newly submitted jobs has been improved (issue 290).
- Hostname checks have been made uniform between instance rename and
create (issue 291).
- The ``--submit`` option is now supported by ``gnt-debug delay``.
- Shutting down the master daemon by sending SIGTERM now stops it from
processing jobs waiting for locks; instead, those jobs will be started
once again after the master daemon is started the next time (issue
- Support for Xen's ``xl`` program has been improved (besides the fixes
- Reduced logging noise in the Haskell confd daemon (only show one log
entry for each config reload, instead of two).
- Several man page updates and typo fixes.
Version 2.6.1
......@@ -103,10 +103,10 @@ def WritePreamble(sw, support_debug):
# FIXME: this is really going into the internals of the job queue
sw.Write(("local jlist=$( shopt -s nullglob &&"
" cd %s 2>/dev/null && echo job-* || : )"),
sw.Write(("local jlist=($( shopt -s nullglob &&"
" cd %s 2>/dev/null && echo job-* || : ))"),
sw.Write('echo "${jlist//job-/}"')
sw.Write('echo "${jlist[@]/job-/}"')
# Configure script for Ganeti
m4_define([gnt_version_major], [2])
m4_define([gnt_version_minor], [6])
m4_define([gnt_version_revision], [1])
m4_define([gnt_version_revision], [2])
m4_define([gnt_version_suffix], [])
......@@ -427,7 +427,7 @@ addNotifier inotify path cref mstate =
-- | Inotify event handler.
onInotify :: INotify -> String -> CRef -> MVar ServerState -> Event -> IO ()
onInotify inotify path cref mstate Ignored = do
logInfo "File lost, trying to re-establish notifier"
logDebug "File lost, trying to re-establish notifier"
modifyMVar_ mstate $ \state -> do
result <- addNotifier inotify path cref mstate
(newfstat, _) <- safeUpdateConfig path (reloadFStat state) cref
......@@ -637,7 +637,8 @@ tryBalance ini_tbl disk_moves inst_moves evac_mode mg_limit min_gain =
in filter (any (`elem` bad_nodes) .
Instance.allNodes) all_inst
else all_inst
reloc_inst = filter Instance.movable all_inst'
reloc_inst = filter (\i -> Instance.movable i &&
Instance.autoBalance i) all_inst'
node_idx = map Node.idx online_nodes
fin_tbl = checkMove node_idx disk_moves inst_moves ini_tbl reloc_inst
(Table _ _ fin_cv _) = fin_tbl
......@@ -2093,7 +2093,7 @@ class LUClusterVerifyConfig(NoHooksLU, _VerifyErrors):
msg = ("hypervisor %s parameters syntax check (source %s): %%s" %
(item, hv_name))
hv_class = hypervisor.GetHypervisor(hv_name)
hv_class = hypervisor.GetHypervisorClass(hv_name)
utils.ForceDictType(hv_params, constants.HVS_PARAMETER_TYPES)
except errors.GenericError, err:
......@@ -4264,7 +4264,10 @@ class LUClusterSetParams(LogicalUnit):
self.new_os_hvp[os_name] = hvs
for hv_name, hv_dict in hvs.items():
if hv_name not in self.new_os_hvp[os_name]:
if hv_dict is None:
# Delete if it exists
self.new_os_hvp[os_name].pop(hv_name, None)
elif hv_name not in self.new_os_hvp[os_name]:
self.new_os_hvp[os_name][hv_name] = hv_dict
......@@ -4310,7 +4313,7 @@ class LUClusterSetParams(LogicalUnit):
(self.op.enabled_hypervisors and
hv_name in self.op.enabled_hypervisors)):
# either this is a new hypervisor, or its parameters have changed
hv_class = hypervisor.GetHypervisor(hv_name)
hv_class = hypervisor.GetHypervisorClass(hv_name)
utils.ForceDictType(hv_params, constants.HVS_PARAMETER_TYPES)
_CheckHVParams(self, node_list, hv_name, hv_params)
......@@ -4324,7 +4327,7 @@ class LUClusterSetParams(LogicalUnit):
# we need to fill in the new os_hvp on top of the actual hv_p
cluster_defaults = self.new_hvparams.get(hv_name, {})
new_osp = objects.FillDict(cluster_defaults, hv_params)
hv_class = hypervisor.GetHypervisor(hv_name)
hv_class = hypervisor.GetHypervisorClass(hv_name)
_CheckHVParams(self, node_list, hv_name, new_osp)
......@@ -4546,12 +4549,14 @@ def _ComputeAncillaryFiles(cluster, redist):
files_vm = set(
for hv_name in cluster.enabled_hypervisors
for filename in hypervisor.GetHypervisor(hv_name).GetAncillaryFiles()[0])
for filename in
files_opt |= set(
for hv_name in cluster.enabled_hypervisors
for filename in hypervisor.GetHypervisor(hv_name).GetAncillaryFiles()[1])
for filename in
# Filenames in each category must be unique
all_files_set = files_all | files_mc | files_vm
......@@ -7004,7 +7009,7 @@ class LUInstanceStartup(LogicalUnit):
utils.ForceDictType(self.op.hvparams, constants.HVS_PARAMETER_TYPES)
filled_hvp = cluster.FillHV(instance)
hv_type = hypervisor.GetHypervisor(instance.hypervisor)
hv_type = hypervisor.GetHypervisorClass(instance.hypervisor)
_CheckHVParams(self, instance.all_nodes, instance.hypervisor, filled_hvp)
......@@ -10342,7 +10347,7 @@ class LUInstanceCreate(LogicalUnit):
utils.ForceDictType(self.op.hvparams, constants.HVS_PARAMETER_TYPES)
filled_hvp = cluster.SimpleFillHV(self.op.hypervisor, self.op.os_type,
hv_type = hypervisor.GetHypervisor(self.op.hypervisor)
hv_type = hypervisor.GetHypervisorClass(self.op.hypervisor)
self.hv_full = filled_hvp
# check that we don't specify global parameters on an instance
......@@ -11112,7 +11117,7 @@ def _GetInstanceConsole(cluster, instance):
@rtype: dict
hyper = hypervisor.GetHypervisor(instance.hypervisor)
hyper = hypervisor.GetHypervisorClass(instance.hypervisor)
# beparams and hvparams are passed separately, to avoid editing the
# instance and then saving the defaults in the instance itself.
hvparams = cluster.FillHV(instance)
......@@ -13411,7 +13416,7 @@ class LUInstanceSetParams(LogicalUnit):
hv_new = cluster.SimpleFillHV(hv_type, instance.os, i_hvdict)
# local check
_CheckHVParams(self, nodelist, instance.hypervisor, hv_new)
self.hv_proposed = self.hv_new = hv_new # the new actual values
self.hv_inst = i_hvdict # the new dict (without defaults)
......@@ -544,8 +544,12 @@ class Processor(object):
if not (resultcheck_fn is None or resultcheck_fn(result)):
logging.error("Expected opcode result matching %s, got %s",
resultcheck_fn, result)
raise errors.OpResultError("Opcode result does not match %s: %s" %
(resultcheck_fn, utils.Truncate(result, 80)))
if not getattr(op, "dry_run", False):
# FIXME: LUs should still behave in dry_run mode, or
# alternately we should have OP_DRYRUN_RESULT; in the
# meantime, we simply skip the OP_RESULT check in dry-run mode
raise errors.OpResultError("Opcode result does not match %s: %s" %
(resultcheck_fn, utils.Truncate(result, 80)))
return result
......@@ -197,7 +197,7 @@ INIT
| [\--specs-disk-size *spec-param*=*value* [,*spec-param*=*value*...]]
| [\--specs-mem-size *spec-param*=*value* [,*spec-param*=*value*...]]
| [\--specs-nic-count *spec-param*=*value* [,*spec-param*=*value*...]]
| [\--ipol-disk-templates *template* [,*template*...]]
| [\--ipolicy-disk-templates *template* [,*template*...]]
| [\--disk-state *diskstate*]
| [\--hypervisor-state *hvstate*]
| {*clustername*}
......@@ -502,13 +502,13 @@ The ``-C (--candidate-pool-size)`` option specifies the
that the master will try to keep as master\_candidates. For more
details about this role and other node roles, see the ganeti(7).
The ``--specs-...`` and ``--ipol-disk-templates`` options specify
The ``--specs-...`` and ``--ipolicy-disk-templates`` options specify
instance policy on the cluster. For the ``--specs-...`` options, each
option can have three values: ``min``, ``max`` and ``std``, which can
also be modified on group level (except for ``std``, which is defined
once for the entire cluster). Please note, that ``std`` values are not
the same as defaults set by ``--beparams``, but they are used for the
capacity calculations. The ``--ipol-disk-templates`` option takes a
capacity calculations. The ``--ipolicy-disk-templates`` option takes a
comma-separated list of disk templates.
- ``--specs-cpu-count`` limits the number of VCPUs that can be used by an
......@@ -517,7 +517,7 @@ comma-separated list of disk templates.
- ``--specs-disk-size`` limits the disk size for every disk used
- ``--specs-mem-size`` limits the amount of memory available
- ``--specs-nic-count`` sets limits on the number of NICs used
- ``--ipol-disk-templates`` limits the allowed disk templates
- ``--ipolicy-disk-templates`` limits the allowed disk templates
For details about how to use ``--hypervisor-state`` and ``--disk-state``
have a look at **ganeti**(7).
......@@ -594,12 +594,12 @@ MODIFY
| [\--specs-disk-size *spec-param*=*value* [,*spec-param*=*value*...]]
| [\--specs-mem-size *spec-param*=*value* [,*spec-param*=*value*...]]
| [\--specs-nic-count *spec-param*=*value* [,*spec-param*=*value*...]]
| [\--ipol-disk-templates *template* [,*template*...]]
| [\--ipolicy-disk-templates *template* [,*template*...]]
Modify the options for the cluster.
The ``--vg-name``, ``--no-lvm-storarge``, ``--enabled-hypervisors``,
The ``--vg-name``, ``--no-lvm-storage``, ``--enabled-hypervisors``,
``-H (--hypervisor-parameters)``, ``-B (--backend-parameters)``,
``-D (--disk-parameters)``, ``--nic-parameters``, ``-C
(--candidate-pool-size)``, ``--maintain-node-health``,
......@@ -631,8 +631,8 @@ The ``-I (--default-iallocator)`` is described in the **init**
command. To clear the default iallocator, just pass an empty string
The ``--specs-...`` and ``--ipol-disk-templates`` options are described
in the **init** command.
The ``--specs-...`` and ``--ipolicy-disk-templates`` options are
described in the **init** command.
See **ganeti(7)** for a description of ``--submit`` and other common
......@@ -1405,7 +1405,7 @@ GROW-DISK
| {*instance*} {*disk*} {*amount*}
Grows an instance's disk. This is only possible for instances having a
plain, drbd or rbd disk template.
plain, drbd, file, sharedfile or rbd disk template.
Note that this command only change the block device size; it will not
grow the actual filesystems, partitions, etc. that live on that
......@@ -1651,7 +1651,7 @@ instance to stop.
The ``--ignore-consistency`` option will make Ganeti ignore any errors
in trying to shutdown the instance on its node; useful if the
hypervisor is broken and you want to recuperate the data.
hypervisor is broken and you want to recover the data.
If ``--ignore-ipolicy`` is given any instance policy violations occuring
during this operation are ignored.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment