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

Helm release 0.14.6 breaks ISCSI provisioning #403

Open
mannerydhe opened this issue May 21, 2024 · 2 comments
Open

Helm release 0.14.6 breaks ISCSI provisioning #403

mannerydhe opened this issue May 21, 2024 · 2 comments

Comments

@mannerydhe
Copy link

Kubernetes version: v1.27.13
Helm release version: 0.14.6
Truenas version: TrueNAS-13.0-U4

Democratic csi fails to provision the following pvc:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: test-ext4
  namespace: sample
  labels:
    app: test-ext4
spec:
  storageClassName: freenas-iscsi-ext4
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi

with this status 200 html response (?):

...
Events:
  Type     Reason                Age                   From                                                                                                                Message
  ----     ------                ----                  ----                                                                                                                -------
  Normal   Provisioning          2m37s (x14 over 26m)  org.democratic-csi.iscsi_zfs-iscsi-democratic-csi-controller-75474859dc-4tnrt_1846c653-d033-423a-a432-79494a98a13a  External provisioner is provisioning volume for claim "sample/test-ext4"
  Warning  ProvisioningFailed    2m37s (x14 over 26m)  org.democratic-csi.iscsi_zfs-iscsi-democratic-csi-controller-75474859dc-4tnrt_1846c653-d033-423a-a432-79494a98a13a  failed to provision volume with StorageClass "freenas-iscsi-ext4": rpc error: code = Unknown desc = received error creating iscsi target - code: 200 body: "<!doctype html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\">\n  <meta http-equiv=\"Pragma\" content=\"no-cache\">\n  <meta http-equiv=\"Expires\" content=\"-1\">\n  <meta http-equiv=\"CACHE-CONTROL\" content=\"NO-CACHE\">\n  <!--<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />-->\n  <!--<script  src=\"generated/ie-polyfills.min.js\"></script>-->\n  <script nomodule=\"\" src=\"assets/scripts/ie-support/ie-polyfills.min.js\"></script>\n  <title id=\"main-page-title\"></title>\n  <base href=\"/ui/\">  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <link rel=\"apple-touch-icon\" sizes=\"57x57\" href=\"assets/images/apple-icon-57x57.png\">\n  <link rel=\"apple-touch-icon\" sizes=\"60x60\" href=\"assets/images/apple-icon-60x60.png\">\n  <link rel=\"apple-touch-icon\" sizes=\"72x72\" href=\"assets/images/apple-icon-72x72.png\">\n  <link rel=\"apple-touch-icon\" sizes=\"76x76\" href=\"assets/images/apple-icon-76x76.png\">\n  <link rel=\"apple-touch-icon\" sizes=\"114x114\" href=\"assets/images/apple-icon-114x114.png\">\n  <link rel=\"apple-touch-icon\" sizes=\"120x120\" href=\"assets/images/apple-icon-120x120.png\">\n  <link rel=\"apple-touch-icon\" sizes=\"144x144\" href=\"assets/images/apple-icon-144x144.png\">\n  <link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"assets/images/apple-icon-152x152.png\">\n  <link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"assets/images/apple-icon-180x180.png\">\n  <link rel=\"icon\" type=\"image/png\" sizes=\"192x192\"  href=\"assets/images/android-icon-192x192.png\">\n  <!-- <link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"assets/images/favicon-32x32.png\">\n  <link rel=\"icon\" type=\"image/png\" sizes=\"96x96\" href=\"assets/images/favicon-96x96.png\"> -->\n  <!-- <link id='fav16' rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"assets/images/favicon-16x16.png\"> -->\n  <link rel=\"manifest\" href=\"assets/manifest.json\">\n  <meta name=\"msapplication-TileColor\" content=\"#ffffff\">\n  <meta name=\"msapplication-TileImage\" content=\"assets/images/ms-icon-144x144.png\">\n  <meta name=\"theme-color\" content=\"#ffffff\">\n  <link href=\"assets/iconfont/material-icons.css\" rel=\"stylesheet\" />\n  <link href=\"assets/iconfont/mdi/css/materialdesignicons.min.css\" rel=\"stylesheet\" />\n  <link href=\"assets/iconfont/primeicons/primeicons.css\" rel=\"stylesheet\" />\n  <link href=\"assets/fonts/text-security/text-security.css\" rel=\"stylesheet\" />\n<link rel=\"stylesheet\" href=\"styles.278ad6cadcdd3b273dd6.css\"></head>\n<body class=\"ix-blue\">\n  <app-root>\n    <div class=\"app-loadr\" style=\"background-color:var(--bg2);height:100vh; --bg1:#171E26;--bg2:#232d35;--fg1:#aaaaaa;--fg2:#cccccc;\">\n      <div style=\"position:relative;z-index:2;width:180px;height:180px;top:calc(50% - 90px);left:calc(50% - 90px);\">\n        <div style=\"text-align:center; position:relative; top:calc(50% - 75px);\">\n          <mat-icon svgIcon=\"truenas_core_logomark\" id=\"brandLogo\" alt=\"\" style=\"width: 100%; height:100%\"></mat-icon>\n        <!-- Put a loader in here at some point -->\n      </div>\n    </div>\n    <script src='assets/scripts/product.js'>\n    </script>\n    <script>\n      if (product.trim() === 'TrueNAS') {\n        document.getElementById('brandLogo').src = 'assets/images/TrueNAS_Logomark_White.svg';\n      }\n    </script>\n  </app-root>\n<script src=\"runtime-es2016.81530b288c180c08588e.js\" type=\"module\"></script><script src=\"runtime-es5.81530b288c180c08588e.js\" nomodule defer></script><script src=\"polyfills-es5.b74026ef007c809a45dc.js\" nomodule defer></script><script src=\"polyfills-es2016.1ebe99e93f900ed8d783.js\" type=\"module\"></script><script src=\"scripts.a6f095e3d5bfe5af0e77.js\" defer></script><script src=\"main-es2016.64941364b0eeb9257f13.js\" type=\"module\"></script><script src=\"main-es5.64941364b0eeb9257f13.js\" nomodule defer></script></body>\n</html>\n"
  Normal   ExternalProvisioning  68s (x103 over 26m)   persistentvolume-controller                                                                                         waiting for a volume to be created, either by external provisioner "org.democratic-csi.iscsi" or manually created by system administrator

