NetApp / netappdvp

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

Cleanup error messages #64

Closed j-griffith closed 7 years ago

j-griffith commented 7 years ago

This adds some consistency to the logging, but even better we go from this:

^[[37mDEBU^[[0m[0069] request:962 method:CreateVolume params:&{netappdvp-foo-1 26501 1073741824 false {0 0 0 0} map[platform:Docker-NDVP ndvp-version:1.3.2 [native] docker-name:netappdvp-foo-1]} ^[[37m^[[0m="{\n \"id\": 962,\n \"result\": {\n \"curve\": {\n \"1048576\": 15000,\n \"131072\": 1950,\n \"16384\": 270,\n \"262144\": 3900,\n \"32768\": 500,\n \"4096\": 100,\n \"524288\": 7600,\n \"65536\": 1000,\n \"8192\": 160\n },\n \"volumeID\": 47396\n }\n}" ^[[37mDEBU^[[0m[0069] sending request to SolidFire endpoint ^[[37mDEBU^[[0m[0069] sending request to: https://admin:admin@10.117.36.101/json-rpc/7.0 ^[[37mDEBU^[[0m[0069] request:678 method:ListActiveVolumes params:&{47396 1} ^[[37m^[[0m="{\n \"id\": 678,\n \"result\": {\n \"volumes\": [\n {\n \"access\": \"readWrite\",\n \"accountID\": 26501,\n \"attributes\": {\n \"docker-name\": \"netappdvp-foo-1\",\n \"ndvp-version\": \"1.3.2 [native]\",\n \"platform\": \"Docker-NDVP\"\n },\n \"blockSize\": 4096,\n \"createTime\": \"2017-01-25T19:44:47Z\",\n \"deleteTime\": \"\",\n \"enable512e\": false,\n \"iqn\": \"iqn.2010-01.com.solidfire:py3x.netappdvp-foo-1.47396\",\n \"name\": \"netappdvp-foo-1\",\n \"purgeTime\": \"\",\n \"qos\": {\n \"burstIOPS\": 15000,\n \"burstTime\": 60,\n \"curve\": {\n \"1048576\": 15000,\n \"131072\": 1950,\n \"16384\": 270,\n \"262144\": 3900,\n \"32768\": 500,\n \"4096\": 100,\n \"524288\": 7600,\n \"65536\": 1000,\n \"8192\": 160\n },\n \"maxIOPS\": 15000,\n \"minIOPS\": 50\n },\n \"scsiEUIDeviceID\": \"707933780000b924f47acc0100000000\",\n \"scsiNAADeviceID\": \"6f47acc100000000707933780000b924\",\n \"sliceCount\": 1,\n \"status\": \"active\",\n \"totalSize\": 1073741824,\n \"volumeAccessGroups\": [],\n \"volumeID\": 47396,\n \"volumePairs\": []\n }\n ]\n }\n}"

To formatted json in the logs:

^[[37mDEBU^[[0m[0023] request json: { "id": 996, "method": "ListActiveVolumes", "params": { "startVolumeID": 47561, "limit": 1 } } ^[[37mDEBU^[[0m[0023] response body: { "id": 996, "method": "ListActiveVolumes", "params": { "startVolumeID": 47561, "limit": 1 } }{ "id": 996, "result": { "volumes": [ { "access": "readWrite", "accountID": 26501, "attributes": { "docker-name": "netappdvp-foo-5", "ndvp-version": "1.3.2 [native]", "platform": "Docker-NDVP" }, "blockSize": 4096, "createTime": "2017-01-25T19:57:08Z", "deleteTime": "", "enable512e": false, "iqn": "iqn.2010-01.com.solidfire:py3x.netappdvp-foo-5.47561", "name": "netappdvp-foo-5", "purgeTime": "", "qos": {

adkerr commented 7 years ago

Resolved in 2165b9069ebb1c1c697d7eb9c1b487e71310c2cf