dcos storage provider modify

ENTERPRISE

BETA

Modify a new volume provider.

WARNING: Beta Software This software may contain bugs, incomplete features, incorrect documentation, or other discrepancies. Contact Mesosphere before deploying a beta candidate service. Product support is available to approved participants in the beta test program. Contact support@mesosphere.io for information about participation.

dcos storage provider modify

Modify a new volume provider.

Synopsis

Arguments:

<path>    A URL or local path to the volume provider configuration JSON. If
          this is omitted the volume provider configuration JSON is read
          from STDIN.

For more information regarding volume providers and when you would use them, run dcos storage provider --help. The following section assumes that you are familiar with them and will describe how to modify the plugin configuration of a provider once it has been created.

You modify a volume provider by passing a JSON document to this command. The JSON configuration is read from <path> or from STDIN if no <path> is specified.

The modify configuration consists of multiple fields: name and spec.

The provider modify command supports a subset of the configuration fields that the provider create command supports. Specifically, you cannot modify the description, spec.plugin, spec.node, and spec.labels fields that were set during provider create. You can only modify the spec.plugin-configuration field.

The name field uniquely identifies the volume provider. It must match the name of an existing provider. This field is required.

The spec field is itself a nested structure containing the following fields: plugin, and plugin-configuration. At least one of plugin or plugin-configuration must be given. This field is required.

The spec.plugin field is itself a nested structure containing the following field: config-version. This field is optional. If it is not provided the provider’s plugin configuration is not modified.

The spec.plugin.config-version field specifies the plugin configuration version to use. You can specify the version of the plugin configuration that you want your provider to run. It can be an integer matching the desired plugin configuration version or you can specify the string “latest” in which case the newest plugin configuration version for the provider’s plugin is substituted.

The spec.plugin-configuration field is plugin specific. Consult the supported configuration items under the Volume Plugins section of the DC/OS Storage Service documentation (https://docs.mesosphere.com/services/beta-storage/). This field is optional. If it is not provided the provider’s plugin-configuration field is not modified.

Here is an example of the configuration JSON a “lvm” volume provider that is being modified. In this example, the lvm-ssds provider used to be configured with the xvdb device. It is now being reconfigured to use to xvdc device, too. It is also being updated to the latest version of the “lvm” plugin configuration.

{
    "name": "lvm-ssds",
    "spec": {
        "plugin": {
            "config-version": "latest"
        },
        "plugin-configuration": {
            "devices": ["xvdb", "xvdc"]
        }
    }
}
```bash

dcos storage provider modify [] [flags]

### Examples

1. Modify a LVM2 volume group called 'volume-group-1' from configuration in a local file called 'provider.json':

$ cat provider.json { “name”: “volume-group-1”, “spec”: { “plugin-configuration”: { “devices”: [“xvdb”, “xvdc”] } } }

$ dcos storage provider modify provider.json Successfully modified “volume-group-1”

2. Modify a LVM2 volume group called 'volume-group-1' from configuration passed on stdin:

$ cat <<EOF | dcos storage provider modify { “name”: “volume-group-1”, “spec”: { “plugin-configuration”: { “devices”: [“xvdb”, “xvdc”] } } } EOF Successfully modified “volume-group-1”