It was incorrectly documented as calling the setup function. It was
also vague on how the environment was reset.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
And undocumented. It may be useful for debugging but it would have to be
properly implemented instead of being half commented out.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Specified crush-ruleset-name is required to exist, implicit creation is
going to happen only if crush-ruleset-name wasn't specified on the
command line. While at it, pool-name is very much a required param.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
CrushWrapper::get_osd_pool_default_crush_replicated_ruleset() returns
-1 on error. Returning -EPERM for "No suitable CRUSH ruleset exists"
is wrong.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Validate osd_pool_default_crush_{replicated_ruleset,rule} config
options, in particular when creating pools. Otherwise "ceph osd pool
create foo <pg_num>" may end up creating pools with non-existent
rulesets.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Use id provided by osd_pool_default_crush_{replicated_ruleset,rule}
config options when creating a simple replicated ruleset for an initial
osdmap instead of always making it ruleset 0. Not doing so may leave
default created pools (currently "rbd") in a broken state with their
crush_ruleset pointing to a non-existent ruleset.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
In TEST_default_deprectated_*(), make expected/unexpected vars local
and actually check that rbd, being a default created pool, is set to
use the ruleset specified by conf.
INVALIDRULESET thing in TEST_replicated_pool() is redundant - it is
checked in TEST_replicated_pool_with_ruleset() a bit earlier.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
First cut for a `ceph-release-notes` script added which looks at merge
commits and picks out issue numbers. Though this ideally suits for
backport releases workflow where the commit messages always follow a
specific pattern, it is partly useful for preparing release notes for
normal releases as well.
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
systemd/ceph-osd@.service is now auto-generated by autotools.
This means the file should be added to gitignored list.
Signed-off-by: Owen Synge <osynge@suse.com>
Helper method to handle passing fatal errors generated within
librbd (not from the OSDs) back to the client.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Enqueue all AIO API methods within the new librbd thread pool to
reduce the possibility of any blocking operations. To maintain
backwards compatibility with the legacy return codes of the API's
AIO methods, it's still possible to block attempting to acquire
the snap_lock.
Fixes: #11056
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
* use HOWTO_monitor_the_automated_tests_AKA_nightlies to explain the nightlies
* replace references to Serverity with Backport tracker
* add links to the backporter manual and the release page
* s/0.95/9.0.0/
* unify release names to be lowercase
* replace lifecycle with release cycle and end of life with retirement
* Prefer LTS or Long Term Stable over Long Term Support
Signed-off-by: Loic Dachary <ldachary@redhat.com>
The libexec path is different for different distributions.
systemd. This path is defined by a new variable on the
configure path.
This variable can be set with enviroment SYSTEMD_LIBEXEC_DIR.
The parameter --with-systemd-libexec-dir overrides the enviroment
variable.
Appropriate conditionals are set for SUSE and RHEL derivatives.
This is then used to template out systemd/ceph-osd@.service
Signed-off-by: Owen Synge <osynge@suse.com>
...not very elegantly because this is bash, but
at least check the expected value is somewhere
present in the JSON output.
Signed-off-by: John Spray <john.spray@redhat.com>
This was using an array_section so we were getting
a list of only the times, instead of an array
mapping addr to time.
Signed-off-by: John Spray <john.spray@redhat.com>
The error stream in the erasure code path is broken and the error
message is sometime not reported back to the user. For instance the
ErasureCodePlugin::factory method has no error stream: when an error
happens the user is left with a cryptic error code that needs lookup in
the sources to figure it out.
The error stream is made more systematic by:
* always pass it as ostream *ss (instead of something passing it as
a reference and sometime as a stringstream)
* ostream *ss is added to ErasureCodePlugin::factory
* define the ErasureCodeInterface::init pure virtual. It is
already implemented by all plugins, only in slightly different
ways. The ostream *ss is added so the init function has a way to
report error in a human readable way to the caller, in addition to
the error code.
The ErasureCodePluginJerasure::init return value was incorrectly ignored
when called from ErasureCodePluginJerasure::factory and now returns when
it fails.
The ErasureCodeLrc::layers_init method is given ostream *ss for error
messages instead of printing them via derr.
The ErasureCodePluginLrc::factory method no longer prints errors via
derr: this workaround is made unnecessary by the ostream *ss argument.
The ErasureCodeShec::init ostream *ss argument is ignored. The
ErasureCodeShec::parse method entirely relies on derr to report errors
and converting it goes beyond the scope of this cleanup. There is a
slight risk of getting it wrong and it deserves a separate commit and
careful and independent review.
The PGBackend, OSDMonitor.{cc,h} changes are only about prototype
changes.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
If the shec plugin fails to initialize the instance, it must be deleted
before returning to the caller, otherwise it will be leaked.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
When the lrc layers are defined, the semantic of the D,c and _
characters are defined, the rest is undefined. The test that verifies
the guard against layers of different size uses the A character which
is undefined. Depending on the implementation, the size test could fail
because the A character is undefined and a guard to forbid undefined
characters is added. Replace A with D to make sure the undefined
character A will not interfere with the test.
This may seem nitpicking but it actually caused problems after a code
refactor that will appear in a few commits from here.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Instead of map<string,string>. Make it a non const when initializing
an ErasureCodeInterface instance so that it can be modified.
Rename parameters into profile for consistency with the user
documentation. The parameters name was chosen before the user interface
was defined. This cosmetic update is made in the context of larger
functional changes to improve error reporting and user interface
consistency.
The init() method are made to accept non const parameters. It is
desirable for them to be able to modify the profile so that is
accurately reflects the values that are used. The caller may use this
information for better error reporting.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
With "rbd: timeout watch teardown on unmap with mount_timeout" going
into kernel 4.2, document its effect in the man page.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>