pi-hole/pi-hole

Temperature keeps reverting to Celsius from Fahrenheit when updating

jedis00 opened this issue · 27 comments

Versions

pihole -v

Pi-hole version is v5.17.3 (Latest: v5.17.3)
web version is v5.21 (Latest: v5.21)
FTL version is v5.24 (Latest: v5.24)

Platform

Debian 11 VM

Expected behavior

Retain temperature readout measurement setting

Actual behavior / bug

Reverts to celsius from fahrenheit after updating.

EDIT - Also reverts when checking the next day, when no updates have been done.

Steps to reproduce

See above.

Debug Token

https://tricorder.pi-hole.net/fNRjaTMa/

You completely ignored the help template.

There is nothing to fill out. Latest version, Fahrenheit is set. If you update it via ssh, it reverts back to Celsius. That's all a developer needs to fix it.

This is not happening with other users, so if there is something really broken, we need to know exactly what is the issue, including your specific details.

Please follow the template, specially the debug log.

As I've been tagged (I don't really know why) I'll reiterate...

"It's broken, fix it" is not nearly enough for us to go on. The template is there to help us help you, and to more easily diagnose the issue. As RD mentioned, we've not had any other reports of this, so this is likely a configuration issue. But I can only guess.

It's happened across 2 different installs since 2018 and not with restoring a config. On a raspberry pi (raspbian), and in a VM (Debian 11) ... I've just become accustomed to updating it every time I login to the admin page after an update.

https://tricorder.pi-hole.net/fNRjaTMa/

@PromoFaux Updated original post.

@yubiuser Updated original post.

Maybe a file permission issue - what is the output of ls -lah /etc/pihole please?

@PromoFaux

# ls -lah /etc/pihole
total 1.6G
drwxrwxr-x  3 pihole pihole 4.0K Jan 18 09:28 .
drwxr-xr-x 72 root   root   4.0K Jan 16 13:44 ..
-rw-r--r--  1 root   root     65 Nov 30 13:45 adlists.list
-rw-r--r--  1 root   root    468 Nov 30 13:57 custom.list
-rw-r--r--  1 pihole pihole    0 Apr 24  2023 dhcp.leases
-rw-r--r--  1 root   root    651 Jan 16 13:43 dns-servers.conf
-rw-rw-r--  1 pihole pihole  11M Jan 17 15:31 gravity.db
-rw-rw-r--  1 pihole pihole  11M Jan 17 15:30 gravity_old.db
-rw-r--r--  1 root   root    824 Jan 16 13:43 install.log
-rw-r--r--  1 root   root   3.2M Jan 17 15:31 list.1.raw.githubusercontent.com.domains
-rw-r--r--  1 root   root     95 Jan 16 13:43 list.1.raw.githubusercontent.com.domains.sha1
-rw-r--r--  1 root   root     26 Jan 17 15:31 list.10.www.dropbox.com.domains
-rw-r--r--  1 root   root     86 Jan 17 15:31 list.10.www.dropbox.com.domains.sha1
-rw-r--r--  1 root   root   403K Jan 16 13:43 list.3.sysctl.org.domains
-rw-r--r--  1 root   root     80 Jan 16 13:43 list.3.sysctl.org.domains.sha1
-rw-r--r--  1 root   root    521 Jan 16 13:43 list.5.s3.amazonaws.com.domains
-rw-r--r--  1 root   root     86 Jan 16 13:43 list.5.s3.amazonaws.com.domains.sha1
-rw-r--r--  1 root   root    43K Jan 16 13:43 list.6.s3.amazonaws.com.domains
-rw-r--r--  1 root   root     86 Jan 16 13:43 list.6.s3.amazonaws.com.domains.sha1
-rw-r--r--  1 root   root     65 Jan 17 15:31 local.list
-rw-r--r--  1 root   root    241 Apr 24  2023 logrotate
-rw-r--r--  1 pihole pihole 3.0M Jan 16 13:43 macvendor.db
drwxr-xr-x  2 root   root   4.0K Apr 24  2023 migration_backup
-rw-rw-r--  1 pihole root    146 Jan 16 13:43 pihole-FTL.conf
-rw-rw-r--  1 pihole pihole 1.6G Jan 18 09:28 pihole-FTL.db
-rw-r--r--  1 root   root    506 Jan 17 20:23 setupVars.conf
-rw-r--r--  1 root   root    321 Jan 17 19:14 versions

Just checked against a known-working installed version, and permissions match.

Can you verify, do you currently have F set for temperatue unit in the web interface? If you do, please run a fresh debug token

No, looks like it had reverted back to celsius again. Changed it back to fahrenheit and uploaded new log: https://tricorder.pi-hole.net/857sJbRh/

@PromoFaux Hey, wondering if you had a chance to look at it, and if I need to refresh the debug token. Thanks!

I've tried to reproduce this, but I cannot. Note the value of TEMPERATUREUNIT in setupVars.conf before and after an update:

pi@raspberrypi:~ $ pihole -v
  Pi-hole version is v5.17.2 (Latest: v5.17.3)
  web version is v5.21 (Latest: v5.21)
  FTL version is v5.24 (Latest: v5.24)
pi@raspberrypi:~ $ cat /etc/pihole/setupVars.conf | grep TEMPERATURE
TEMPERATUREUNIT=F
pi@raspberrypi:~ $ pihole -up
  [✓] Update local cache of available packages
  [i] Existing PHP installation detected : PHP version 7.4.33
  [✓] Checking for git
  [✓] Checking for iproute2
  [✓] Checking for dialog
  [✓] Checking for ca-certificates

  [i] Checking for updates...
  [i] Pi-hole Core:     update available
  [i] Web Interface:    up to date
  [i] FTL:              up to date

  [i] Pi-hole core files out of date, updating local repo.
  [✓] Check for existing repository in /etc/.pihole
  [i] Update repo in /etc/.pihole...HEAD is now at 19bfa08b Pi-hole core v5.17.3 (#5520)
  [✓] Update repo in /etc/.pihole

  [i] If you had made any changes in '/etc/.pihole/', they have been stashed using 'git stash'

[SNIP IRRELEVANT UPDATE OUTPUT]

  [✓] Update complete!

  Current Pi-hole version is v5.17.3
  Current web version is v5.21
  Current FTL version is v5.24
pi@raspberrypi:~ $ cat /etc/pihole/setupVars.conf | grep TEMPERATURE
TEMPERATUREUNIT=F

Do you have some sort of process that is restoring/overwriting the file /etc/pihole/setupVars.conf?

@PromoFaux No. Vanilla install. Nothing special. How often does the process reread the config file for values to apply changes? Does it do it on a cadence or is it manually triggered by something?

The only time the process is triggered is if you change the temperature in the dashboard... Maybe someone else has access to your dashboard and prefers to see Celsius. It's a global setting, not per-browser.

It can also be set with pihole -a -c (or pihole -a -f, or pihole -a -k), though this function only exists for the web interface to call when you set it in the web interface.

I've checked through the code, and there is no other path to setting this value. There is clearly something "other" about your install(s), but what - I cannot say. If it were a wider issue, we'd have heard something by now.

V6 will change how these things are handled entirely. Maybe it's worth opting into the beta on one of your devices to see if you still have this issue.

https://pi-hole.net/blog/2023/10/09/pi-hole-v6-beta-testing/

Yeah, not sure. I don't login to look at it often. It reverted overnight, even without doing an update. I cloned the VM and had them both set as Fahrenheit. Only one reverted. Some kind of thing is triggering it, but it's a mystery. These were clean Debian 11 installs and only running the pi-hole installation. No other customizations done.

FYI, I am having the same issue. Entering "pihole -a -f" doesn't work. It's not a critical issue, but simply annoying.

@OldGrumpyBear

In the issue reported above, the temperature unit is correctly set (and apparently all commands are working), but the temperature unit is lost only when Pi-hole is updated to a new version.

Entering "pihole -a -f" doesn't work.

This is a completely different issue.

Please, open a new issue following the template, or ask your questions at our Discourse Forum.

I checked the file /etc/pihole/setupVars.conf, and it has TEMPERATUREUNIT=F. Yet on the GUI it keeps reverting back to Celsius. I'm running pihole and gravity on a Ubuntu 23.10 system.

@OldGrumpyBear

In the issue reported above, the temperature unit is correctly set (and apparently all commands are working), but the temperature unit is lost only when Pi-hole is updated to a new version.

Entering "pihole -a -f" doesn't work.

This is a completely different issue.

Please, open a new issue following the template, or ask your questions at our Discourse Forum.

It's actually doing it outside of updating now. Set to F and the next day, GUI shows C again.

@OldGrumpyBear

In the issue reported above, the temperature unit is correctly set (and apparently all commands are working), but the temperature unit is lost only when Pi-hole is updated to a new version.

Entering "pihole -a -f" doesn't work.

This is a completely different issue.

Please, open a new issue following the template, or ask your questions at our Discourse Forum.

If you re-read the thread, the issue continously occurs, not "only when pihole is updated."

@PromoFaux Can we get this bug set to open?

I'm still unable to reproduce this. Were you able to test against V6? Maybe on another device if you're not ready to jump into the beta

edit: fat fingers

I have three instances of pi-hole running. One on a dedicated Raspberry Pi 4, and two as VMs. All three instances does the same thing. All are the latest of version 5. I can upgrade one of the VMs to version 6 .... once I refresh my memory on how to do that.

I have three instances of pi-hole running. One on a dedicated Raspberry Pi 4, and two as VMs. All three instances does the same thing. All are the latest of version 5. I can upgrade one of the VMs to version 6 .... once I refresh my memory on how to do that.