NetApp / netappdvp

A Docker volume plugin for NetApp storage
96 stars 33 forks source link

SolidFire driver doesn't work with underscores in the volume name #7

Closed acsulli closed 7 years ago

acsulli commented 8 years ago

When creating a volume with underscores in the name the driver fails.

[root@control wp]# docker volume create -d solidfire --name test_me
Error response from daemon: create test_me: VolumeDriver.Create: Error creating storage: Received error response from API request
[root@control wp]# tail -10 /var/log/netappdvp/solidfire.log
DEBU[1795] Issueing request to SolidFire Endpoint...
DEBU[1795] POST request to: https://admin:password@1x.6x.1x.1x/json-rpc/7.0
DEBU[1796] request:596 method:CreateVolume params:&{netappdvp-test_me 1 1073741824 false {0 0 0 0} <nil>}  ={
  "error": {
    "code": 500,
    "message": "netappdvp-test_me is not a valid name. The name must only contain digits, alphabetic characters or a -",
    "name": "xInvalidAPIParameter"
  },
  "id": 596
}

While it's understood that underscores are not a valid character for SolidFire volume names, they can't be avoided when using Docker Compose since it prepends "projectname_" to the volume name.

Andrew

j-griffith commented 8 years ago

This is a limitation in the SolidFire API, it only allows alphanumerics. The only other option would be to fail sooner but when automating I don't think that's going to solve the problem for you.

ebalduf commented 8 years ago

I just submitted a patch/pull request with a solution to this. Not the best solution, but a solution.

ebalduf commented 8 years ago

There are 2 proposed fixes for this. Can we make a decision and Merge one of them. I proposed one of them, but I'm not married to that Solution, although it does work.

bnaylor commented 8 years ago

I think we were waiting on some review changes from jg on PR #34?

bnaylor commented 7 years ago

Woops, I took PR #34 a while ago, should work now. Closing.