Huawei / eSDK_K8S_Plugin

Container-Storage-Interface (CSI) for Huawei storage
Apache License 2.0
82 stars 47 forks source link

Problem with HyperMetro #8

Closed PegasusDuh closed 1 year ago

PegasusDuh commented 4 years ago

Hi, I have a problem with 2.2.9 in OKD 4.5.0-0.okd-2020-09-04-180756: cannot create NFS share in vStore. Task failed with error (on OceanStor 5500F): admin:10.2.1.225 failed to create HyperMetro pair (HyperMetro vStore pair ID 60f18ac24fb6c000, local file system ID 104, remote file system ID 69, speed highest, recovery policy automatic, timeout period of writing I/Os to the remote end 30). Error code: 1077674333.

Configs:

---
kind: ConfigMap
apiVersion: v1
metadata:
  name: huawei-csi-configmap
  namespace: kube-system
data:
  csi.json: |
    {
        "backends": [
            {
                "storage": "oceanstor-nas",
                "product": "V5",
                "name": "CC1-Huawei5500F-1",
                "urls": [
                    "https://10.2.4.14:8088/deviceManager/rest"
                ],
                "user": "admin",
                "password": "*",
                "pools": ["File_SP"],
                "parameters": {"portal": "10.101.14.217"},
                "vstoreName": "vStore_NFS",
                "metrovStorePairID": "60f18ac24fb6c000"
            },
            {
                "storage": "oceanstor-nas",
                "product": "V5",
                "name": "CC1-Huawei5500F-2",
                "urls": [
                    "https://10.2.4.18:8088/deviceManager/rest"
                ],
                "user": "admin",
                "password": "*",
                "pools": ["File_SP"],
                "parameters": {"portal": "10.101.14.217"},
                "vstoreName": "vStore_NFS",
                "metrovStorePairID": "60f18ac24fb6c000"
            }
        ]
    }
---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: "vstore-nfs"
provisioner: csi.huawei.com
parameters:
  volumeType: fs
  allocType: thin
  authClient: "*"
  hyperMetro: "true"
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: mypvc
spec:
  accessModes:
    - ReadWriteMany
  storageClassName: vstore-nfs
  resources:
    requests:
      storage: 10Gi

Logs from huawei-csi-controller:

W0924 14:22:10.892719       1 controller.go:887] Retrying syncing claim "aa244899-b5a4-4783-aaa4-3e573490cb67", failure 3
I0924 14:22:10.892887       1 event.go:281] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"mypvc", UID:"aa244899-b5a4-4783-aaa4-3e573490cb67", APIVersion:"v1", ResourceVersion:"3034794", FieldPath:""}): type: 'Warning' reason: 'ProvisioningFailed' failed to provision volume with StorageClass "vstore-nfs": rpc error: code = Internal desc = Create hypermetro map[LOCALOBJID:101 REMOTEOBJID:66 SPEED:4 VSTOREPAIRID:60f18ac24fb6c000 HCRESOURCETYPE:2] error: 1077674333
E0924 14:22:10.892947       1 controller.go:910] error syncing claim "aa244899-b5a4-4783-aaa4-3e573490cb67": failed to provision volume with StorageClass "vstore-nfs": rpc error: code = Internal desc = Create hypermetro map[LOCALOBJID:101 REMOTEOBJID:66 SPEED:4 VSTOREPAIRID:60f18ac24fb6c000 HCRESOURCETYPE:2] error: 1077674333
PegasusDuh commented 4 years ago

May be in func (p *NAS) createHyperMetro (src/storage/oceanstor/volume/nas.go) we need RECOVERYPOLICY: "1"?

doubletao318 commented 4 years ago

May be in func (p *NAS) createHyperMetro (src/storage/oceanstor/volume/nas.go) we need RECOVERYPOLICY: "1"?

The RECOVERYPOLICY is optional, the default value is "1". Cause: The active HyperMetro vStore ID of the specified HyperMetro vStore pair is inconsistent with the HyperMetro vStore ID of the specified active file system. Suggestion: Ensure that the values of parameters are correct.

PegasusDuh commented 3 years ago

In ConfigMap I see vstoreName only, no vStore ID or active vStore ID.

PegasusDuh commented 3 years ago

From support: tenant ID is wrong. Where is tenant id in config map?

doubletao318 commented 3 years ago

Is the version of storage is V5R7C10?