strato icon indicating copy to clipboard operation
strato copied to clipboard

Error modifying AWS Cloud file share when Metadata values are not modified

Open anvithks opened this issue 3 years ago • 4 comments

Issue/Feature Description: When an AWS cloud file share is modified and the values are not changed the backend throws an error. Existing File Share

{
 "fileshares": [
  {
   "id": "5f66451d871d2c0001c3aab0",
   "createdAt": "2020-09-19T23:21:25",
   "updatedAt": "2020-09-19T23:21:25",
   "name": "testinganvith",
   "description": "testinganvit",
   "tenantId": "94b280022d0c4401bcf3b0ea85870519",
   "userId": "558057c4256545bd8a307c37464003c9",
   "backendId": "5f664444b991ba000124ceff",
   "backend": "aws-backend-file",
   "type": "cloudFS",
   "region": "ap-south-1",
   "status": "creating",
   "tags": [
    {
     "key": "Name",
     "value": "testanv"
    }
   ],
   "metadata": {
    "fields": {
     "CreationTimeAtBackend": {
      "Kind": {
       "StringValue": "2020-09-19T17:51:25Z"
      }
     },
     "CreationToken": {
      "Kind": {
       "StringValue": "$9BT#bAzNP/A07z(5hBoUhrZu5pRjo}r/N~B"
      }
     },
     "FileSystemId": {
      "Kind": {
       "StringValue": "fs-682145b9"
      }
     },
     "FileSystemSize": {
      "Kind": {
       "StructValue": {
        "fields": {
         "Timestamp": {
          "Kind": {
           "NumberValue": 0
          }
         },
         "Value": {
          "Kind": {
           "NumberValue": 0
          }
         },
         "ValueInIA": {
          "Kind": {
           "NumberValue": 0
          }
         },
         "ValueInStandard": {
          "Kind": {
           "NumberValue": 0
          }
         }
        }
       }
      }
     },
     "LifeCycleState": {
      "Kind": {
       "StringValue": "creating"
      }
     },
     "Name": {
      "Kind": {
       "StringValue": "testanv"
      }
     },
     "NumberOfMountTargets": {
      "Kind": {
       "NumberValue": 0
      }
     },
     "OwnerId": {
      "Kind": {
       "StringValue": "586825186478"
      }
     },
     "PerformanceMode": {
      "Kind": {
       "StringValue": "generalPurpose"
      }
     },
     "ThroughputMode": {
      "Kind": {
       "StringValue": "bursting"
      }
     }
    }
   }
  }
 ],
 "next": 1
}

Request Body

{
  "description": "testinganvit",
  "type": "cloudFS",
  "metadata": {
    "PerformanceMode": "generalPurpose",
    "ThroughputMode": "bursting"
  },
  "tags": [
    {
      "key": "Name",
      "value": "testanv"
    }
  ]
}

Here is the API response

{"id":"go.micro.server","code":500,"detail":"panic recovered: runtime error: invalid memory address or nil pointer dereference","status":"Internal Server Error"}

Here is the log entry from Docker logs

image

Why this issue to fixed / feature is needed(give scenarios or use cases):

How to reproduce, in case of a bug:

  1. Go to Resource -> Fileshare -> Cloud
  2. Create an AWS File share
  3. In the file share list click on Modify from the operation menu.
  4. In the modify page do not change values for the existing Metadata values.
  5. Submit the form.

Other Notes / Environment Information: (Please give the env information, log link or any useful information for this issue)

anvithks avatar Sep 19 '20 18:09 anvithks

@anvithks Could you please clearly specify what the user wants to modify. Could you please cross-check Is this a valid AWS FS modification Use-case supported in AWS?

himanshuvar avatar Sep 20 '20 02:09 himanshuvar

Not changing anything. User just sends same values as before.

anvithks avatar Sep 20 '20 03:09 anvithks

Not changing anything. User just sends same values as before.

Then, What is the purpose for Modifying? Please check at the AWS backend. From AWS console, the operation you are trying to do is disabled.

himanshuvar avatar Sep 20 '20 03:09 himanshuvar

Not changing anything. User just sends same values as before.

Then, What is the purpose for Modifying? Please check at the AWS backend. From AWS console, the operation you are trying to do is disabled.

If the user does not use a frontend to make this call then the error received from the API does not inform what was the actual issue. This can be learnt only from the docker logs.

anvithks avatar Sep 20 '20 04:09 anvithks