Downgrading to 0.14.5 solves the issue.

The helmrelease:

---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: zfs-iscsi
  namespace: democratic-csi
spec:
  chart:
    spec:
      chart: democratic-csi
      reconcileStrategy: ChartVersion
      sourceRef:
        kind: HelmRepository
        name: democratic-csi
  interval: 1m0s
  values:
    node:
      kubeletHostPath: /var/snap/microk8s/common/var/lib/kubelet
    controller:
      externalProvisioner:
        extraArgs:
          volumeNamePrefix: --volume-name-prefix=pv

    csiDriver:
      # should be globally unique for a given cluster
      name: "org.democratic-csi.iscsi"

    # add note here about volume expansion requirements
    storageClasses:
    - name: freenas-iscsi-ext4
      defaultClass: false
      reclaimPolicy: Retain
      volumeBindingMode: Immediate
      allowVolumeExpansion: true
      parameters:
        # for block-based storage can be ext3, ext4, xfs
        # for nfs should be nfs
        fsType: ext4
          
        # if true, volumes created from other snapshots will be
        # zfs send/received instead of zfs cloned
        # detachedVolumesFromSnapshots: "false"
        
        # if true, volumes created from other volumes will be
        # zfs send/received instead of zfs cloned
        # detachedVolumesFromVolumes: "false"   
    driver:
      config:
        driver: freenas-iscsi
        httpConnection:
          host: 10.14.3.1
          #apiKey: #From secret
          allowInsecure: true
          port: 80
          protocol: http
        instance_id: null
        iscsi:
          extentAvailThreshold: 0
          extentBlocksize: 512
          extentDisablePhysicalBlocksize: true
          extentInsecureTpc: true
          extentRpm: SSD
          extentXenCompat: false
          interface: null
          namePrefix: csi-
          nameSuffix: -clustera
          nameTemplate: '{{ parameters.[csi.storage.k8s.io/pvc/namespace] }}-{{ parameters.[csi.storage.k8s.io/pvc/name]
            }}'
          targetGroups:
          - targetGroupAuthGroup: null
            targetGroupAuthType: None
            targetGroupInitiatorGroup: 1
            targetGroupPortalGroup: 1
          targetPortal: "10.14.3.1:3260"
          targetPortals: []
        sshConnection:
          host: 10.14.3.1
          port: 22
          username: csi
          #privateKey: #From secret|
        zfs:
          cli:
            sudoEnabled: true
          datasetParentName: lamnea/kubernetes/csi/vols
          datasetProperties:
            org.freenas:description: '{{ parameters.[csi.storage.k8s.io/pvc/namespace]
              }}/{{ parameters.[csi.storage.k8s.io/pvc/name] }}'
          detachedSnapshotsDatasetParentName: lamnea/kubernetes/csi/snaps
          zvolBlocksize: null
          zvolCompression: null
          zvolDedup: null
          zvolEnableReservation: false
  valuesFrom:
  - kind: Secret
    name: truenas-secrets
    valuesKey: ssh-private-key
    targetPath: driver.config.sshConnection.privateKey
  - kind: Secret
    name: truenas-secrets
    valuesKey: api-key
    targetPath: driver.config.httpConnection.apiKey
@Ornias1993
Copy link

@mannerydhe looks like you're in the wrong repo, maybe @travisghansen can move it to here:
https://github.com/democratic-csi/charts

@mannerydhe
Copy link
Author

@mannerydhe looks like you're in the wrong repo, maybe @travisghansen can move it to here: https://github.com/democratic-csi/charts

Sorry, my bad. Or should I just close this and reopen in the correct repo?

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