8000 serial is updated but FetchFile returns 304 for objects and slurm is local and not changed · Issue #114 · bgp/stayrtr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
serial is updated but FetchFile returns 304 for objects and slurm is local and not changed #114
Closed
@netixx

Description

@netixx

Hello,

I added the serial metric in #113 and then I saw that it was continuously increasing.

In the logs, I see that the objects are not updated:

time="2024-02-27T14:53:15Z" level=info msg="HTTP 304 Not modified for http://rpki-validator-rpki-client/objects/validated"
time="2024-02-27T14:53:16Z" level=info msg="New update (517256 uniques, 517256 total prefixes, 51 vaps, 2 router keys)."

However, I also see that a new "update" is triggered.

I have a static slurm.json file provided as a local path in the container (via -slurm /slurm.json option), and it's never updated.

I think the serial should only be updated if the vrps are updated or the slurm is changed, and that seems to be what the code want's to do as well:

// Only process the first time after there is either a cache or SLURM
// update.
if cacheUpdated || slurmNotPresentOrUpdated {

So I think there is unexpected behavior in :

slurmNotPresentOrUpdated, err = s.updateSlurm(slurmFile)

Maybe the FetchConfig could maintain a hash of the file (when it's a local file) to see if it has been modified (emulate etag behavior for local files) ?
Or maybe it should be in the state object ?

I you provide guidance I am happy to implement :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0