-
Notifications
You must be signed in to change notification settings - Fork 138
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
[Rock-ons] Share mapping is ignored if the same share is chosen #2064
Comments
I'm currently working on this.
Indeed, although it would seem elegant to simply remove the share from the list of selectable shares, it actually seems detrimental:
I think a good form validation letting the user know that the current form is invalid because one share was selected multiple would be clearer and more intuitive to the user. @phillxnet , as always, let me know if I'm missing a glaring problem with that. 😃 |
Selecting the same share to be bound to multiple volumes of the same container is not yet supported by Rockstor. Add a new validation rule isDuplicate to detect such instances of a share being selected as the option for more than one volume and return a specific error message accordingly.
Following ba87d74, we now have validation for shares selected multiple times, in addition to the currently existing "Required" rule. The examples below are using the ecoDMS 18.09 Rock-On to illustrate various validations outputs; it has 4 volumes defined. Note that all validations occur upon clicking the "Next" button. |
Selecting the same share to be bound to multiple volumes of the same container is not yet supported by Rockstor. Add a new validation rule isDuplicate to detect such instances of a share being selected as the option for more than one volume and return a specific error message accordingly.
Selecting the same share to be bound to multiple volumes of the same container is not yet supported by Rockstor. Add a new validation rule isDuplicate to detect such instances of a share being selected as the option for more than one volume and return a specific error message accordingly.
…_shares_selection Add form validation for share selected multiple times #2064
Closing as: |
At rock-on install wizard, if the same share is selected for two or more volumes, only the first one is saved and sent to the rock-on API for the rock-on install.
Illustration
For instance, if the share
emby-conf
is selected for both volume mappings of the Emby server rock-on (see Picture 1 below), only the mapping for Media Storage is saved (see Picture 2 below).Picture 1
Picture 2
Consequence
Although docker still runs the container, Rockstor detects the install as failed, but no error is thrown to the user.
Cause
I suspect this is simply due to the fact that the
share:volume
mapping is stored as a dict, with the share as key. As keys must be unique, the each new mapping value overwrites the previous one. The related code is:rockstor-core/src/rockstor/storageadmin/static/storageadmin/js/views/rockons.js
Lines 603 to 607 in 3ad7eee
Resolution options
Although it may be recommended to choose a dedicated share for each mapping, this is not explicitly mentioned during the install wizard, but we may choose to enforce the choice of different shares for each volume mapping. This could be done with any combination of:
Some users may still prefer to use the same share for multiple mappings, however, so we might rewrite how this form information is parsed. This would require a substantial rewrite of both the front- and back-end of things, however.
The text was updated successfully, but these errors were encountered: