This message was deleted.
# opal
s
This message was deleted.
o
Hi @Ben Lieber, that would be my expectation as well. Can you share your OPAL client (and maybe also server) logs so we can try and see what failed
b
Sure. They’ve been running for a bit so I’ll just restart the container and give you a fresh dump.
🤘 1
Actually, in restarting, I’m seeing
opal-fetcher-postgres-opal_client-1        | 2023-07-13T16:00:19.739569+0000 | opal_common.utils                       |WARNING | Unexpected response code 503: {'detail': 'policy repo is not ready'}
I wonder if that could be the culprit?
o
Yeah, that can definitely be part of the issue - is there a successful retry after ?
b
Doesn’t look like it.
I did have to change the
wait-for-it
command though, as the pip installed one wasn’t accessible, so I used the included
.sh
script. Maybe I need to back up and troubleshoot that a bit more.
Ok, I changed the compose command back to the original, but had to explicitly target the
~/.local/bin/wait-for-it
as it’s not in the path. Still get the same message about server not being available though
o
It looks like you have a race condition between the policy loading and data loading (probably because of the /policy being slow to load. 1. Data is loaded
PUT /v1/data/cities
2. But then the policy-repo contains data.json and that overrides what was written onto data
Got policy bundle with 2 rego files, 1 data files,
b
Aren’t multiple sources to be expected and merged?
o
Aren’t multiple sources to be expected and merged?
Policy data is supposed to be loaded as a baseline, and then changes merged on top of it. (CC: @Shaul Kremer , @Asaf Cohen, @Ro'e Katz - we should really enforce this order - instead of assuming it) Not sure why the Git server is slow, but let’s see if we can configure it to wait, or dealy
b
Ok, thank you. Very helpful to understand why I wasn’t seeing the expected data
o
For starters - perhaps have a script pinging
/policy
on the server waiting for a
200
before starting the opal-client another option is to remove the
data.json
file from the repo, or have the server ignore it with
OPAL_BUNDLE_IGNORE
(https://docs.opal.ac/getting-started/configuration#common-opal-configuration-variables)