Commit 8a9d5dca authored by Pádraig Ó Conbhuí's avatar Pádraig Ó Conbhuí
Browse files

Squashed 'external/phobos/' content from commit a327ed60

git-subtree-dir: external/phobos
git-subtree-split: a327ed60
# Specify a configuration file.
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
# Profiled execution.
# Add files or directories to the blacklist. They should be base names, not
# paths.
# Pickle collected data for later comparisons.
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time. See also the "--disable" option for examples.
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once).You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=I, W, R, import-error, no-name-in-module
# Set the output format. Available formats are text, parseable, colorized, msvs
# (visual studio) and html. You can also give a reporter class, eg
# mypackage.mymodule.MyReporterClass.
# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]".
# Tells whether to display a full report or only the messages
# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables errors warning, statement which
# respectively contain the number of errors / warnings messages and the total
# number of statements analyzed. This is used by the global evaluation report
# (RP0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
# Add a comment according to your evaluation note. This is used by the global
# evaluation report (RP0004).
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details
# Maximum number of characters on a single line.
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Allow the body of an if to be on the same line as the test if there is no
# else.
# List of optional constructs for which whitespace checking is disabled
# Maximum number of lines in a module
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
# tab).
indent-string=' '
# Number of spaces of indent required inside a hanging or continued line.
# Tells whether we should check for unused import in __init__ files.
# A regular expression matching the name of dummy variables (i.e. expectedly
# not used).
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid to define new builtins when possible.
# Required attributes for module, separated by a comma
# List of builtins function names that should not be used, separated by a comma
# Good variable names which should always be accepted, separated by a comma
# Bad variable names which should always be refused, separated by a comma
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
# Include a hint for the correct naming format with invalid-name
# Regular expression matching correct function names
# Naming hint for function names
# Regular expression matching correct variable names
# Naming hint for variable names
# Regular expression matching correct constant names
# Naming hint for constant names
# Regular expression matching correct attribute names
# Naming hint for attribute names
# Regular expression matching correct argument names
# Naming hint for argument names
# Regular expression matching correct class attribute names
# Naming hint for class attribute names
# Regular expression matching correct inline iteration names
# Naming hint for inline iteration names
# Regular expression matching correct class names
# Naming hint for class names
# Regular expression matching correct module names
# Naming hint for module names
# Regular expression matching correct method names
# Naming hint for method names
# Regular expression which should only match function or class names that do
# not require a docstring.
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
# Logging modules to check that the string format arguments are in logging
# function parameter format
# List of note tags to take in consideration, separated by a comma.
# Minimum lines number of a similarity.
# Ignore comments when computing similarities.
# Ignore docstrings when computing similarities.
# Ignore imports when computing similarities.
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis
# List of classes names for which member attributes should not be checked
# (useful for classes with attributes dynamically set).
# When zope mode is activated, add a predefined set of Zope acquired attributes
# to generated-members.
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E0201 when accessed. Python regular
# expressions are accepted.
# List of interface methods to ignore, separated by a comma. This is used for
# instance to not check methods defines in Zope's Interface base class.
# List of method names used to declare (i.e. assign) instance attributes.
# List of valid names for the first argument in a class method.
# List of valid names for the first argument in a metaclass class method.
# Maximum number of arguments for function / method
# Argument names that match this expression will be ignored. Default to name
# with leading underscore
# Maximum number of locals for function / method body
# Maximum number of return / yield for function / method body
# Maximum number of branch for function / method body
# Maximum number of statements in function / method body
# Maximum number of parents for a class (see R0901).
# Maximum number of attributes for a class (see R0902).
# Minimum number of public methods for a class (see R0903).
# Maximum number of public methods for a class (see R0904).
# Deprecated modules which should not be used, separated by a comma
# Create a graph of every (i.e. internal and external) dependencies in the
# given file (report RP0402 must not be disabled)
# Create a graph of external dependencies in the given file (report RP0402 must
# not be disabled)
# Create a graph of internal dependencies in the given file (report RP0402 must
# not be disabled)
# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
Detailed list of changes since phobos 1.0:
scripts: phobos 1.0 to 1.1 DB conversion
Adds a simple script '' to convert DB schema
from phobos 1.0 to phobos 1.1.
doc/config: add store's 'layout' parameter to config template
Add store's 'layout' parameter to config template.
This parameter determines which layout must be used for put operations.
layout: implement replication module
Add raid1 module that replicates an object N times across N media.
Rework test_store slightly so that the test suite can invoke it repeatedly using
different layouts.
Phobos-Issue: PHO-58
Fix dead code in
The GET tests were not executed because the extents were deleted before the
test had any chance to browse and check them.
common: implement pho_ht_foreach
new iterator over entries of a GHashTable that can be interrupted by
a callback returning a non-zero value. Such a value is propagated back
to the caller.
common: add comments to the SAJ module
Phobos-Issue: PHO-135
ldm: fix memory leak
unconditionally release result of realpath() and manually
assign errno in case a function fails w/o setting it.
Retrieve fs label at format and check it at mount
Make sure that a filesystem (especially LTFS) that was mounted is the expected
one. Achieve this by (optionally) comparing the FS label at mount time against
the one stored in DSS, retrieved after formatting the medium.
Phobos-Issue: PHO-57
Introduce FS label field into media_info
Introduce a new fs_label field into DSS media description.
Group filesystem related informations into a struct media_fs.
This value (null-terminated, possibly empty) string will be used to
compare the expected value to what is actually mounted to ensure system
Phobos-Issue: PHO-57
Introduce .fs_get_label in LDM fs operations
Allow LDM callers to retrieve the label of a mounted filesystem.
Use the ltfs.volumeName xattr facility for LTFS and a hidden file for
Phobos-Issue: PHO-57
doc: fix file mode
Remove executable bit that was set by mistake
ldm: fix typo in comment
scripts: indentation fixes in pho_*_helper
Replaced all tabs by spaces for consistency.
dss: prevent printf from receiving null params
layout: introduce new layout management layer
Layout modules are autonomous implementations of a given layout type.
They abstract actual object layouts by translating data xfer requests
into corresponding storage resources and manipulation.
Although the layout code is interleaved with the store state machine, layout
can be seen as an interface between store and {LRS, IO}.
Phobos-Issue: PHO-121
lrs: tag unwritable media as full
LTFS has been observed to mount almost-full tapes as read-only. When
this happens, tag the media as full and retry. Update LRS device
selection logic accordingly.
One problem we have here is that there is no easy way to identify
R/O-FS before linux 2.6.36 (ie. before RHEL7). Therefore, only rhel7
will benefit from early detection. Older platforms will have to go
through mput and watch it fail.
If at least one slice of an mput fails with impossibility to further
write on the media we mark the media as full. Note that no retry is
attempted at this step.
Phobos-Issue: PHO-129
lib scsi: search a free slot to unload drive if none is specified
In some cases (e.g. after library power reset) the library doesn't provide
a source slot number for tapes loaded in drives.
In this case, we must search for an empty slot where the tape can be moved.
Completed test_scsi to check this case.
Also fixed it to properly handle drive serials.
tests: add status check in test_scsi
Check that the drive or slot status after a move_medium operation
is the expected one.
Also handle the case when no tape is seen in the library (neither
in slots nor in drives).
lrs: added extra information to log message.
Add the available size on a media to a verbose level log message
so we can better keep track of space-related issues.
lrs: release device on write-prepare failure
A device was allocated by the get_write_res() function that must
be released on error.
ldm: used signed types to represent media space
Both are big enough to not overflow but unsigned types can easily
lead to miscalculation of available space if a difference returns
a "negative" result.
This has been observed in the 5% margin calculation, in
Phobos-Issue: PHO-129
doc: update layout design
Reduce exposed APIs and get rid of GLI.
- libpho_layout: init/declare/acquire/fini
- libpho_layout_mod_xxx: {de}register
- layout implementation: compose/io/commit
dss: replace layout_type by a module description
Introduce module description (name, major, minor, attrs) and store it into DSS
as layout information instead of an empty array. Add the appropriate
encoding/decoding functions.
Remove layout_type (and copy_num) which are no longer needed.
Note that this commit changes the DSS DB schema w/o providing a conversion tool.
This will come before the next release in order to provide compatibility and
ease upgrade of existing instances.
dss: rework json parsing helpers
Use consistent return values and signed types. Add a couple macro to simplify
the code.
dss: use signed integer to represent media stats and extent.
Unsigned integers are cumbersome and useless here.
cli: Fix inheritance in DSS object managers
phobos::dss:MediaManager and phobos::dss:DeviceManager classes operate
on wrapped objects, although their parent class does not and manipulates
raw SWIG structures.
Add the missing ::delete methods appropriately so as to invoke the
underlying function with the expected argument.
doc: add a template configuration.
Add a template configuration with comments.
Included to the RPM, it is initially installed
as "/etc/phobos.conf" (if it does not already exists).
Else it will be installed as /etc/phobos.conf.rpmnew
doc: Update developer README.
PKG_CONFIG_PATH must be set with the right postgres version.
cfg: each module defines its own configuration.
Configuration variables and default values were previously
defined in single centralized header. These values are now
defined independantly by each module. This prepares the
support of dynamically loaded modules so they can define their
own parameters.
cli: Do not emit empty filters
Prevent the python dss filter converter from emitting empty filters and optimize
these that only contain a single element.