l3montree-dev / l3montree-dev/devguard
Leader election delays vulndb import and prevents getting results in freshly installed instance
Open
@timbastin is already working on this.
Since Aug 24, 2026.
component/devguard-api
- Dominant language
- Go
- Stars
- 161
- Forks
- 43
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 37
Description
Currently, the leader election is default initialised with not the leader:
⇨ http server started on [::]:8080
10:35AM INF daemons/providers.go:201 not the leader - skipping background jobs
10:40AM INF daemons/providers.go:201 not the leader - skipping background jobs
This leads to a 10-minute delay of the vulndb import. When having a fresh install the users want to get results fast. Especially when using the docker install/ try out way. When freshly started the devguard api instance should instantly try to claim leadership. If not gained, skip background jobs. When gaining leader role, start vulndb import immediately.
⇨ http server started on [::]:8080
10:35AM INF daemons/providers.go:201 not the leader - skipping background jobs
10:40AM INF daemons/providers.go:201 not the leader - skipping background jobs
...
10:45AM INF daemons/vulndb_daemon.go:17 updating vulndb
10:45AM INF vulndb/vulndb_service.go:478 start vulndb import processing=streaming limitedToTables=[]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.