ronivay / XenOrchestraInstallerUpdater

Xen Orchestra install/update script
GNU General Public License v3.0
1.16k stars 189 forks source link

Possibility to update\install certain commit. #143

Closed TristisOris closed 1 year ago

TristisOris commented 1 year ago

requried for debugging when something is broken. we modified script a bit to update 1by1 commit.

38 COMMITVER="${COMMITVER:-"4dc7575d5bed3851a800840897f1ae3e19f224b8"}"                                                                                                       
578 runcmd "cd \"$XO_SRC_DIR\" && git checkout -f "${COMMITVER}""

just a stupid manual mode, need to change commit name at COMMITVER, then remove /xo folder and run script to install build you need.

Would be nice if you can make this more interactive with startup menu and commit selection.

tldr: that long story begins here) why we need to check every commit. https://xcp-ng.org/forum/topic/6268/pool-is-connected-but-unknown-pool/16?_=1662127957809

ronivay commented 1 year ago

Hi,

Installing from specific commit is already supported. See BRANCH setting in xo-install.cfg

TristisOris commented 1 year ago

wow unexpected. That was very hidden option) So can you make it more interactive please?

did some tests, it can downgrade also too. that great.

ronivay commented 1 year ago

Well yes and no. Variable name isn't the most descriptive for this use case. It should be clear what you can do with it if you spare 1min to read the config file.

What do you mean with interactive exactly? How?

TristisOris commented 1 year ago

same way as now implemented the update procedure, via menu. And add commit name not permanent inside script.

ronivay commented 1 year ago

Ok, i see. I don't get the point though. What benefit does it give over setting it in config? I only see it as confusing menu option.

TristisOris commented 1 year ago

Not a big benefit, just save a bit time if really need to check 5-10+ commits one by one. And you will not forget to rollback changes at code) At least this feature not documented anywhere, or i can't find it.

ronivay commented 1 year ago

Okay. Yeah i don't see this being used very often (as it's for debugging really) and for that reason the menu option just seems wrong as you save maybe few seconds with it compared to changing it in the config file. Also easier to keep track what you installed last time as it's present in the config. There's no need to do rollbacks if you want to make installations from many different commits like this, each update is a completely separate installation (which makes the rollback option in menu available), using the same persistent data XO has saved previously.

I've done the exact same debug procedure as you did now, installing from multiple different commits one by one trying to pinpoint specific issue and tbh i've never missed such menu option :)

TristisOris commented 1 year ago

didn't check yet how rollback works, it say that it store onyl 3 checkpoints, or am i wrong? anyway thanks. got it.

ronivay commented 1 year ago

It will list all installations you have (by date & time) and ask to choose one. Rollback itself is almost instant.

Yeah by default only 3 installations are stored. This can also be changed from config file to as high as you want.

ronivay commented 1 year ago

Anyway, thanks for suggestion. I appreciate all of them even if i don’t always agree :) will definitely rethink this if there’s any similar request later on.

Will close this now. If there’s anything to add, feel free to comment.