hpe-storage / python-hpedockerplugin

HPE Native Docker Plugin
Apache License 2.0
36 stars 64 forks source link

file storage configuration not validated properly #605

Closed virendra-sharma closed 5 years ago

virendra-sharma commented 5 years ago

docker volume create -d hpe --name test1 -o help=backend -o filePersona command return output as DEFAULT_FILE=OK. whereas snapcpg mentioned in file storage configuration.

imran-ansari commented 5 years ago

@prablr79 , @wdurairaj , @nilangekarss This is about mixing configuration parameters of file and block in the same backend section. E.g. in a File driver backend, user specifies block specific parameters as well like snapcpg, replication etc and vice-versa..

In this case, the parameters that are not applicable to the configured driver are ignored as these are harmless.

I'm inclined to mark this as documentation issue rather than fixing it in code by putting checks for those parameters that have absolutely no impact on the functioning of the driver. Validation would have been required if those parameters had any negative effect on the driver.

Please let me know what's your take on this?

nilangekarss commented 5 years ago

@virendra-sharma As Imran pointed out it will only allow valid volume/persona option to be set in configuration file. If few of unsupported options are passed to file share creations these will be simply ignored by plugin . Same is the case of volume creations as well. This will not impact any functionality.

This can be documented with an example and this can be marked as documentation issue. Please provide your comments on same.

imran-ansari commented 5 years ago

@virendra-sharma - kindly let us know your thoughts on making this as a documentation issue.

virendra-sharma commented 5 years ago

@imran-ansari due to time constraint we can document this for this release, but will need to take it as enhancement for next release.

imran-ansari commented 5 years ago

Why is this high when it is harmless to specify Block configuration parameters under File backend section and vice-versa?

I would put this at low severity.

prablr79 commented 5 years ago

Reducing it to medium since this only document changes

prablr79 commented 5 years ago

https://github.com/hpe-storage/python-hpedockerplugin/blob/plugin_v2/docs/share_usage.md updated link..

virendra-sharma commented 5 years ago

Documentation updated with known issue, Hence closing this bug.

Documentation verification