Can't parse frame cache
After setting up a new 1.0.1 server, I'm getting two errors that I thing might be related. First, the gunicorn process says that it parsed 0 lines from the frame cache file:
[2022-02-17 10:31:21,141] INFO in cache: Parsed 0 lines from frame cache file
Then I get an error about a local variable being used before assignment:
UnboundLocalError: local variable 'ext' referenced before assignment
Full stack trace is here:
[2022-02-17 10:31:20 -0600] [83847] [INFO] Listening at: http://127.0.0.1:8080 (
83847)
[2022-02-17 10:31:20 -0600] [83847] [INFO] Using worker: sync
[2022-02-17 10:31:20 -0600] [83850] [INFO] Booting worker with pid: 83850
[2022-02-17 10:31:20,802] INFO in cache: Parsing grid map file from /etc/grid-se
curity/grid-mapfile
[2022-02-17 10:31:20,802] INFO in cache: Parsing frame cache from /var/lib/diskc
ache/frame_cache_dump
[2022-02-17 10:31:20,804] INFO in cache: Parsed 1208 lines from grid map file
[2022-02-17 10:31:20,862] INFO in cache: Parsing frame cache from /var/lib/diskc
ache/frame_cache_dump
[2022-02-17 10:31:20,953] INFO in cache: Parsing grid map file from /etc/grid-se
curity/grid-mapfile
[2022-02-17 10:31:20,955] INFO in cache: Parsed 1208 lines from grid map file
[2022-02-17 10:31:21,141] INFO in cache: Parsed 0 lines from frame cache file
[2022-02-17 10:31:21,351] INFO in __init__: Config path: /etc/gwdatafind-server.
ini name: gwdatafind_server
[2022-02-17 10:31:21,436] INFO in cache: Parsed 0 lines from frame cache file
Exception in thread CacheManager:
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/site-packages/gwdatafind_server/cache.py", line 51, i
n run
self.parse()
File "/usr/lib/python3.6/site-packages/gwdatafind_server/cache.py", line 160,
in parse
self._update(cache)
File "/usr/lib/python3.6/site-packages/gwdatafind_server/cache.py", line 112,
in _update
for site in cache[ext].keys():
UnboundLocalError: local variable 'ext' referenced before assignment
Exception in thread CacheManager:
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/site-packages/gwdatafind_server/cache.py", line 51, i
n run
self.parse()
File "/usr/lib/python3.6/site-packages/gwdatafind_server/cache.py", line 160,
in parse
self._update(cache)
File "/usr/lib/python3.6/site-packages/gwdatafind_server/cache.py", line 112,
in _update
for site in cache[ext].keys():
UnboundLocalError: local variable 'ext' referenced before assignment
My config file looks like this:
# cat /etc/gwdatafind-server.ini
[LDRDataFindServer]
# frame cache file
framecachefile = /var/lib/diskcache/frame_cache_dump
framecachetimeout = 10
# grid-mapfile
gridmapcachefile = /etc/grid-security/grid-mapfile
gridmapcachetimeout = 60
# optional parameters
site_exclude_pattern = ^X$
frametype_exclude_pattern = .+EXCLUDE.+
frametype_include_pattern = .+_TEST_\d+
filter_preference = """{'^file': ['preferred', 'ceph']}"""
...and my frame cache file has plenty of entries:
# wc -l /var/lib/diskcache/frame_cache_dump
25320 /var/lib/diskcache/frame_cache_dump
Edited by Duncan Macleod