-
Notifications
You must be signed in to change notification settings - Fork 63
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
Update scripts #161
Comments
"git commands (like git pull) requires authentication on official skywire images, so it's not possible to update skywire software using its api" what do you mean requires authentication? |
For example, the script to check if there is a new update available, it asks for github username/password instead of directly printing out true/false
|
that could be a misconfiguration of .git/config |
root user doesn't have git config in his home dir, this is the content of project's git config
|
Adding some information taken from testing the upgrade with @mahansky last night on an Official Skyminer (using official images). Each pair of commands and their output are combined in script blocks below. git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean git rev-parse HEAD
28940f7f65285665f448dbf686230b9a7763f1c2 [ $(git rev-parse HEAD) = $(git ls-remote $(git rev-parse --abbrev-ref @{u} | \
sed 's/\// /g') | cut -f1) ] && echo "false" || echo "true"
Username for 'https://github.com':
Password for 'https://github.com':
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/samoslab/skywire.git/'
-bash: [: 28940f7f65285665f448dbf686230b9a7763f1c2: unary operator expected
true Note: the github repo referenced above. Can also confirm I was also seeing an issue with the
Can confirm that when I SSH into the Manager Node, its |
|
|
######ONLY FOR OFFICIAL IMAGES###### The steps to upgrade should be like this, the old commands from May should not be used because a new key will be created
After the pull an incognito tab should be used or clear the browser cache (Chrome). Other skywire installations should just use the update button from the web interface of the node or |
shift-ctrl-r / shift-cmd-r will reload a page with cache flush on chrome |
I have had the update process working on the official images for a couple months now. The issue is not with skywire or the update scripts but with the official images. The steps needed to get the update button from the frontend working on the official images are:
Regarding the above, the md5 hash is used to check if the update was successful and return this information to the front end (in this line), but I agree with @mahansky that this is not the best method of checking if the update was successful for several reasons:
There are other issues with the update process, but fixing the above will solve many of them. |
Problems
git
IMPORTANT: git commands (like git pull) requires authentication on official skywire images, so it's not possible to update skywire software using its api
Project won't update sometimes (not sure what the issue is), I temp. solved with with this skycoin/skywire@8c6247f
There is some kind of problem with $GOPATH env var when calling update endpoint, this is what it returns
fork/exec /src/github.com/skycoin/skywire/static/script/unix/check: no such file or directory
(path is not prepended with $GOPATH)https://github.com/skycoin/skywire/blob/2db347bd5ec2d322c9a7be507873a6a08fb0c9ea/pkg/node/api/api.go#L449
Windows
If the
%GOPATH%
variable contains spaces, following command will fail (quotes should fix it)https://github.com/skycoin/skywire/blob/669cf0742522268df8724a210456b580ef298dca/static/script/win/update-skywire.bat#L9
md5 hash
On unix platforms, md5 hash of node executable is calculated
https://github.com/skycoin/skywire/blob/master/static/script/unix/start
Idea
Don't discard the output from update scripts, return it from the API endpoint instead, so it can be displayed on the frontend to help with debugging
The text was updated successfully, but these errors were encountered: