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

Allow setting ceph.osd.pool_size on pool creation #14006

Open
masnax opened this issue Aug 28, 2024 · 2 comments · May be fixed by #14044
Open

Allow setting ceph.osd.pool_size on pool creation #14006

masnax opened this issue Aug 28, 2024 · 2 comments · May be fixed by #14044
Assignees
Labels
Improvement Improve to current situation

Comments

@masnax
Copy link
Contributor

masnax commented Aug 28, 2024

At least with MicroCeph, OSD pools will default to a replication size of 3. That means if there are fewer than that many OSDs available for replication, LXD will fail to create the pool when running lxc storage create pool ceph. The command will block as the OSD pool will try to replicate unsuccessfully during initialization.

In such cases (admittedly usually testing setups), it may be useful to specify ceph.osd.pool_size to apply as an initial argument when creating the pool. This may also be useful in the LXD test suite as well, where we need to set microceph.ceph config set global osd_pool_default_size 1 to change the default behaviour for all OSD pools in the test suite to disable replication.

Somewhat related to the MicroCloud OSD replication discussions going on, but MicroCloud would not leverage this capability in LXD because it also needs to be able to update the value when adding new cluster members, and it seems the ceph storage pool has no update implementation either.

@masnax masnax added the Improvement Improve to current situation label Aug 28, 2024
@tomponline
Copy link
Member

Somewhat related to the MicroCloud OSD replication discussions going on, but MicroCloud would not leverage this capability in LXD because it also needs to be able to update the value when adding new cluster members, and it seems the ceph storage pool has no update implementation either.

@masnax wouldn't it be useful to add such capability rather than working around it in microcloud?

@masnax
Copy link
Contributor Author

masnax commented Aug 29, 2024

@masnax wouldn't it be useful to add such capability

I thought there might be some reason why it's unimplemented, but if the only reason is that we haven't had a good reason yet, then yes I think implementing updates would be useful too.

rather than working around it in microcloud?

The approach in MicroCloud isn't exactly 1:1 with this because MicroCeph also sets some global ceph configuration (osd_pool_default_size, and mon_allow_pool_size_one) , which is beyond LXD's scope (limited to just OSD pools).

In MicroCloud, we set the replication size equal to the number of OSDs, up to 3. Beyond this point, If OSD pools have a replication factor greater than 3, we should leave them alone because it's a user configuration. But if they have a replication factor less than 3, particularly if it is 1 (no replication), these are dangerous configurations so we should try to increment the value once we see (from MicroCeph) that we have enough OSDs to support it.

initially thought we should make the size setting in MicroCloud limited to just LXD storage pool OSD pools but I'm having doubts about that now. If we have support for replication, then we should try to enable it for all pools, rather than just the LXD pools.

For example, if someone sets up a single node MicroCloud and then creates some OSD pools with Ceph, we should try to enable replication for these OSD pools when adding more OSDs with microcloud add.

However, we need to be able to query the current size of these pools to skip OSD pools that have been manually increased above MicroCloud/MicroCeph's recommendations. (Or manually below the recommendations, which we can infer by the number of OSDs available).

So LXD doesn't cover all the use cases:

  • It only exposes a subset of OSD pools which it knows about
  • Its OSD pool size values may be out of date

@masnax masnax self-assigned this Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Improve to current situation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants