hpe-storage / python-hpedockerplugin

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

File persona: plugin allow to create share with another fpg & vfs, where as only single ip provided in "server ip pool" #632

Closed virendra-sharma closed 5 years ago

virendra-sharma commented 5 years ago

Give single ip in "hpe3par server ip pool" parameter and created default fpg, vfs. now try to create second fpg & vfs through share creation, share goes in creating state.

Expectation:- 1) Since single ip provided in "server ip pool", it should allow to create only one fpg and vfs through share. 2) Share which try to create another fpg, vfs should goes in failed status or gives error.

Observation:- 1) Default share created with IP provided in ip pool. 2) When trying to create another share with -o fpg= (which will create new fpg, vfs), shares goes in creating state and stuck in same state.

Steps:- 1) Updated single IP in "hpe3par_server_ip_pool" filed of hpe.conf. 2) Created share01, which creates default fpg & vfs with IP provided in ip_pool field of hpe.conf. 3) Now try to create share02 with -o fpg= (fpg which do not exist, so it will try to create new one). 4) Inspect share02, it stucks in creating state, whereas in log we can see ,message as "IP adderss pool exhausted"

Output/logs:-

1) Share inspect

[root@cssosbe03-b12 ~]# docker volume inspect share02
[
    {
        "Driver": "hpe:latest",
        "Labels": {},
        "Mountpoint": "/var/lib/docker/plugins/c1153e6e059622eec496098336f4f81b3736a8536830422036da4a80de349de7/rootfs/opt/hpe/data/hpedocker-share02",
        "Name": "share02",
        "Options": {
            "filePersona": "",
            "fpg": "new_docker"
        },
        "Scope": "global",
        "Status": {
            "backend": "DEFAULT",
            "clientIPs": [],
            "cpg": "swap_fs_cpg",
            "fpg": "new_docker",
            "fsMode": null,
            "fsOwner": null,
            "name": "share02",
            "protocol": "nfs",
            "sharePath": null,
            "size": "1024 GiB",
            "status": "CREATING",
            "vfs": null
        }
    }
]

2) Message in log file

May 29 01:01:08 cssosbe03-b12 dockerd: time="2019-05-29T01:01:08-04:00" level=info msg="2019-05-29T05:01:08+0000 [stderr#error] hpedockerplugin.exception.IPAddressPoolExhausted: IP adderss pool exhausted" plugin=c1153e6e059622eec496098336f4f81b3736a8536830422036da4a80de349de7
virendra-sharma commented 5 years ago

Now plugin not allow to create another fpg,vfs, if we provide only single IP in config file. Instead it provide specific error "IP exhausted".

Below output for second fpg,vfs creation after giving single ip in config file.

[root@cssosbe03-b12 ~]# docker volume create -d hpe --name share02 -o filePersona -o fpg=docker_test
share02
[root@cssosbe03-b12 ~]# docker volume inspect share02
[
    {
        "Driver": "hpe:latest",
        "Labels": {},
        "Mountpoint": "/var/lib/docker/plugins/91299c3c6ae196c40d58afd3e1a9b1a30a4f7671f5a2c80659a037a686d56bad/rootfs/opt/hpe/data/hpedocker-share02",
        "Name": "share02",
        "Options": {
            "filePersona": "",
            "fpg": "docker_test"
        },
        "Scope": "global",
        "Status": {
            "backend": "DEFAULT_FILE",
            "clientIPs": [],
            "cpg": "swap_fs_cpg",
            "detailedStatus": "Share creation failed: Share creation on new FPG failed. Reason: VFS creation failed: Claim available IP failed. Reason: IP address pool exhausted",
            "fpg": "docker_test",
            "fsMode": null,
            "fsOwner": null,
            "name": "share02",
            "protocol": "nfs",
            "sharePath": null,
            "size": "1024 GiB",
            "status": "FAILED",
            "vfs": "docker_test_vfs"
        }
    }
]

@sandesh-desai please verify same in containerized platform so that will close this issue as resolved.

sandesh-desai commented 5 years ago

Verified and working as expected.

[root@CSSOSBE03-B03 ~]# docker volume create -d hpe --name sandesh-share2 -o filePersona -o fpg=SSD sandesh-share2 [root@CSSOSBE03-B03 ~]# docker volume inspect sandesh-share2 [ { "Driver": "hpe", "Labels": {}, "Mountpoint": "/opt/hpe/data/hpedocker-sandesh-share2", "Name": "sandesh-share2", "Options": { "filePersona": "", "fpg": "SSD" }, "Scope": "global", "Status": { "backend": "DEFAULT_FILE", "clientIPs": [], "cpg": "Sandesh", "detailedStatus": "Share creation failed: Share creation on new FPG failed. Reason: VFS creation failed: Claim available IP failed. Reason: IP address pool exhausted", "fpg": "SSD", "fsMode": null, "fsOwner": null, "name": "sandesh-share2", "protocol": "nfs", "sharePath": null, "size": "1024 GiB", "status": "FAILED", "vfs": "SSD_vfs" } } ]

Attching the output: 3PAR output.txt Docker output.txt

@virendra-sharma : Please close the bug.

virendra-sharma commented 5 years ago

closing as per above comments.