Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update "datastore create" default parameters #50

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

stuart-mclaren-hpe
Copy link
Contributor

@stuart-mclaren-hpe stuart-mclaren-hpe commented Nov 11, 2024

Previously the following input was accepted by the server:

{
  "name": "mclaren-ds19",
  "sizeInBytes": 17179869184,
  "storageSystemId": "126fd201-9e6e-5e31-9ffb-a766265b1fd3",
  "targetHypervisorClusterId": "",
  "volumeInfo": {
    "deduplication": false,
    "encryption": {
      "cipher": "None"
    },
    "qos": {
      "iopsLimit": -1,
      "mbpsLimit": -1
    }
  },
  "datastoreType": "VMFS"
}

But this now triggers an error response.

NimbleVolumeInfo.Qos.MbpsLimit is less than minimum value. NimbleVolumeInfo.Qos.IopsLimit is less than minimum value.

In particular, providing -1 to imply default values for limits no longer seems to work.

Rather than specifying limits in this way, we now remove them entirely. We also do the same for other parameters (eg encryption) to pick up default values.

The create datastore POST request body will now look like:

{
  "name": "datastore-100",
  "sizeInBytes": 17179869184,
  "storageSystemId": "f9689284-0bbd-5bf1-981f-b9799bbc106c",
  "targetHypervisorClusterId": "",
  "datastoreType": "VMFS"
}

Previously the following input was accepted by the server:

```
{
  "name": "mclaren-ds19",
  "sizeInBytes": 17179869184,
  "storageSystemId": "126fd201-9e6e-5e31-9ffb-a766265b1fd3",
  "targetHypervisorClusterId": "",
  "volumeInfo": {
    "deduplication": false,
    "encryption": {
      "cipher": "None"
    },
    "qos": {
      "iopsLimit": -1,
      "mbpsLimit": -1
    }
  },
  "datastoreType": "VMFS"
}
```

But this now triggers an error response:

```
NimbleVolumeInfo.Qos.MbpsLimit is less than minimum value. NimbleVolumeInfo.Qos.IopsLimit is less than minimum value.
```

In particular, providing `-1` to imply default values for limits
no longer seems to work.

Rather than specifying limits in this way, we now remove them
entirely. We also do the same for other parameters (eg encryption) to
pick up default values.

The create datastore POST request body will now look like:

```
{
  "name": "datastore-100",
  "sizeInBytes": 17179869184,
  "storageSystemId": "f9689284-0bbd-5bf1-981f-b9799bbc106c",
  "targetHypervisorClusterId": "",
  "datastoreType": "VMFS"
}
```
@stuart-mclaren-hpe stuart-mclaren-hpe merged commit da1477c into main Nov 11, 2024
5 checks passed
@stuart-mclaren-hpe stuart-mclaren-hpe deleted the datastore-default-changes branch November 11, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants