Repository navigation
cephadm: break various daemon type classes out to smaller files in cephadmlib - #54441
Merged
Merged
Conversation
phlogistonjohn
force-pushed
the
jjm-cephadm-breakup
branch
2 times, most recently
from
November 14, 2023 21:28
5f374ba to
b14f798
Compare
4 of 14 tasks
phlogistonjohn
force-pushed
the
jjm-cephadm-breakup
branch
2 times, most recently
from
November 17, 2023 15:58
b55d42f to
6029453
Compare
phlogistonjohn
force-pushed
the
jjm-cephadm-breakup
branch
from
November 29, 2023 20:14
6029453 to
df54759
Compare
phlogistonjohn
marked this pull request as ready for review
November 29, 2023 20:16
adk3798
approved these changes
Nov 30, 2023
adk3798
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Didn't look very closely at parts that moved large blocks of code from one file into another or the formatting commits, so must comments are on the earlier commits.
This function is roughly the same as make_var_run only it doesn't rely on shelling out to the install command. Eventually, it will be used to replace make_var_run in certain locations. Signed-off-by: John Mulligan <[email protected]>
phlogistonjohn
force-pushed
the
jjm-cephadm-breakup
branch
2 times, most recently
from
November 30, 2023 19:20
4cb2885 to
39036ee
Compare
This fixture acts like a combination of mock.patch and pytest's monkeypatch fixture. It has the additional feature of automatically finding and patching the same object imported in other modules. If you have 'from x import y', where y is a function or class, in both a.py and b.py it will patch both instances (so long as both a and b are already imported). This behavior is useful for cephadm because of the heavy use of the `from x import y` idiom and how cephadm is being actively refactored. Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
The test_mon_crush_location test always seems to have me tinkering with it during refactoring. Re-do the fixtures to use funkpatch instead of mock.patch and normal monkeypatch. This looks nicer (IMO) and should avoid having to frequently mess with it when moving functions during future refactoring. Signed-off-by: John Mulligan <[email protected]>
Create a deployment_utils module for deployment related functions that don't have a better home. Signed-off-by: John Mulligan <[email protected]>
Add a shim function and convert to the use of the FunkyPatcher class in the test_deploy.py test functions. Use a shim as to not have to change all the tests (yet). Signed-off-by: John Mulligan <[email protected]>
Update the test that import dict_get and dict_get_join to use the context_getters module - the module that actually defines the functions. Signed-off-by: John Mulligan <[email protected]>
Update tests to import should_log_to_journald from context_getters - the module that actually defines that function. This makes later refactoring easier. Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Move the ceph classes (Ceph, OSD, CephExporter) along with a few heavily linked functions to a new ceph.py file under the daemons dir. Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
During the refactor of various daemon type classes some of the tests had been converted to funkypatch in order to deal with imports occuring over multiple files. However, this conversion was done piece by piece in order to make clear what was changing. This left the functions in this file inconsistent. Change all the remaining function to use funkypatch for consistency. Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
phlogistonjohn
force-pushed
the
jjm-cephadm-breakup
branch
from
November 30, 2023 21:56
39036ee to
ed6f171
Compare
Contributor
Author
|
jenkins test make check |
Contributor
|
All dead jobs and 12 of the 15 failed jobs fall under either some sort of infra issue or https://tracker.ceph.com/issues/63672. Remaining 3 failures are
Overall, nothing to block merging on PRs in the run other than the one adding the jinja2 template. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #54424
Move the container daemon form sub-classes into files in a cephadmlib.daemons package.
Lots of these moves needed test fixups but none were too bad. Partly because of the new fixture...
I added a new test fixture called
funkypatchthat makes patching a bit easier when moving code around. See the commit message and docstring for more details about how funkypatch is supposed to work.This should end the big chunk of refactoring PRs aimed at breaking circular dependencies in cephadm and getting nearer a cleaner more modular cephadm core. After this PR I think I'm going to give pure refactoring PRs a rest for a while.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
opened tracker ticketShow available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e