jooskim/vic

verify_plugin_url() function is using a wrong URL

Closed this issue · 1 comments

VIC version:
Any version starting from 1.2

Additional details as necessary:
verify_plugin_url() is a function found in ui/installer/VCSA/install.sh and ui/installer/VCSA/upgrade.sh that checks if the plugin zip file actually exists on the fileserver on the VIC appliance before proceeding to register the plugin with vCenter Server. If the file does not exist for some reason (e.g. typo), the intended behavior is that the script fails. However, the current Go HTTPS server that is currently serving the Getting Started page is defective in a way that it doesn't throw a 404 error upon a request to a non-existent file.

What happens once verify_plugin_url() is called is that it runs a curl command for a GET request to a file named, say com.vmware.vic-v1.2.0.13700.zip, under https://${OVA_IP}:9443/, which is an incorrect path, as the file exists under https://${OVA_IP}:9443/files/. However, the Go server doesn't return a 404 response and hence it has not been caught until I found it in UI E2E tests.

Note that this does NOT actually impact the installation process; the installation completes without a n issue, as what is being an issue is the path used for plugin verification but not the path for actual registration. Furthermore, as long as the Getting Started page server does 404 handling incorrectly, this issue would remain invisible to end users. However, once the issue is resolved from the server side, it will start to impact the users.

Acceptance Criteria

  • Update verify_plugin_url() so that the script references the right URL
  • Update 18-1 Installer and 18-3 Upgrader tests to remove uses of BYPASS_PLUGIN_VERIFICATION

Fix is merged onto new-master which will basically become the master branch of the new VIC UI repo, and since there is no pending PR for this issue I am closing it.