xie xingguo [Tue, 26 Mar 2019 07:02:02 +0000 (15:02 +0800)]
osd/PG: move down peers out from peer_purged
In purge_strays(), we'll aggressively clear stray_set and
add all related peers into peer_purged.
However, if the corrsponding peer is down and becomes
up again, (unconditionally) adding it to peer_purged
will prevent primary from re-purging it.
(See Active::react(const MNotifyRec& notevt))
On consuming a new osdmap, let's move any down peers out from
peer_purged simutaneously. This way we can lower the risk
of leaving any leftover PGs behind.
Sage Weil [Fri, 29 Mar 2019 22:58:33 +0000 (17:58 -0500)]
Merge PR #27133 into master
* refs/pull/27133/head:
log,global: do not start flusher thread until after we have our mon config
log: buffer log entries until flusher thread starts
log: open log file from flusher thread
common/ceph_context: fix log_to_file observer
Patrick Donnelly [Fri, 29 Mar 2019 21:41:37 +0000 (14:41 -0700)]
Merge PR #27199 into master
* refs/pull/27199/head:
mds: fix dump routine for session_info_t.used_inos
mds: fix some misleading log messages
client: comment fix in _lookup
mds: fix comment over MDRequestImpl
mds: use stdbool.h instead of hand-rolling our own bool type
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Zheng Yan <zyan@redhat.com>
if no port is specified we don't set one(or set to 0), and don't exactly error
out, so rgw keeps running without being bound to a port. Set the port to default
in these cases
Sage Weil [Thu, 28 Mar 2019 16:21:23 +0000 (11:21 -0500)]
Merge PR #27154 into master
* refs/pull/27154/head:
mgr/pg_autoscaler: apply bias to pg_num selection
mgr/pg_autoscaler: include pg_autoscale_bias in autoscale-status table
osd/osd_types,mon: add pg_autoscale_bias pool property
Sage Weil [Thu, 28 Mar 2019 16:21:01 +0000 (11:21 -0500)]
Merge PR #27012 into master
* refs/pull/27012/head:
common/options: allow (but to not prefer or require) secure mode
common/options: make clients prefer to connect to mons via secure mode
common/options: allow connections to mons in secure mode
common/options: prefer secure mode between monitors
auth/AuthRegistry: remove experimental flag for 'secure' mode
Kefu Chai [Thu, 28 Mar 2019 04:05:51 +0000 (12:05 +0800)]
script/ceph-backport.sh: allow user to specify remote repo
before this change, the script always push to "origin", in my case,
"origin" points to "ceph/ceph", while we need to create the branch in
private repo. and the name of private repo might vary. so would be great
if we can customize this setting.
Kefu Chai [Thu, 28 Mar 2019 03:57:21 +0000 (11:57 +0800)]
script/ceph-backport.sh: fix sanity test of issue number
* no need for checking negative numbers
* use regex for matching the number instead of using bash's pattern
matching, otherwise i have
./ceph-backport.sh: line 79: syntax error in conditional expression:
unexpected token `('
the pattern matching works fine if i use it in command line, but
it fails to work in shell script.
Kefu Chai [Sun, 24 Mar 2019 09:11:31 +0000 (17:11 +0800)]
ceph-volume: terminal: encode unicode when writing to stdout
python determins the encoding of stdout and stderr based on the LC_CTYPE
and PYTHONIOENCODING env variable, by default, python3's sys.stdout uses
'utf-8' as its encoding, so it will be able to write unicode string even
the stdout is not attached to a tty device. but when it comes to
python2, it will default to ascii if neither of these variabls is set.
so, if we are writing unicode using `_Write` in an environment where
LC_CTYPE and/or PYTHONIOENCODING are using non UTF-8 encoding, it chokes
by raising `UnicodeEncodeError` exception.
in this change, we add a wrapper around `_Write._writer` so it is able
to write unicode string in such a non-unicode-friendly environment.
for more info related the encoding of stdout and stderr, see
https://docs.python.org/3/using/cmdline.html#envvar-PYTHONIOENCODING .
alfonsomthd [Wed, 27 Mar 2019 14:21:11 +0000 (15:21 +0100)]
mgr/dashboard: Add protractor-screenshoter-plugin
A plugin to save screenshots on E2E tests failures as well as
console logs, raw HTML, ...
All info visualized in an HTML report (screenshots are clickable to see full image).
Useful for debugging/fixing E2E tests.
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
in this case, "1" is listed in `unknown_args`, but it is also in
`parsed.options`. so we will put the second "1" into `ceph_args` even it
should be appended to `app_args`.
so, in this change, `std::partition_copy()` is replaced with a
hand-written loop which advances through the `argv` and `unknown_args`,
try to match as many consecutive options are possible. it assumes that
the order of args in `unknown_args` is the same as their order in
`argv[]`.
xie xingguo [Tue, 26 Mar 2019 12:04:15 +0000 (20:04 +0800)]
osd/PG: introduce all_missing_unfound helper
We use pg_log.missing to track each peer's missing objects separately,
whereas missing_loc records the location of all (probably existing) good copies
for both primary and replicas' missing objects. Hence an item from
pg_log.missing or missing_loc is of different meaning and is not comparable.
During recovery, we can skip recovering primary only if
- primary is good, e.g., has no missing at all
- or all of the primary's missing objects do exist in missing_loc and are
currently unfound
Obviously, the current "all missing objects are unfound" checker is broken.
Fix by introducing an independent all_missing_unfound helper to make the
count of missing objects that are currently unfound correct.
Kefu Chai [Tue, 26 Mar 2019 10:11:58 +0000 (18:11 +0800)]
ceph.in: only preload asan library if it is enabled
my ceph cli hung when i build ceph using `CMAKE_BUILD_TYPE=RelWithDebInfo` and
`WITH_SEASTAR=ON`. because in that case, seastar detects for Sanitize flags
support of the compiler, but it does not pull in the build flags to enable
sanitizers. while `ceph` cli still preloaded the `asan_lib_path` because
`ASAN_LIBRARY` was set. this is not right, as we should enable ASAN at
runtime only if we enable it at compile-time.
so, in this change, we preload the ASAN library when `CMAKE_BUILD_TYPE`
is `Debug` and `WITH_SEASTAR=ON`, or `WITH_ASAN=ON`.
xie xingguo [Tue, 26 Mar 2019 07:02:02 +0000 (15:02 +0800)]
osd/PG: move down peers out from peer_purged
In purge_strays(), we'll aggressively clear stray_set and
add all related peers into peer_purged.
However, if the corrsponding peer is down and becomes
up again, (unconditionally) adding it to peer_purged
will prevent primary from re-purging it.
(See Active::react(const MNotifyRec& notevt))
On consuming a new osdmap, let's move any down peers out from
peer_purged simutaneously. This way we can lower the risk
of leaving any leftover PGs behind.
Sage Weil [Tue, 26 Mar 2019 20:06:30 +0000 (15:06 -0500)]
Merge PR #27162 into master
* refs/pull/27162/head:
os/bluestore: nice used space report for bluefs-bdev-sizes command.
tools/ceph-kvstore-tool: command to show RocksDB compaction stats.
Igor Fedotov [Mon, 25 Mar 2019 15:42:00 +0000 (18:42 +0300)]
tools/ceph-kvstore-tool: command to show RocksDB compaction stats.
In fact this command will provide zeros for most of compaction stuff as
completed compactions are required to provide most of numbers.
But one can use it to learn per-level DB statistics: (amount of files,
occupied space, etc).
Sage Weil [Mon, 25 Mar 2019 18:40:19 +0000 (13:40 -0500)]
common/config: parse --default-$option as a default value
Sometimes it is useful to specify an alternative default value for an
option via the command line such that it has a lower priority than the
mon config database, config file, the rest of the command line, or the
environment.