Commit e4f4896b authored by Guido Trotter's avatar Guido Trotter
Browse files

Merge branch 'devel-2.5'



* devel-2.5: (33 commits)
  htools: remove dead code
  hail: don't select the primary as new secondary
  hail: add an extra safety check in relocate
  Fix RAPI documentation for gnt-instance console
  Add SPICE compression and streaming options
  Add SPICE support to gnt-instance console
  Make KVM use the QXL vga driver with SPICE
  Use a loop to check SPICE parameters dependency
  import: Fix a logic error due to missing "not"
  import: Make sure the disk_dump path is in EXPORT_DIR
  Switch other commonprefix to IsBelowDir
  utils: Introduce IsBelowDir
  Fixed a typo in gnt_cluster.py
  Added password for SPICE sessions
  Draft implementation of QMP connection
  Pylint fixes for autogenerated files
  Version bump for 2.5.0~beta3
  Makefile: Use $(LN_S) instead of “ln -s”
  Fixes to errors/warnings raised by pylint 0.24
  PEP8 for QA
  ...

Conflicts:
	Makefile.am
          - preserve both changes
	lib/rapi/rlib2.py
          - keep master version
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parents 4f6396fd 6804faa0
......@@ -455,6 +455,7 @@ qa_scripts = \
qa/qa_daemon.py \
qa/qa_env.py \
qa/qa_error.py \
qa/qa_group.py \
qa/qa_instance.py \
qa/qa_node.py \
qa/qa_os.py \
......@@ -633,6 +634,8 @@ TEST_FILES = \
test/data/proc_drbd8.txt \
test/data/proc_drbd80-emptyline.txt \
test/data/proc_drbd83.txt \
test/data/proc_drbd83_sync.txt \
test/data/proc_drbd83_sync_krnl2.6.39.txt \
test/data/sys_drbd_usermode_helper.txt \
test/import-export_unittest-helper
......@@ -773,6 +776,17 @@ standalone_python_modules = \
lib/rapi/client.py \
tools/ganeti-listrunner
pep8_python_code = \
ganeti \
ganeti/http/server.py \
$(dist_sbin_SCRIPTS) \
$(dist_tools_PYTHON) \
$(pkglib_python_scripts) \
$(BUILD_BASH_COMPLETION) \
$(DOCPP) \
$(PYTHON_BOOTSTRAP) \
qa
test/daemon-util_unittest.bash: daemons/daemon-util
test/ganeti-cleaner_unittest.bash: daemons/ganeti-cleaner
......@@ -885,7 +899,7 @@ lib/_autoconf.py: Makefile | lib/.dir
echo ''; \
echo '"""'; \
echo ''; \
echo '# pylint: disable-msg=C0301,C0324'; \
echo '# pylint: disable=C0301,C0324'; \
echo '# because this is autogenerated, we do not want'; \
echo '# style warnings' ; \
echo ''; \
......@@ -951,7 +965,7 @@ lib/_vcsversion.py: Makefile vcs-version | lib/.dir
echo ''; \
echo '"""'; \
echo ''; \
echo '# pylint: disable-msg=C0301,C0324'; \
echo '# pylint: disable=C0301,C0324'; \
echo '# because this is autogenerated, we do not want'; \
echo '# style warnings' ; \
echo ''; \
......@@ -1000,7 +1014,7 @@ $(PYTHON_BOOTSTRAP): Makefile | $(all_dirfiles)
echo; \
echo '"""Bootstrap script for L{$(MODULE)}"""'; \
echo; \
echo '# pylint: disable-msg=C0103'; \
echo '# pylint: disable=C0103'; \
echo '# C0103: Invalid name'; \
echo; \
echo 'import sys'; \
......@@ -1009,9 +1023,9 @@ $(PYTHON_BOOTSTRAP): Makefile | $(all_dirfiles)
echo '# Temporarily alias commands until bash completion'; \
echo '# generator is changed'; \
echo 'if hasattr(main, "commands"):'; \
echo ' commands = main.commands # pylint: disable-msg=E1101'; \
echo ' commands = main.commands # pylint: disable=E1101'; \
echo 'if hasattr(main, "aliases"):'; \
echo ' aliases = main.aliases # pylint: disable-msg=E1101'; \
echo ' aliases = main.aliases # pylint: disable=E1101'; \
echo; \
echo 'if __name__ == "__main__":'; \
echo ' sys.exit(main.Main())'; \
......@@ -1095,7 +1109,7 @@ lint: $(BUILT_SOURCES)
echo '"pep8" not found during configure' >&2; \
else \
$(PEP8) --repeat --ignore='$(PEP8_IGNORE)' --exclude='$(PEP8_EXCLUDE)' \
$(lint_python_code); \
$(pep8_python_code); \
fi
$(PYLINT) $(LINT_OPTS) $(lint_python_code)
cd $(top_srcdir)/qa && \
......@@ -1187,7 +1201,7 @@ hs-apidoc: $(HS_BUILT_SRCS)
rm -rf $(APIDOC_HS_DIR)/*
@mkdir_p@ $(APIDOC_HS_DIR)/Ganeti/HTools/Program
$(HSCOLOUR) -print-css > $(APIDOC_HS_DIR)/Ganeti/hscolour.css
ln -s ../hscolour.css $(APIDOC_HS_DIR)/Ganeti/HTools/hscolour.css
$(LN_S) ../hscolour.css $(APIDOC_HS_DIR)/Ganeti/HTools/hscolour.css
set -e ; \
cd htools; \
if [ "$(HTOOLS_NOCURL)" ]; \
......@@ -1239,7 +1253,7 @@ hs-coverage: $(haskell_tests)
@mkdir_p@ $(COVERAGE_HS_DIR)
hpc markup --destdir=$(COVERAGE_HS_DIR) htools/test $(HPCEXCL)
hpc report htools/test $(HPCEXCL)
ln -sf hpc_index.html $(COVERAGE_HS_DIR)/index.html
$(LN_S) -f hpc_index.html $(COVERAGE_HS_DIR)/index.html
# Special "kind-of-QA" target for htools, needs special setup (all
# tools compiled with -fhpc)
......@@ -1247,7 +1261,7 @@ hs-coverage: $(haskell_tests)
live-test: all
set -e ; \
cd htools; \
rm -f .hpc; ln -s ../.hpc .hpc; \
rm -f .hpc; $(LN_S) ../.hpc .hpc; \
rm -f *.tix *.mix; \
./live-test.sh; \
hpc sum --union $(HPCEXCL) $(addsuffix .tix,$(HS_PROGS:htools/%=%)) \
......
News
====
Version 2.5.0 beta2
Version 2.5.0 beta3
-------------------
*(Released Mon, 22 Aug 2011)*
*(Released Wed, 31 Aug 2011)*
Incompatible/important changes and bugfixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -85,6 +85,7 @@ New features
is offline.
- Opcodes have a new ``comment`` attribute.
- Added basic SPICE support to KVM hypervisor.
- ``tools/ganeti-listrunner`` allows passing of arguments to executable.
Node group improvements
~~~~~~~~~~~~~~~~~~~~~~~
......@@ -128,6 +129,14 @@ Misc
- DRBD metadata volumes are overwritten with zeros during disk creation.
Version 2.5.0 beta2
-------------------
*(Released Mon, 22 Aug 2011)*
This was the second beta release of the 2.5 series.
Version 2.5.0 beta1
-------------------
......@@ -136,6 +145,18 @@ Version 2.5.0 beta1
This was the first beta release of the 2.5 series.
Version 2.4.4
-------------
*(Released Tue, 23 Aug 2011)*
Small bug-fixes:
- Fixed documentation for importing with ``--src-dir`` option
- Fixed a bug in ``ensure-dirs`` with queue/archive permissions
- Fixed a parsing issue with DRBD 8.3.11 in the Linux kernel
Version 2.4.3
-------------
......@@ -167,7 +188,7 @@ Many bug-fixes and a few small features:
- Fixed off-by-one bug in job serial generation
- ``gnt-node volumes``: Fix instance names
- Fixed aliases in bash completion
- Fixed a bug in reopening log files after beeing sent a SIGHUP
- Fixed a bug in reopening log files after being sent a SIGHUP
- Added a flag to burnin to allow specifying VCPU count
- Bugfixes to non-root Ganeti configuration
......
......@@ -23,7 +23,7 @@
"""
# pylint: disable-msg=C0103
# pylint: disable=C0103
# [C0103] Invalid name build-bash-completion
import os
......@@ -246,7 +246,7 @@ class CompletionWriter:
for opt in opts:
# While documented, these variables aren't seen as public attributes by
# pylint. pylint: disable-msg=W0212
# pylint. pylint: disable=W0212
opt.all_names = sorted(opt._short_opts + opt._long_opts)
invalid = list(itertools.ifilterfalse(_OPT_NAME_RE.match, opt.all_names))
......
......@@ -2,7 +2,7 @@
m4_define([gnt_version_major], [2])
m4_define([gnt_version_minor], [5])
m4_define([gnt_version_revision], [0])
m4_define([gnt_version_suffix], [~beta2])
m4_define([gnt_version_suffix], [~beta3])
m4_define([gnt_version_full],
m4_format([%d.%d.%d%s],
gnt_version_major, gnt_version_minor,
......
......@@ -23,7 +23,7 @@
"""
# pylint: disable-msg=C0103
# pylint: disable=C0103
# C0103: Invalid name import-export
import errno
......@@ -353,7 +353,7 @@ def ParseOptions():
@return: Arguments to program
"""
global options # pylint: disable-msg=W0603
global options # pylint: disable=W0603
parser = optparse.OptionParser(usage=("%%prog <status-file> {%s|%s}" %
(constants.IEM_IMPORT,
......@@ -587,7 +587,7 @@ def main():
errmsg = "Exited with status %s" % (child.returncode, )
status_file.SetExitStatus(child.returncode, errmsg)
except Exception, err: # pylint: disable-msg=W0703
except Exception, err: # pylint: disable=W0703
logging.exception("Unhandled error occurred")
status_file.SetExitStatus(constants.EXIT_FAILURE,
"Unhandled error occurred: %s" % (err, ))
......
......@@ -391,16 +391,16 @@ parameters as such:
- ``root_path`` to a valid setting (e.g. ``/dev/xvda1``)
- ``bootloader_path`` and ``bootloader_args`` to empty
Alternatively, you can delete the kernel management to instances, and
Alternatively, you can delegate the kernel management to instances, and
use either ``pvgrub`` or the deprecated ``pygrub``. For this, you must
install the kernels and initrds in the instance, and create a valid grub
install the kernels and initrds in the instance and create a valid GRUB
v1 configuration file.
For ``pvgrub`` (new in version 2.4.2), you need to set:
- ``kernel_path`` to point to the ``pvgrub`` loader present on the node
(e.g. ``/usr/lib/xen/boot/pv-grub-x86_32.gz``)
- ``kernel_args`` to the path to the grub config file, relative to the
- ``kernel_args`` to the path to the GRUB config file, relative to the
instance (e.g. ``(hd0,0)/grub/menu.lst``)
- ``root_path`` **must** be empty
- ``bootloader_path`` and ``bootloader_args`` to empty
......
......@@ -48,7 +48,7 @@ Here are some usage examples::
# Pin vCPU 0 to any CPU, vCPU 1 to CPUs 1, 3, 4 or 5, and CPU 2 to
# CPU 0
gnt-instance modify -H cpu_mask=all:1\\,3-4:0 my-inst
gnt-instance modify -H cpu_mask=all:1\\,3-5:0 my-inst
# Pin entire VM to CPU 0
gnt-instance modify -H cpu_mask=0 my-inst
......@@ -56,13 +56,13 @@ Here are some usage examples::
# Turn off CPU pinning (default setting)
gnt-instance modify -H cpu_mask=all my-inst
Assuming an instance has 2 vCPUs, the following commands will fail::
Assuming an instance has 3 vCPUs, the following commands will fail::
# not enough mappings
gnt-instance modify -H cpu_mask=0 my-inst
gnt-instance modify -H cpu_mask=0:1 my-inst
# too many
gnt-instance modify -H cpu_mask=2:1:1 my-inst
gnt-instance modify -H cpu_mask=2:1:1:all my-inst
Validation
----------
......@@ -102,8 +102,8 @@ indicated by CPU pinning information, instance failover will fail.
In case of emergency, to force failover to ignore mismatching CPU
information, the following switch can be used:
``gnt-instance failover --ignore-cpu-mismatch my-inst``.
This command will try to fail the instance with the current cpu mask,
``gnt-instance failover --fix-cpu-mismatch my-inst``.
This command will try to failover the instance with the current cpu mask,
but if that fails, it will change the mask to be "all".
Migration
......@@ -127,8 +127,7 @@ Configuration file
------------------
The pinning information is kept for each instance's hypervisor
params section of the configuration file as
``cpu_mask: [ [ a ], [ b, c ], [ d ] ]``
params section of the configuration file as the original string.
Xen
---
......
......@@ -960,20 +960,23 @@ console. Contained keys:
constants.CONS_MESSAGE,
constants.CONS_SSH,
constants.CONS_VNC,
constants.CONS_SPICE,
])
``instance``
Instance name.
``kind``
Console type, one of :pyeval:`constants.CONS_SSH`,
:pyeval:`constants.CONS_VNC` or :pyeval:`constants.CONS_MESSAGE`.
:pyeval:`constants.CONS_VNC`, :pyeval:`constants.CONS_SPICE`
or :pyeval:`constants.CONS_MESSAGE`.
``message``
Message to display (:pyeval:`constants.CONS_MESSAGE` type only).
``host``
Host to connect to (:pyeval:`constants.CONS_SSH` and
:pyeval:`constants.CONS_VNC` only).
Host to connect to (:pyeval:`constants.CONS_SSH`,
:pyeval:`constants.CONS_VNC` or :pyeval:`constants.CONS_SPICE` only).
``port``
TCP port to connect to (:pyeval:`constants.CONS_VNC` only).
TCP port to connect to (:pyeval:`constants.CONS_VNC` or
:pyeval:`constants.CONS_SPICE` only).
``user``
Username to use (:pyeval:`constants.CONS_SSH` only).
``command``
......
......@@ -61,7 +61,6 @@ module Ganeti.HTools.Cluster
, tryAlloc
, tryMGAlloc
, tryReloc
, tryEvac
, tryNodeEvac
, tryChangeGroup
, collapseFailures
......@@ -811,45 +810,6 @@ tryReloc _ _ _ reqn _ = fail $ "Unsupported number of relocation \
\destinations required (" ++ show reqn ++
"), only one supported"
-- | Change an instance's secondary node.
evacInstance :: (Monad m) =>
[Ndx] -- ^ Excluded nodes
-> Instance.List -- ^ The current instance list
-> (Node.List, AllocSolution) -- ^ The current state
-> Idx -- ^ The instance to evacuate
-> m (Node.List, AllocSolution)
evacInstance ex_ndx il (nl, old_as) idx = do
-- FIXME: hardcoded one node here
-- Longer explanation: evacuation is currently hardcoded to DRBD
-- instances (which have one secondary); hence, even if the
-- IAllocator protocol can request N nodes for an instance, and all
-- the message parsing/loading pass this, this implementation only
-- supports one; this situation needs to be revisited if we ever
-- support more than one secondary, or if we change the storage
-- model
new_as <- tryReloc nl il idx 1 ex_ndx
case asSolutions new_as of
-- an individual relocation succeeded, we kind of compose the data
-- from the two solutions
csol@(nl', _, _, _):_ ->
return (nl', new_as { asSolutions = csol:asSolutions old_as })
-- this relocation failed, so we fail the entire evac
_ -> fail $ "Can't evacuate instance " ++
Instance.name (Container.find idx il) ++
": " ++ describeSolution new_as
-- | Try to evacuate a list of nodes.
tryEvac :: (Monad m) =>
Node.List -- ^ The node list
-> Instance.List -- ^ The instance list
-> [Idx] -- ^ Instances to be evacuated
-> [Ndx] -- ^ Restricted nodes (the ones being evacuated)
-> m AllocSolution -- ^ Solution list
tryEvac nl il idxs ex_ndx = do
(_, sol) <- foldM (evacInstance ex_ndx il) (nl, emptyAllocSolution) idxs
return sol
-- | Function which fails if the requested mode is change secondary.
--
-- This is useful since except DRBD, no other disk template can
......@@ -1107,10 +1067,11 @@ tryNodeEvac _ ini_nl ini_il mode idxs =
splitCluster ini_nl ini_il
(fin_nl, fin_il, esol) =
foldl' (\state@(nl, il, _) inst ->
let gdx = instancePriGroup nl inst in
let gdx = instancePriGroup nl inst
pdx = Instance.pNode inst in
updateEvacSolution state (Instance.idx inst) $
availableGroupNodes group_ndx
excl_ndx gdx >>=
(IntSet.insert pdx excl_ndx) gdx >>=
nodeEvacInstance nl il mode inst gdx
)
(ini_nl, ini_il, emptyEvacSolution)
......
......@@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
module Ganeti.HTools.IAlloc
( readRequest
, runIAllocator
, processRelocate
) where
import Data.Either ()
......@@ -283,6 +284,8 @@ processRelocate gl nl il idx 1 exndx = do
snode = Instance.sNode inst
when (snode == sorig) $
fail "Internal error: instance didn't change secondary node?!"
when (snode == pnode) $
fail "Internal error: selected primary as new secondary?!"
nodes' <- if (nodes == [pnode, snode])
then return [snode] -- only the new secondary is needed
......
......@@ -908,8 +908,9 @@ prop_ClusterAllocEvac node inst =
(xnl, xi, _, _):[] ->
let sdx = Instance.sNode xi
il' = Container.add (Instance.idx xi) xi il
in case Cluster.tryEvac xnl il' [Instance.idx xi] [sdx] of
Just _ -> True
in case IAlloc.processRelocate defGroupList xnl il'
(Instance.idx xi) 1 [sdx] of
Types.Ok _ -> True
_ -> False
_ -> False
......
......@@ -26,7 +26,7 @@ import asyncore
import logging
try:
# pylint: disable-msg=E0611
# pylint: disable=E0611
from pyinotify import pyinotify
except ImportError:
import pyinotify
......@@ -42,7 +42,7 @@ class AsyncNotifier(asyncore.file_dispatcher):
"""An asyncore dispatcher for inotify events.
"""
# pylint: disable-msg=W0622,W0212
# pylint: disable=W0622,W0212
def __init__(self, watch_manager, default_proc_fun=None, map=None):
"""Initializes this class.
......@@ -90,7 +90,7 @@ class FileEventHandlerBase(pyinotify.ProcessEvent):
@param watch_manager: inotify watch manager
"""
# pylint: disable-msg=W0231
# pylint: disable=W0231
# no need to call the parent's constructor
self.watch_manager = watch_manager
......@@ -168,7 +168,7 @@ class SingleFileEventHandler(FileEventHandlerBase):
if self._watch_handle is not None and self.RemoveWatch(self._watch_handle):
self._watch_handle = None
# pylint: disable-msg=C0103
# pylint: disable=C0103
# this overrides a method in pyinotify.ProcessEvent
def process_IN_IGNORED(self, event):
# Since we monitor a single file rather than the directory it resides in,
......@@ -182,7 +182,7 @@ class SingleFileEventHandler(FileEventHandlerBase):
self._watch_handle = None
self._callback(False)
# pylint: disable-msg=C0103
# pylint: disable=C0103
# this overrides a method in pyinotify.ProcessEvent
def process_IN_MODIFY(self, event):
# This gets called when the monitored file is modified. Note that this
......
......@@ -28,7 +28,7 @@
"""
# pylint: disable-msg=E1103
# pylint: disable=E1103
# E1103: %s %r has no %r member (but some types could not be
# inferred), because the _TryOSFromDisk returns either (True, os_obj)
......@@ -412,7 +412,7 @@ def LeaveCluster(modify_ssh_setup):
utils.RemoveFile(constants.CONFD_HMAC_KEY)
utils.RemoveFile(constants.RAPI_CERT_FILE)
utils.RemoveFile(constants.NODED_CERT_FILE)
except: # pylint: disable-msg=W0702
except: # pylint: disable=W0702
logging.exception("Error while removing cluster secrets")
result = utils.RunCmd([constants.DAEMON_UTIL, "stop", constants.CONFD])
......@@ -668,7 +668,7 @@ def GetBlockDevSizes(devices):
blockdevs = {}
for devpath in devices:
if os.path.commonprefix([DEV_PREFIX, devpath]) != DEV_PREFIX:
if not utils.IsBelowDir(DEV_PREFIX, devpath):
continue
try:
......@@ -1340,7 +1340,7 @@ def BlockdevCreate(disk, size, owner, on_primary, info):
"""
# TODO: remove the obsolete "size" argument
# pylint: disable-msg=W0613
# pylint: disable=W0613
clist = []
if disk.children:
for child in disk.children:
......@@ -1352,7 +1352,7 @@ def BlockdevCreate(disk, size, owner, on_primary, info):
# we need the children open in case the device itself has to
# be assembled
try:
# pylint: disable-msg=E1103
# pylint: disable=E1103
crdev.Open()
except errors.BlockDeviceError, err:
_Fail("Can't make child '%s' read-write: %s", child, err)
......@@ -1568,7 +1568,7 @@ def BlockdevAssemble(disk, owner, as_primary, idx):
try:
result = _RecursiveAssembleBD(disk, owner, as_primary)
if isinstance(result, bdev.BlockDev):
# pylint: disable-msg=E1103
# pylint: disable=E1103
result = result.dev_path
if as_primary:
_SymlinkBlockDev(owner, result, idx)
......@@ -2507,8 +2507,8 @@ def _TransformFileStorageDir(fs_dir):
fs_dir = os.path.normpath(fs_dir)
base_fstore = cfg.GetFileStorageDir()
base_shared = cfg.GetSharedFileStorageDir()
if ((os.path.commonprefix([fs_dir, base_fstore]) != base_fstore) and
(os.path.commonprefix([fs_dir, base_shared]) != base_shared)):
if not (utils.IsBelowDir(base_fstore, fs_dir) or
utils.IsBelowDir(base_shared, fs_dir)):
_Fail("File storage directory '%s' is not under base file"
" storage directory '%s' or shared storage directory '%s'",
fs_dir, base_fstore, base_shared)
......@@ -2875,12 +2875,12 @@ def _GetImportExportIoCommand(instance, mode, ieio, ieargs):
if not utils.IsNormAbsPath(filename):
_Fail("Path '%s' is not normalized or absolute", filename)
directory = os.path.normpath(os.path.dirname(filename))
real_filename = os.path.realpath(filename)
directory = os.path.dirname(real_filename)
if (os.path.commonprefix([constants.EXPORT_DIR, directory]) !=
constants.EXPORT_DIR):
_Fail("File '%s' is not under exports directory '%s'",
filename, constants.EXPORT_DIR)
if not utils.IsBelowDir(constants.EXPORT_DIR, real_filename):
_Fail("File '%s' is not under exports directory '%s': %s",
filename, constants.EXPORT_DIR, real_filename)
# Create directory
utils.Makedirs(directory, mode=0750)
......@@ -3322,7 +3322,7 @@ def PowercycleNode(hypervisor_type):
# ensure the child is running on ram
try:
utils.Mlockall()
except Exception: # pylint: disable-msg=W0703
except Exception: # pylint: disable=W0703
pass
time.sleep(5)
hyper.PowercycleNode()
......@@ -3347,7 +3347,7 @@ class HooksRunner(object):
hooks_base_dir = constants.HOOKS_BASE_DIR
# yeah, _BASE_DIR is not valid for attributes, we use it like a
# constant
self._BASE_DIR = hooks_base_dir # pylint: disable-msg=C0103
self._BASE_DIR = hooks_base_dir # pylint: disable=C0103
def RunHooks(self, hpath, phase, env):
"""Run the scripts in the hooks directory.
......
......@@ -791,7 +791,10 @@ class DRBD8Status(object):
LINE_RE = re.compile(r"\s*[0-9]+:\s*cs:(\S+)\s+(?:st|ro):([^/]+)/(\S+)"
"\s+ds:([^/]+)/(\S+)\s+.*$")
SYNC_RE = re.compile(r"^.*\ssync'ed:\s*([0-9.]+)%.*"
"\sfinish: ([0-9]+):([0-9]+):([0-9]+)\s.*$")
# Due to a bug in drbd in the kernel, introduced in
# commit 4b0715f096 (still unfixed as of 2011-08-22)
"(?:\s|M)"
"finish: ([0-9]+):([0-9]+):([0-9]+)\s.*$")
CS_UNCONFIGURED = "Unconfigured"
CS_STANDALONE = "StandAlone"
......@@ -886,7 +889,7 @@ class DRBD8Status(object):
self.est_time = None
class BaseDRBD(BlockDev): # pylint: disable-msg=W0223
class BaseDRBD(BlockDev): # pylint: disable=W0223
"""Base DRBD class.
This class contains a few bits of common functionality between the
......@@ -1762,7 +1765,7 @@ class DRBD8(BaseDRBD):
"""
# TODO: Rewrite to not use a for loop just because there is 'break'
# pylint: disable-msg=W0631
# pylint: disable=W0631
net_data = (self._lhost, self._lport, self._rhost, self._rport)
for minor in (self._aminor,):
info = self._GetDevInfo(self._GetShowData(minor))
......
......@@ -242,7 +242,7 @@ def _InitFileStorage(file_storage_dir):
return file_storage_dir
def InitCluster(cluster_name, mac_prefix, # pylint: disable-msg=R0913
def InitCluster(cluster_name, mac_prefix, # pylint: disable=R0913
master_netdev, file_storage_dir, shared_file_storage_dir,
candidate_pool_size, secondary_ip=None, vg_name=None,
beparams=None, nicparams=None, ndparams=None, hvparams=None,
......
......@@ -42,7 +42,7 @@ from ganeti import opcodes
from ganeti import ht
from ganeti import rapi
import ganeti.rapi.rlib2 # pylint: disable-msg=W0611
import ganeti.rapi.rlib2 # pylint: disable=W0611
COMMON_PARAM_NAMES = map(compat.fst, opcodes.OpCode.OP_PARAMS)
......@@ -213,7 +213,7 @@ def PythonEvalRole(role, rawtext, text, lineno, inliner,
The expression's result is included as a literal.
"""
# pylint: disable-msg=W0102,W0613,W0142
# pylint: disable=W0102,W0613,W0142
# W0102: Dangerous default value as argument
# W0142: Used * or ** magic
# W0613: Unused argument
......@@ -222,7 +222,7 @@ def PythonEvalRole(role, rawtext, text, lineno, inliner,
try:
result = eval(code, EVAL_NS)
except Exception, err: # pylint: disable-msg=W0703
except Exception, err: # pylint: disable=W0703
msg = inliner.reporter.error("Failed to evaluate %r: %s" % (code, err),
line=lineno)
return ([inliner.problematic(rawtext, rawtext, msg)], [msg])
......
......@@ -259,7 +259,7 @@ _PRIONAME_TO_VALUE = dict(_PRIORITY_NAMES)
class _Argument:
def __init__(self, min=0, max=None): # pylint: disable-msg=W0622
def __init__(self, min=0, max=None): # pylint: disable=W0622
self.min = min
self.max = max
......@@ -274,7 +274,7 @@ class ArgSuggest(_Argument):
Value can be any of the ones passed to the constructor.
"""
# pylint: disable-msg=W0622
# pylint: disable=W0622