update loop, update fails

General support for the Pi-Star System
pa3kc
Posts: 4
Joined: Thu Aug 16, 2018 2:04 pm

update loop, update fails

Post by pa3kc »

I run into an update loop with the latest Pi-Star_RPi_V4.1.4_09-Jun-2021.

Clean install.

After first login I run:

Code: Select all

[email protected](rw):~$ sudo /usr/local/sbin/pistar-update
Updating OS...

Hit:1 http://httpredir.debian.org/debian buster-backports InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Done
Checking nginx config
Stopping Services...
Done
Updating DV Binaries...
No updates for /usr/local/bin available
Done
Updating Pi-Star Binaries...
Updating /usr/local/sbin...
fatal: not a git repository (or any of the parent directories): .git
Found a new version of pistar-update...
From https://github.com/AndyTaylorTweet/Pi-Star_Binaries_sbin
 * branch            master     -> FETCH_HEAD
Updating db3daba..9e36263
error: Your local changes to the following files would be overwritten by merge:
        pistar-upnp.service
Please commit your changes or stash them before you merge.
Aborting
Update to new version of pistar-update was not successfull, forcing update...
error: Entry 'pistar-upnp.service' not uptodate. Cannot merge.
fatal: Could not reset index file to revision 'origin/master'.
Restarting update process with the new version...
Updating OS...

Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Hit:3 http://httpredir.debian.org/debian buster-backports InRelease
^Cading package lists... 0%
I stop it there with CTRL-C it keeps doing this over and over.

It seems to fail on the git updates.


// EDIT:
Just checked with Pi-Star_RPi_V4.1.4_08-Feb-2021 clean install and updates/upgrades go without problems.
KE7FNS
Pi-Star Team
Posts: 1951
Joined: Wed Apr 17, 2019 11:11 pm

Re: update loop, update fails

Post by KE7FNS »

pa3kc wrote: Sun Jun 20, 2021 10:38 am I stop it there with CTRL-C it keeps doing this over and over.
It is designed to run the updates again if a new update script was download during an update, so the looping is wanted.
pa3kc wrote: Sun Jun 20, 2021 10:38 am It seems to fail on the git updates.
Not sure why git is unable to update. I'll mention it to Andy.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
KE7FNS
Pi-Star Team
Posts: 1951
Joined: Wed Apr 17, 2019 11:11 pm

Re: update loop, update fails

Post by KE7FNS »

pa3kc wrote: Sun Jun 20, 2021 10:38 am It seems to fail on the git updates.
After discussing things with Andy it appears your SD card could be corrupted. There is something wrong and it isn't working as it is supposed to.

We both tested updating and didn't get any errors.

I tested updates on a machine I only power up for testing, so it never runs any automatic updates cause it is normally powered off.

Code: Select all

error: Your local changes to the following files would be overwritten by merge:
pistar-upnp.service
Please commit your changes or stash them before you merge.
Aborting
Updating d79cc65..6a6efdd
Updates were not successfull, reverting to Pi-Star original files...
HEAD is now at 6a6efdd Update pistar-upnp.service
Done
I suggest reimaging the SD card with the latest image and restoring your configuration.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
CT2HRB
Posts: 18
Joined: Thu Apr 26, 2018 8:15 pm

Re: update loop, update fails

Post by CT2HRB »

@pa3kc: just to confirm, you did see "Restarting update process with the new version..." (along with other lines) again, and again, and again... right? (non-stop, on a single run of the update script) Seeing it restart update once is normal as KE7FNS said, forever it's not normal.

@MW0MWZ: this may be related to what I pointed to you on github, that could eventually happen (comments):
https://github.com/AndyTaylorTweet/Pi-S ... 0119dd321e
pa3kc
Posts: 4
Joined: Thu Aug 16, 2018 2:04 pm

Re: update loop, update fails

Post by pa3kc »

KE7FNS wrote: Sun Jun 20, 2021 11:07 pm
I suggest reimaging the SD card with the latest image and restoring your configuration.
I did re-imaged the SD card twice but got the same results.

With the February version Pi-Star_RPi_V4.1.4_08-Feb-2021 I had not problems and all is working with updating/upgrading.

For me this isn't a issue any more.

It's nice to see the Pi-star project is still there after these years.
A big thanks to all devs and volunteers for creating and maintaining the project!

73
KE7FNS
Pi-Star Team
Posts: 1951
Joined: Wed Apr 17, 2019 11:11 pm

Re: update loop, update fails

Post by KE7FNS »

pa3kc wrote: Mon Jun 21, 2021 9:47 am With the February version Pi-Star_RPi_V4.1.4_08-Feb-2021 I had not problems and all is working with updating/upgrading.
It doesn't make any sense that using an older image would update correctly because its further away from the latest git commit.

You should check your SD card for RPi compatibility.
https://elinux.org/RPi_SD_cards
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
KE7FNS
Pi-Star Team
Posts: 1951
Joined: Wed Apr 17, 2019 11:11 pm

Re: update loop, update fails

Post by KE7FNS »

Nevermind.

It appears to be an issue with the latest image.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
User avatar
MW0MWZ
Site Admin
Posts: 1357
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK
Contact:

Re: update loop, update fails

Post by MW0MWZ »

I was quite sure (initially) that this was not my error... but it appears a slice of humble pie is waiting for me... d'oh.
Working on a fix for this issue at the moment, more news on that very soon.
Andy

73 de MW0MWZ
http://pistar.uk
CT2HRB
Posts: 18
Joined: Thu Apr 26, 2018 8:15 pm

Re: update loop, update fails

Post by CT2HRB »

I told you it could happen, you didn't believe me :P

The issue is triggered specifically when user tries to fetch an update that includes both updated pistar-update and pistar-upnp.service files at same time. Users who updated progressively will not experience the problem as they likely updated each file at a time on different days, users that didn't update for some days (or maybe with fresh image) may get the problem as they will likely fetch both files at same time.
User avatar
MW0MWZ
Site Admin
Posts: 1357
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK
Contact:

Re: update loop, update fails

Post by MW0MWZ »

The exciting problem here is that this is fixable, but only with manual intervention currently - because while I have fixed the update script, you wont get it if you are already looping....

the following action on the CLI will cure it;

Code: Select all

[email protected](ro):~$ rpi-rw
[email protected](rw):~$ sudo pkill pistar-update
[email protected](rw):~$ sudo rm -rf /usr/local/sbin/pistar-upnp.service
[email protected](rw):~$
From here you can either run the update from the cli or the dashboard and it will fix itself.
I'm building a pre-fixed version of the image that will be uploaded shortly.
Andy

73 de MW0MWZ
http://pistar.uk
Post Reply