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

admission-webhook.cstor.openebs.io validation of compression arguments in CStorPoolCluster #237

Closed
mazocode opened this issue Jan 26, 2021 · 1 comment
Assignees

Comments

@mazocode
Copy link

mazocode commented Jan 26, 2021

The admission webhook expects values that are invalid for the ZFS compression setting.

Example:
Create a new CStorPoolCluster

apiVersion: cstor.openebs.io/v1
kind: CStorPoolCluster
metadata:
  name: cstor-hdd-x1-gli1-pool
  namespace: openebs
spec:
  pools:
  - dataRaidGroups:
    - blockDevices:
      - blockDeviceName: blockdevice-c89ddb7adce61f8d21b6e27a488b1940
    nodeSelector:
      kubernetes.io/hostname: iuck8s1.core.idnt.net
    poolConfig:
      dataRaidGroupType: stripe
      compression: lz4 # <- lz4 ./ lz 

Result
Failed CStorPoolInstance:
Failed to create pool due to 'Failed to create pool {cstor-6c7f1f4b-9466-4239-8743-cf0cea515df9} : Failed to create pool.. cannot create 'cstor-6c7f1f4b-9466-4239-8743-cf0cea515df9': 'compression' must be one of 'on | off | lzjb | gzip | gzip-[1-9] | zle | lz4'

lz4 or on gets rejected by the webhook:
Error from server (BadRequest): error when creating "STDIN": admission webhook "admission-webhook.cstor.openebs.io" denied the request: invalid cspc specification: invalid pool spec: unsupported compression 'lz4'
Error from server (BadRequest): error when creating "STDIN": admission webhook "admission-webhook.cstor.openebs.io" denied the request: invalid cspc specification: invalid pool spec: unsupported compression 'on' specified

@prateekpandey14
Copy link
Contributor

closing .. fixed in #241

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

2 participants