Closed billgertz closed 2 years ago
Hi,
This feature actually is there already. Was implemented less than 2 months ago so if you had older version you probably haven't noticed it :) It doesn't only tell that script is old version, it'll also auto update it during execution if certain conditions apply.
There's a new configuration option for this in xo-install.cfg (defaults to true):
# Script will update itself if there's a newer version available. This assumes that script inside a git directory and remote is ronivay/XenOrchestraInstallerUpdater
# options: true/false
SELFUPGRADE=true
Obviously this doesn't help for those running older version where this isn't yet implemented but nothing i can do with that really.
Wow, too cool. Well, er, um, I shoulda have checked to see if this was already there. Thanks for already adding this feature. See your point on the impossibility adding feature to old code installs - arrow of time and all that. I’ll go ahead and just close this issue. Thanks again!
@ronivay
Have an idea that will help some users of this script out.
Could the xo-install.sh script warn when the local XenOrchestraInstallerUpdater repository is out of date?
Ran into my own blockheadedness when I was trying to update to the newest version of XO. I should have updated my local repository from your master before trying. Since I didn't, the upgrade understandably failed. Your updates to the install script were missing.
I would be happy to submit a PR that would do a simple test. This test would detect if the local git repository on the host is up to date before trying the upgrade. Using something along the lines of:
If the shell error code is non-zero, warn the administrator that they should probably update using:
If this sounds reasonable then I'll create a PR with the proposed changes - just let me know.
KR - bill