Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.0 upgrade never "finishes" #48

Closed
m4z opened this issue Oct 4, 2021 · 2 comments · Fixed by #49
Closed

4.0 upgrade never "finishes" #48

m4z opened this issue Oct 4, 2021 · 2 comments · Fixed by #49

Comments

@m4z
Copy link

m4z commented Oct 4, 2021

Version 4 seems to report a shorter version, so the health check at the end repeats indefinitely:

# bash -x rocketchatctl update
[…]
+ systemctl start rocketchat
+ rocketchat_health_check
+ local count=0
+ '[' 0 -eq 1 ']'
+ '[' 0 -eq 150 ']'
+ get_rocketchat_current_version
+ systemctl status rocketchat
++ cat /lib/systemd/system/rocketchat.service
++ awk -F= '{print $3}'
++ grep PORT
+ PORT=3000
++ curl --interface lo http://localhost:3000/api/info
++ cut '-d"' -f4
+ current_rocketchat_version=
+ [[ '' =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]        # <=== server not yet running…
+ sleep 2
+ (( count++ ))
+ echo 'Waiting up to 5 minutes for RocketChat server to be active ... 2'
Waiting up to 5 minutes for RocketChat server to be active ... 2
[…]
+ echo 'Waiting up to 5 minutes for RocketChat server to be active ... 30'
Waiting up to 5 minutes for RocketChat server to be active ... 30
+ '[' 0 -eq 1 ']'
+ '[' 15 -eq 150 ']'
+ get_rocketchat_current_version
+ systemctl status rocketchat
++ awk -F= '{print $3}'
++ grep PORT
++ cat /lib/systemd/system/rocketchat.service
+ PORT=3000
++ cut '-d"' -f4
++ curl --interface lo http://localhost:3000/api/info
+ current_rocketchat_version=4.0
+ [[ 4.0 =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]        # <=== regex doesn't match anymore
+ sleep 2
+ (( count++ ))
+ echo 'Waiting up to 5 minutes for RocketChat server to be active ... 32'
Waiting up to 5 minutes for RocketChat server to be active ... 32
[…]

I have aborted the script with ctrl-c, so I'm not sure what happens when the 5 minute timeout runs out (I assume the update will be aborted and the old version restored?).

@m4z
Copy link
Author

m4z commented Oct 5, 2021

Ironically (given #47), rocketchatctl now shows a perpetual update:

# rocketchatctl check-updates
Updates could be risky, you can use the backup option # rocketchatctl backup, to create a backup of the rocketchat database first. Please check that you have enough space in your system to store the backup.
Current update available for RocketChat server: from 4.0 to 4.0.0.

@geekgonecrazy
Copy link
Collaborator

This has now been released. 🙏 should be able to use: rocketchatctl upgrade-rocketchatctl to get latest version of rocketchatctl which should now upgrade properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants