Skip to content

cephadm: reorganize container binds functions - #54398

Merged
adk3798 merged 8 commits into
ceph:mainfrom
phlogistonjohn:jjm-cephadm-reorg-ctr-binds
Nov 10, 2023
Merged

adk3798 merged 8 commits into
ceph:mainfrom
phlogistonjohn:jjm-cephadm-reorg-ctr-binds

Conversation

@phlogistonjohn

Copy link
Copy Markdown
Contributor

Depends on #54387

Update and expand the customize_container_binds functions on the set of deamon type classes that were named in get_container_binds ultimately reworking that function to use common class methods to get the binds.

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

These functions often derive the binds and/or mounts from the context
variable. Thus we should have the base class method accept the context.
Not all subclassess will use it but it will be there for those that do.
Also, fix the type for customize_container_mounts - it should be a dict
not a list.

Signed-off-by: John Mulligan <[email protected]>
Ensure that the iscsi test can call CephIscsi.create inside other
functions by passing a required, but fake, gateway config file.

Signed-off-by: John Mulligan <[email protected]>
Convert the CephIscsi type's get_container_binds to
customize_container_binds and use it in the generic method.

Signed-off-by: John Mulligan <[email protected]>
…thod

Convert the CephNvmeof type's get_container_binds to
customize_container_binds and use it in the generic method.

Signed-off-by: John Mulligan <[email protected]>
Add a customize_container_binds function to the CustomContainer daemon
type class and use it from the common get_container_binds function.

Signed-off-by: John Mulligan <[email protected]>
Move the call to get_container_binds out of the function call.
This will aid with the next refactoring steps, so that the uses
of get_container_binds can be brought into the get_container call
directly.

Signed-off-by: John Mulligan <[email protected]>
This is a step towards not calling get_container_binds in get_container.
A future commit will replace uses of get_container_binds with direct
uses of common class methods.

Signed-off-by: John Mulligan <[email protected]>
Since all types affected by get_container_binds now have the common
customize_container_binds, use a generic class-based approach by
creating an instance of ContainerDaemonForm and calling the method.
All other classes have a customize_container_binds that is a no-op.

Signed-off-by: John Mulligan <[email protected]>
@phlogistonjohn
phlogistonjohn force-pushed the jjm-cephadm-reorg-ctr-binds branch from 7121e68 to f04c4b6 Compare November 9, 2023 19:51
@phlogistonjohn
phlogistonjohn marked this pull request as ready for review November 9, 2023 19:51
@phlogistonjohn
phlogistonjohn requested a review from a team as a code owner November 9, 2023 19:51
Comment thread src/cephadm/tests/test_cephadm.py Resolved
@adk3798

adk3798 commented Nov 10, 2023

Copy link
Copy Markdown
Contributor

https://pulpito.ceph.com/adking-2023-11-10_14:03:53-orch:cephadm-wip-adk-testing-2023-11-09-1739-distro-default-smithi/

reruns of failed/dead jobs: https://pulpito.ceph.com/adking-2023-11-10_16:06:45-orch:cephadm-wip-adk-testing-2023-11-09-1739-distro-default-smithi/

After reruns: 6 failed, 1 dead job

Some of the PRs in the run are directly related to some of the above mentioned failures. PRs unrelated to those failures I think can be merged.

@adk3798
adk3798 merged commit c0fdf96 into ceph:main Nov 10, 2023
@phlogistonjohn
phlogistonjohn deleted the jjm-cephadm-reorg-ctr-binds branch November 11, 2023 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants