hpe-storage / python-hpedockerplugin

HPE Native Docker Plugin
Apache License 2.0
36 stars 64 forks source link

File Persona : Incorrect error message,when it failed to create Share by using two different cpg with single fpg. #670

Closed sandesh-desai closed 5 years ago

sandesh-desai commented 5 years ago

While creating 2 share with different cpg and same fpg.

Steps to re-produce: 1) [root@CSSOSBE03-B03 ~]# docker volume create -d hpe --name Test -o filePersona -o size=1000 -o cpg=Sandesh -o fpg=sandesh_fpg -o fsOwner="1000:1000" -o fsMode="0766" Share Test created successfully.

Now create another share with different cpg and same fpg mention above. 2) docker volume create -d hpe --name Test1 -o filePersona -o size=1000 -o cpg=Sandesh-snap -o fpg=sandesh_fpg -o fsOwner="1000:1000" -o fsMode="0766"

3) Inspect share Test1 [root@CSSOSBE03-B03 ~]# docker volume inspect Test1 [ { "Driver": "hpe", "Labels": {}, "Mountpoint": "/", "Name": "Test1", "Options": { "cpg": "Sandesh-snap", "filePersona": "", "fpg": "sandesh_fpg", "fsMode": "0766", "fsOwner": "1000:1000", "size": "1000" }, "Scope": "global", "Status": { "backend": "DEFAULT_FILE", "clientIPs": [], "cpg": "Sandesh-snap", "detailedStatus": "Share creation failed: Share creation failed. Reason: ERROR: Invalid CPG Sandesh-snap specified as an option or configured in hpe.conf that doesn't match the parent CPG sandesh_fpg of the specified legacy FPG Sandesh. Please specify CPG as '-o cpg=Sandesh'", "fpg": "sandesh_fpg", "fsMode": "0766", "fsOwner": "1000:1000", "name": "Test1", "protocol": "nfs", "sharePath": null, "size": "1000 GiB", "status": "FAILED", "vfs": null } } ]

Expected result: It should mention "detailedStatus": "Share creation failed: Share creation failed. Reason: ERROR: Invalid CPG Sandesh-snap specified as an option or configured in hpe.conf that doesn't match the parent CPG Sandesh of the specified legacy FPG sandesh_fpg. Please specify CPG as '-o cpg=Sandesh'",

Attaching the logs. Docker output.txt Messages file.txt

sandesh-desai commented 5 years ago

Verified and working as expected. Attaching logs. Docker output.txt