rockstor / rockstor-core

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

OpenVPN rock-on install wizard fails to show pre-install summary #2913

Open phillxnet opened 1 month ago

phillxnet commented 1 month ago

While developing against "Rockon pre & post-install summaries are inconsistent" #2904 an OpenVPN install wizard failed to show the pre-install config summary page: a second Confimation on the existing dialog continued the installation which succeeded successfully.

With debug enabled the following log resulted when installing this Rock-on: the only Rock-on remaining that uses the "custom_config" key: passed from front-end to backend in the following as cc_map

[04/Oct/2024 18:16:54] DEBUG [storageadmin.views.rockon_id:108] install request with share_map={}, port_map={'1194': 1194}, dev_map={}, cc_map={'servername': 'fqdn.fake.biz'
}, env_map={}

Browser console error:

Uncaught TypeError: can't convert undefined to object

with a reference to our storageadmin.js (all-in-one js lib) re:

nextPage: function() {
        var _this = this;
        var promise = !_.isNull(this.currentPage) ?
            this.currentPage.save() :
            $.Deferred().resolve();
        promise.done(function(result, status, jqXHR) {
            _this.incrementPage();
        });
        promise.fail(function(jqXHR, status, error) {
            console.log(error);
        });
    },

Post install the entered details appear as expected (post proposed changes associated with #2904) in the post install config summary:

Resource type Internal Reference External Reference / Configured value
Port 1194 1194
Custom servername fqdn.fake.biz
Hooverdan96 commented 1 month ago

May be it's also time to retire this docker image and switch to the offical one that's available (don't know when it was first posted) from openvpn, and possibly retire the final custom_config usage?

https://hub.docker.com/r/openvpn/openvpn-as

Has to be tested, but it seems that it's pretty self-contained and also contains an ui component.

phillxnet commented 1 month ago

@Hooverdan96 Agreed on all accounts. I'd not looked into the availability of an official image, and so if there is one available then it definitely our current offering - with the custom config and lots of command-line requirements. The Official one can't be much worse :) .

... and also contains an ui component.

OK, so that's a major win. Nice find. Yes, lets drop this Rock-on entirely and go in that direction.

Hooverdan96 commented 1 month ago

I opened #392 on the rockon-registry repo for this.