The `cd` name is an abbreviation of an obsolete name for cephadm.
As this is not widely known it could be confusing or conflict with
other common terms like `cd` for "change dir" or "compact disc".
Therefore we rename it to something much clearer.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The `cd` name is an abbreviation of an obsolete name for cephadm.
As this is not widely known it could be confusing or conflict with
other common terms like `cd` for "change dir" or "compact disc".
Therefore we rename it to something much clearer.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
We can avoid creating side-effects in the cephadm module by only importing
the module in the functions that are meant to generate side effects.
Simply importing fixtures and not calling any of the functions now can
not change cephadm by accident.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The with_cephadm_ctx test helper function had an argument that *called*
mock_podman function, thus calling the function at import-time. This can
lead to confusing and unexpected side effects. Because the
container_engine argument is not used by any callers of with_cephadm_ctx
we remove the argument.
All other callers of with_cephadm_ctx that make use of container engine
are already setting `ctx.container_engine = <xyz>` so removing the
argument makes it harder to make the same mistake again in the future.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The iscsi test_unit_run test case was relying upon a strange side-effect
of how the cephadm module was being imported in fixtures.py. In short,
it expected the podman container_engine not to be a subclass of Podman.
```
(Pdb) p ctx.container_engine
<Mock spec='Podman' id='140676342644256'>
(Pdb) p ctx.container_engine.__class__
<class 'cephadm.Podman'>
(Pdb) p isinstance(ctx.container_engine, Podman)
False
(Pdb) p id(ctx.container_engine.__class__)
94372514199712
(Pdb) p id(Podman)
94372516682112
```
In order to clean up fixtures.py and other imports of cephadm as a
module, we fix the test to expect a mock docker. We choose docker
because it only requires changes the path of the container engine. If we
changed it to a real podman subclass we'd have to change many arguments
in the expected CLI text.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Any current or future chicanery needed to import cephadm is now isolated
in one place, and doesn't need to be repeated in every file.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
mingw on RHEL 9 needs -fstack-protector (which adds -lssp), or it fails
with these errors:
undefined reference to `__stack_chk_fail'
undefined reference to `__stack_chk_guard'
undefined reference to `__strcpy_chk'
Commit 8d35b2ecea mentions that the build
fails with -fstack-protector-strong. Perhaps that only applied to
earlier Ubuntu versions, because Ubuntu Focal can build with
-fstack-protector-strong now.
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Upstream CMake sets CMAKE_DL_LIBS to an empty value on MINGW, but the
Fedora and RHEL packages override this and set "dl". Re-set it back to
an empty value.
We can revert this if https://bugzilla.redhat.com/2127529 is resolved
for CMake in Fedora and RHEL.
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Standardize the way that we determine Ubuntu and SUSE.
This aligns with what we do in install-deps.sh and makes it simpler to
add more distributions later.
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Replace tab component ul and li elements with navs and ng-containers
Fixes: https://tracker.ceph.com/issues/55872
Signed-off-by: nsedrickm <nsedrick101@gmail.com>
This should work for now, long term we probably want to get
rid of FuturizedCollection entirely from the interface.
Signed-off-by: Samuel Just <sjust@redhat.com>
There are two main consequences of this:
1. Messages can't be default copy constructed in crimson. MMonCommand
seems to be the only user, and we simply add a copy constructor that
duplicates data portions of the message.
2. We can't casually copy-construct the conn into other structures.
The main user here is watch/notify. We use copy() explicitely
to populate the object_context structures and avoid passing
ConnectionFRef by value.
Signed-off-by: Samuel Just <sjust@redhat.com>
The state shared between sub events creates problems for multicore. The
only user is MOSDPGCreate2, so the optimization isn't really worth
salvaging.
Signed-off-by: Samuel Just <sjust@redhat.com>
Otherwise, tasks waiting on the stage will wake up on the wrong core.
Later, we may choose to statically enable this behavior only for stages
that can actually span cores, but this is ok for now.
Signed-off-by: Samuel Just <sjust@redhat.com>
We may later need to syncronize this across cores, perhaps during tick.
This should work for now, however.
Signed-off-by: Samuel Just <sjust@redhat.com>
We don't really want a global counter here if we can avoid it. Instead,
assign tids with core-local counters prefixed with the core id. We
continue to ensure that tids are unique within an osd boot, but lose
the property that sucessive tids on different cores are ordered. I
don't see anything relying on that property, however, so this should be
fine.
Signed-off-by: Samuel Just <sjust@redhat.com>
The main user of num_pgs was get_target_pg_log_entries(), but we
don't really want to be accessing a global counter there if we
can avoid it. Instead, compute a core-local target and use the
core-local pg count.
Signed-off-by: Samuel Just <sjust@redhat.com>
Context handling is pretty uniform accross all implementations,
may as well do it in the same place.
ShardedStoreProxy would need to handle it otherwise, since
callbacks need to be handled on the core do_transaction is
invoked on.
Signed-off-by: Samuel Just <sjust@redhat.com>
For now, FuturizedStore implementations assume that methods are invoked
on core 0. Later, we'll adapt each implementation to intelligently
support invocation on any pg core. Until then, this wrapper converts
the existing implementations to a safe, if not particuarly performant,
proxy behavior.
AlienStore should be safe as is.
Signed-off-by: Samuel Just <sjust@redhat.com>
OSDSingletonState will now only be responsible for the spg_t->core
mapping for pgs, the individual PerShardState's will hold local
PGMap's. PG management operations are now proxied from PGShardManager
to PerShardState. Subsequent patches will shard PerShardState.
Signed-off-by: Samuel Just <sjust@redhat.com>
The op will actually be run generally on a different core, so we don't
want to be returning a reference to it.
Signed-off-by: Samuel Just <sjust@redhat.com>