we only have GCC-10 targeting MinGW at the time of writing, and it
is good enough for compiling the Winows port.
so let's relax the requirement to enable the windows build.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
This commit adds ".. prompt:: bash $"-style prompts to operating.rst.
This brings this file up to the standard established in 2020 when
Kefu added support for the ".. prompt::" directive.
This commit is a part of an initiative to modernize the presentation
of all BASH commands in the RADOS documentation.
The progress of this project can be tracked here:
https://tracker.ceph.com/issues/57108
Signed-off-by: Zac Dover <zac.dover@gmail.com>
The compare and write C++ API (both sync and async) does not check
compare bufferlist length and executes compare ops of bufferlist length
size, even if (write) "len" is smaller than bufferlist length.
This patch changes this behavior by always issuing compares and
writes of "len" size to match the C API. The bufferlist length
can be greater than "len" for both compare and write but only
"len" bytes are compared and written. If the bufferlist length
is smaller than "len" the call will fail.
Signed-off-by: Jonas Pfefferle <pepperjo@japf.ch>
This patch removes the compare and write max sector size len
restriction. We can allow up to stripe unit size accesses if
the access is aligned properly.
To allow larger size compare and write requests in the
journal we split the buffers like we do for writes now.
Signed-off-by: Jonas Pfefferle <pepperjo@japf.ch>
Test correct mismatch offset is returned.
Test no data is written when compare fails.
Test correct data is written when compare succeeds.
Signed-off-by: Jonas Pfefferle <pepperjo@japf.ch>
- std::includes() requires sorted ranges but command specs aren't
sorted
- std::includes() purpose is to check whether the second range is
a subsequence of the first range but here the size of the second
range is always equal to the size of the first range, which means
that, had the ranges been sorted, std::includes() would have checked
straight equality
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
The order in which objects with static storage duration in
different TUs are initialized is undefined. If the compiler
chooses to initialize Shell::Action objects in action/Trash.cc
before Shell::Action objects in action/TrashPurgeSchedule.cc,
all "rbd trash purge schedule ..." commands get shadowed by
"rbd trash purge" command:
$ rbd trash purge schedule list
rbd: too many arguments
The confusing error arises because "rbd trash purge" takes a single
positional argument. "schedule" gets interpreted as <pool-spec> and
"list" generates an error.
Fixes: https://tracker.ceph.com/issues/57107
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
before this change, more-itertools tries to import Sequence from
collections, this leads us to failures like:
```
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details
__import__(pkg_name)
File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/__init__.py",
line 9, in <module>
import cherrypy
File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cherrypy/__init__.py",
line 76, in <module>
from . import _cprequest, _cpserver, _cptree, _cplogging, _cpconfig
File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cherrypy/_cprequest.py",
line 11, in <module>
from cherrypy import _cpreqbody
File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cherrypy/_cpreqbody.py",
line 135, in <module>
import cheroot.server
File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cheroot/server.py",
line 96, in <module>
from .workers import threadpool
File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cheroot/workers/threadpool.py",
line 20, in <module>
from jaraco.functools import pass_none
File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/jaraco/functools.py",
line 8, in <module>
import more_itertools
File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/more_itertools/__init__.py",
line 1, in <module>
from more_itertools.more import * # noqa
File
"/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/more_itertools/more.py",
line 3, in <module>
from collections import Counter, defaultdict, deque, Sequence
ImportError: cannot import name 'Sequence' from 'collections'
(/usr/lib/python3.10/collections/__init__.py)
ERROR: InvocationError for command
/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/bin/python3
-m dashboard.controllers.docs
/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/tmp/openapi.yaml
(exited with code 1)
```
after this change, more-itertools is pin'ed at the latest stable
at the time of writing, which includes the fixes including
30a861bc5a
.
please note, more-itertools dropped python3.3 support. but neither
do us support this python version, so we should be safe.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
There are two sets of checks to state change in prepare_beacon.
Since the last commit, many of these checks are covered by
`MDSMap::state_transition_valid`. So merging these checks.
This fixes the bug that standby-replay is evicted unexpectedly.
This bug is introduced in
794d13c9ff (mon/MDSMonitor: reject illegal want_states from MDS)
but only reveal itself after
20509bb6c8 (MDSMonitor: handle damaged from standby-replay)
Fixes: https://tracker.ceph.com/issues/53811
Signed-off-by: 胡玮文 <huww98@outlook.com>
In the middle of test_random_write_concurrrent(), there is a chance
that consume(laddr A), regarding transaction 1, in try_submit_transaction
can be called after transaction 2's consume(laddr A) is invoked (note that
seastore handles both transaction 1 and 2 in order, and each other's laddr
are the same).
To avoid this, this commit adds a write seqeunce to prevent overwriting
old checksum associated with laddr---old checksum will not be updated
after write sequence comparison.
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
While tests were still passing, since this server class
was added the units tests are taking significantly longer to
run and I'm seeing messages like
Failed to run cephadm http server: Expected 4 octets in "<MagicMock name='mock.get().__getitem__()' id='139931011514704'>"
The run time given by "time tox -e py3" without this commit on
my local machine was
real 2m45.749s
user 16m13.273s
sys 0m11.041s
and with this commit (and the server run function therefore mocked)
real 0m36.164s
user 0m26.932s
sys 0m2.367s
so it seems to run about 4x faster with the server run function
mocked and the tests pass in both cases
Issue introduced by: a0fe3ffdaa
Signed-off-by: Adam King <adking@redhat.com>
Basically, if you have a placement that explicitly defines the hosts
to place on, and then add _no_schedule label to one of the hosts (which
should cause all daemons to be removed from the host) cpehadm will simply
fail to apply the spec, saying the host with the _no_schedule label is "Unknown".
This is due to the fact that we remove hosts with the _no_schedule label from
the pool of hosts the scheduler has to work with entirely. If we also provide
the scheduler with a list of currently draining hosts, it can handle this
better and the daemon can be drained off the host as expected.
Fixes: https://tracker.ceph.com/issues/56972
Signed-off-by: Adam King <adking@redhat.com>
cephadm: support quotes around public/cluster network in config passed to bootstrap
Reviewed-by: Francesco Pantano <fpantano@redhat.com>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
mgr/dashboard: add flag to automatically deploy loki/promtail service at bootstrap
Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
The `logic_name` will hopefully help if the assertion in the dtor
fails (which actually started happing).
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>