I ensured my Bullseye Pi OS was up to date with apt. I cloned my V5 SD card running Bullseye, Pi-hole V5 and Unbound. I ran pihole -up. The script ran and left me with the following:
Unbound working as before on port 5335
dhcpcd listening on port 68
FTL listening UDP/TCP on port 53 DNS
FTL listening port 443 for the web front end
FTL NOT running on port 80 or 8080
There was no prompt to disable Lighttpd or PHP
Lighttpd was still running on port 80.
Since the web server was running on just port 443 I tried https and that worked. Tested navigation in an old Safari, it was quick, no sluggishness. I stopped and disabled lighttpd and restarted FTL and could now access over http.
No upstream DNS servers were configured - the reference to 127.0.0.1#5335 was gone
I have the V5 image saved so can repeat the upgrade as often as needed. Is there anything you would like to set up to test, or any data you would like to collect before, during or straight after?
I have a suspicion that perhaps the parsing of the string 127.0.0.1#5335 is causing it to be lost - I can test this by changing the upsteam server to one in the list in one of the tests.
I am using unbound as upstream as well (if on 127.0.1.1#5335), and my v6 upgrade succeeded without a glitch (including the lighttpd (dis)continuation choice).
I just came across a user's debug log this noon that suggests the same has happened when they upgraded their Pi-hole to v6.
Unfortunately, that user deleted the topic about 5 minutes before I was able to provide my answer, but maybe you are still able to access it here.
I'd be interested in finding out whether my proposed fixes would have worked:
I have fixed both in order to peruse the interface. But I can reimage and start over. I'll test these now and report back shortly.
Sounds like parsing isn't the right direction then โ something about my system (and presumably others) is causing parts of the process to be skipped, such as carrying forward or migrating certain things and offering interactive choices. I included the upgrade process in full. I don't know what the choice looks like, but as you can see it just went through all the to the end and said it was done.
[โ] tcp:0.0.0.0:8081 is in use by pihole-FTL
[โ] tcp:0.0.0.0:443 is in use by pihole-FTL
[โ] tcp:[::]:8081 is in use by pihole-FTL
[โ] tcp:[::]:443 is in use by pihole-FTL
I did another test with this image, where in V5, before upgrading
removed all the adlists (58) except the original Steven Black default one at the top of the list
removed all domains (99), a mix of exact and regex white and blacklist entries
removed all clients (2) which had been present in an unrestricted group
removed the unrestricted group, leaving just the Default group
updated Gravity
rebooted
Then did the upgrade. No change in previously reported results.
I was testing upgrading from the same OS, etc but a simplified setup more akin to how Pi-hole V5 was after a new install, in case quantities of lists or some obscure regex rules were being parsed in some edge case way.
Another test, disabling the DHCP server and deleting the leases in V5 before upgrading, followed by a reboot.
Then did the upgrade. No change in previously reported results.
I was testing if the DHCP server being enabled or disabled made any difference to it being disabled after the upgrade. Made no difference, became disabled either way.
I did just check your Tricorder logs and it seems the migration step wasn't executed for you, and, hence, your v6.0 started with default (empty) configuration in pihole.toml - that's why your upstream server is gone and also why you got a new randomly generated web password, etc.
The only thing I can see right now that would skip migration is if /etc/pihole/pihole.toml would exists before the update. But this shouldn't be the case, right?
Maybe a sudo bash -x pihole -up in your image could shine some light on this.
That's correct, there is no /etc/pihole/pihole.toml before the update. I've just double-checked to be 100% sure.
I did actually try sudo bash -x pihole -up yesterday, but it got as far as an exec sudo bash /x/x/something.sh script for the main install and stopped showing extra info from there. I think (not totally sure from memory) it was before the ASCII logo is displayed.
Sorry I can't recall the path or name of the script, but I think I need to get a +x into that command too, in order to capture diagnostics for the whole update. Any ideas where I do that? I did have a look around at the time to hunt down where the exec line was coming from but couldn't find it.
Is that the exact command needed? I can try it now if so and capture everything.
Edit: Looking at it I thnk that was the script that was called by exec I mentioned above, but it was exec sudo that script so I assume sudo is needed at this stage?
If I run the script with sudo it fails as below. I had this error cropping up yesterday when testing.
...
+ curl -sSL --fail https://github.com/pi-hole/ftl/releases/latest/download/pihole-FTL-aarch64-linux-gnu -o pihole-FTL-aarch64-linux-gnu
curl: (22) The requested URL returned error: 404
+ popd
+ printf '%b %b %s\n' '\r' '[โ]' 'Downloading and Installing FTL'
[โ] Downloading and Installing FTL
+ printf ' %b Error: URL %s/%s not found%b\n' '' https://github.com/pi-hole/ftl/releases/latest/download pihole-FTL-aarch64-linux-gnu ''
Error: URL https://github.com/pi-hole/ftl/releases/latest/download/pihole-FTL-aarch64-linux-gnu not found
+ return 1
+ return 1
+ printf ' %b FTL Engine not installed\n' '[โ]'
[โ] FTL Engine not installed
+ exit 1
If I run it without sudo then it goes all the way through but then only gets as far as the exec statement and stops showing the extra info, same as doing a bash +x pihole -up. The script continues without the extra info showing and this completes the upgrade to V6 but misses out the migration as previously.
...
+ printf ' %b %s\n' '[i]' 'Root user check'
[i] Root user check
+ printf ' %b %bScript called with non-root privileges%b\n' '[i]' '' ''
[i] Script called with non-root privileges
+ printf ' The Pi-hole requires elevated privileges to install and run\n'
The Pi-hole requires elevated privileges to install and run
+ printf ' Please check the installer for any concerns regarding this requirement\n'
Please check the installer for any concerns regarding this requirement
+ printf ' Make sure to download this script from a trusted source\n\n'
Make sure to download this script from a trusted source
+ printf ' %b Sudo utility check' '[i]'
[i] Sudo utility check+ is_command sudo
+ local check_command=sudo
+ command -v sudo
+ printf '%b %b Sudo utility check\n' '\r' '[โ]'
[โ] Sudo utility check
+ [[ /etc/.pihole/automated install/basic-install.sh == \b\a\s\h ]]
+ exec sudo bash '/etc/.pihole/automated install/basic-install.sh' --unattended
[โ] Root user check
... carries on without the extra info
You should be able to test this with in the same way that @MichaIng did in his comment at the bottom of PR 5968 (though might need some sudo in here to edit the file)
I'm a bit lost - does this mean the V5 to V6 migration being skipped is fixed if I do that tweak before the upgrade? Or does it mean that running a diagnostic install, to try and inspect that problem, is fixed in with this tweak?