Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate code duplication in discovery service when connecting to Rados #289

Closed
gbregman opened this issue Oct 25, 2023 · 0 comments · Fixed by #292
Closed

Eliminate code duplication in discovery service when connecting to Rados #289

gbregman opened this issue Oct 25, 2023 · 0 comments · Fixed by #292

Comments

@gbregman
Copy link
Contributor

In discovery.py we have the code:

        ceph_pool = self.config.get("ceph", "pool")
        ceph_conf = self.config.get("ceph", "config_file")
        rados_id = self.config.get_with_default("ceph", "id", "")
        conn = rados.Rados(conffile=ceph_conf, rados_id=rados_id)
        conn.connect()
        self.ioctx = conn.open_ioctx(ceph_pool)

This code is identical to what we have in state.py. We already ran into a bug which turned out to be about an update in state.py which wasn't done in discovery.py. we need to move this code to a separate function which will be called from both places.

@github-project-automation github-project-automation bot moved this to 🆕 New in NVMe-oF Oct 25, 2023
gbregman added a commit to gbregman/ceph-nvmeof that referenced this issue Oct 25, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NVMe-oF Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant