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

Support for single-host topologies #432

Open
blampe opened this issue Aug 7, 2022 · 0 comments
Open

Support for single-host topologies #432

blampe opened this issue Aug 7, 2022 · 0 comments

Comments

@blampe
Copy link

blampe commented Aug 7, 2022

If I have 3 drives, I should be able to create the same topology regardless of whether those drives are attached to 3 hosts or 1 host.

For example, this works and gives me 3 pools of a single drive each:

    pools:
      - nodeSelector:
          kubernetes.io/hostname: "host-1"
        dataRaidGroups:
          - blockDevices:
              - blockDeviceName: "blockdevice-1"
        poolConfig:
          dataRaidGroupType: "stripe"

      - nodeSelector:
          kubernetes.io/hostname: "host-2"
        dataRaidGroups:
          - blockDevices:
              - blockDeviceName: "blockdevice-2"
        poolConfig:
          dataRaidGroupType: "stripe"

      - nodeSelector:
          kubernetes.io/hostname: "host-3"
        dataRaidGroups:
          - blockDevices:
              - blockDeviceName: "blockdevice-3"
        poolConfig:
          dataRaidGroupType: "stripe"

If I try to re-create the same topology on one host (maybe for local minikube testing, or maybe because I have a host with a large number of drives) it yields an error:

    pools:
      - nodeSelector:
          kubernetes.io/hostname: "host-1"
        dataRaidGroups:
          - blockDevices:
              - blockDeviceName: "blockdevice-1"
        poolConfig:
          dataRaidGroupType: "stripe"

      - nodeSelector:
          kubernetes.io/hostname: "host-1"
        dataRaidGroups:
          - blockDevices:
              - blockDeviceName: "blockdevice-2"
        poolConfig:
          dataRaidGroupType: "stripe"

      - nodeSelector:
          kubernetes.io/hostname: "host-1"
        dataRaidGroups:
          - blockDevices:
              - blockDeviceName: "blockdevice-3"
        poolConfig:
          dataRaidGroupType: "stripe"

admission webhook "admission-webhook.cstor.openebs.io" denied the request: invalid cspc specification: invalid cspc: duplicate node host-1 entry

It seems odd to limit a host to only one pool. If we try to work around this by specifying one host with 3 raid groups, that is also an error:

pools:
      - nodeSelector:
          kubernetes.io/hostname: "host-1"
        dataRaidGroups:
          - blockDevices:
              - blockDeviceName: "blockdevice-1"

          - blockDevices:
              - blockDeviceName: "blockdevice-2"

          - blockDevices:
              - blockDeviceName: "blockdevice-3"
        poolConfig:
          dataRaidGroupType: "stripe"

admission webhook "admission-webhook.cstor.openebs.io" denied the request: invalid cspc specification: invalid pool spec: stripe dataRaidGroups should have exactly one raidGroup

This is surprising, because dataRaidGroups is an array so it seems like it was intended to support multiple entries.

AFAICT the only single-host topology supported is therefore:

pools:
      - nodeSelector:
          kubernetes.io/hostname: "host-1"
        dataRaidGroups:
          - blockDevices:
              - blockDeviceName: "blockdevice-1"
              - blockDeviceName: "blockdevice-2"
              - blockDeviceName: "blockdevice-3"
        poolConfig:
          dataRaidGroupType: "stripe" # or "mirror"

but this is fundamentally different from what was possible with 3 hosts. Namely, 3 independent pools/drives with no RAID behavior between them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant