@darkSideOfPink opened this Issue on February 3rd 2022

In Matomo 4.6.2 the option PrivacyManager.ipAnonymizerEnabled is overwritten when the pod is restarted.

Expected Behavior

The value of ipAnonymizerEnabled stays the same in the database

Current Behavior

After a restart, the value is changed to 0

Steps to Reproduce (for Bugs)

  1. Start Matomo, go to Administration -> Privacy -> Anonymize data
  2. Check the Anonymize Visitors' IP addresses
  3. Restart Pod
  4. Start Matomo, go to Administration -> Privacy -> Anonymize data

Context

I'm trying to get this working on a OpenShift platform. I'm not allowed to use a PVC

Your Environment

  • Matomo Version: 4.6.2
@sgiehl commented on February 4th 2022 Member

@darkSideOfPink Thanks for the report. So is this more likely a display issue? The values is stored correctly in the database, but the UI doesn't reflect it. Or is the UI value only changing after restart?

@darkSideOfPink commented on February 4th 2022

@sgiehl No, it's more then a display issue, it doesn't hide the IP addresses anymore either, the value in de database is changed after restart, so the option is actually altered

@sgiehl commented on February 4th 2022 Member

That sound weird.
So the value is changed in the database when you change it in the UI, but is reset when restarting pod?
Is there anything done with Matomo or the database upon restart?

@darkSideOfPink commented on February 4th 2022

Yes, I find it weird too. Especially since other values aren't changed. There is nothing done with Matomo or the database upon restart as far as I could track down. Like I said, on my local computer with persistent volume it does work, so it feels like it gets the value from there somewhere and since there isn't a persistent volume, it uses the default? I'm not sure, but like I said, other values (like the amount of bytes obscured) aren't changed

@sgiehl commented on February 4th 2022 Member

Those settings are both stored the same way. So if one gets lost, actually the other one should reset too.

For what exactly are you using a non persistent volume? Matomo requires at least the config to be persistent

Note: There are only two places where the ipAnonymizer is disabled:

  • When calling the API method PrivacyManager.setAnonymizeIpSettings with anonymizeIPEnable=0
  • Within the installation process.

And the default value should actually be true...

@darkSideOfPink commented on February 7th 2022

Thank you for your reply. I looked into it. The installation does get called when the pod is restarted because it doesn't have persistant storage (so no config file). I will try to convince the company to use persistant storage. Still find it odd only this value is changed

@sgiehl commented on February 7th 2022 Member

@darkSideOfPink maybe copying in the config file from an external static source might be another option.
But not having the config.ini.php persistent is not recommended. As changing some settings in the UI or even when updating Matomo might add/change the config file. And that might get lost on restart in your case and could in some cases even cause other trouble.

Powered by GitHub Issue Mirror