rockstor / rockstor-core

Linux/BTRFS based Network Attached Storage(NAS)
http://rockstor.com/docs/contribute_section.html
GNU General Public License v3.0
553 stars 137 forks source link

Rockons: Invalid environment variable (...) #1588 #2885

Closed phillxnet closed 1 month ago

phillxnet commented 1 month ago

Based on #1688 by @anatox from 2017! lightly modified for current testing branch.

Rock-on front-end install wizard does not collate container info regarding Rock-on defined environment elements. Affects multi-container Rock-ons only. Results in back-end failure to successfully assign user-input environmental variables. Resolve by adding a containerid dimension to the environmental matrix created by the install wizard, and updating the back-end Rock-on instantiator to take advantage of this info. Previously a reverse engineering approach was taken: which cannot work for example, where two containers, within the same Rock-on definition, use the same environmental variable name.

See Issue #1588

phillxnet commented 1 month ago

@FroggyFlox & @Hooverdan96 last commit looks to addresses issue comment: https://github.com/rockstor/rockstor-core/issues/1588#issuecomment-2284257824 with this PR's in-development branch:

Fix Rock-on pre-install wizard env summary re now listing containers dimension, not the Env's we entered.

Before (within PR branch) :

Rock-ons-install-wizard-env-summary-issue

After (last commit):

Rock-ons-install-wizard-env-summary-proposal

In time we can modify these tables to account of container relevance but for now we do have larger issues a-foot. Open to simple enhancements where we can instead show the container name: but an approach to retrieving this escaped my JS time available for what is essentially a nice-to-have aesthetic that we can approach later. Mostly interested in establishing the new env per container capability with this PR. Thoughts/suggestions as always welcome.

phillxnet commented 1 month ago

We also have, with this branch, successful install of a Rock-on with no environment entries, in this case Gollum: https://github.com/rockstor/rockon-registry/blob/master/gollum.json

And the same for a Rock-ons with only a single environment variable:

Single-environment-entry-Rock-on

[13/Aug/2024 20:03:47] DEBUG [storageadmin.views.rockon_id:109] install request with share_map={}, port_map={'9980': 9980}, dev_map={}, cc_map={}, env_map={'4': {'domain': 'rleap15-6.lan'}}

Post installation we have the following via the Rock-ons's spanner icon:

Single-environment-entry-Rock-on-installed

N.B we do look to have a reversal of columns here: unrelated to ongoing changes associated with this PR:

phillxnet commented 1 month ago

Moving to squash and re-present.