patchman icon indicating copy to clipboard operation
patchman copied to clipboard

New reported servers will not appear until I log out and log back in.

Open Borekss opened this issue 1 year ago • 5 comments

Here is how to reproduce the problem:

  • install patchman client on server Y
  • run patchman-client
  • run patchman -a
  • server Y is missing from the Hosts
  • log out - log in
  • server Y is displayed

I observed the same problem when assigning all Ubuntu versions to one OS Group. Maybe all DB changes are refreshed only after new login?

Borekss avatar Apr 17 '24 11:04 Borekss

If you disable memcached does that help?

furlongm avatar Apr 18 '24 00:04 furlongm

I find out that sometimes a new host is added right away and sometimes the next time I log in. I tried disabling

CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', 'LOCATION': '127.0.0.1:11211', 'OPTIONS': { 'ignore_exc': True, }, } }

and restarting apache. Nothing changed. But I found that if I add the OS to a group for example, it helps to either log out or wait a few minutes. Then the change will show up. Regardless if memcached is on or off.

Borekss avatar Apr 18 '24 13:04 Borekss

Caching is indeed the issue. Either disable caching configuration in local_settings.py or remove the caching related middlewares in settings.py. Probably the issue is that no propper headers are set.

zeridon avatar Sep 10 '24 11:09 zeridon