Skip to content

Calling opengrok-projadm from opengrok-sync fails when multiple works are used #3728

Closed
@ohm314

Description

@ohm314

Describe the bug

I've been trying to pack as much of the nightly sync workflow into the opengrok-sync configuration. That includes opengrok-projadm, which is run per project. This tool uses a a file lock, though, so when running the sync tool with multiple works we end up in the situation where a bunch of opengrok-projadm calls fail because they cannot acquire a lock. Instead they should run one after the other (or have a generous timeout set).

opengrok version: 1.7.18

To Reproduce

  1. Setup an opengrok with multiple projects
  2. create a sync.conf along these lines:
commands:
- command: [opengrok-projadm, --jar, /opengrok/dist/lib/opengrok.jar, -l, DEBUG, -b, /opengrok, -a, '%PROJECT%']
- command: [opengrok-mirror, -c, /opengrok/etc/mirror_config.yaml, -l, DEBUG, -U, http://localhost:8080/source]
- command: [opengrok-reindex-project, bunch, of, arguments]

Expected behavior
I would expect opengrok-projadm to be executed per project, but if locking is required that other instances wait their turn. Checking projadm code does not reveal an option being passed to FileLock for a timeout. I am not sure about opengrok-mirror but I think the way I am running it there will be one call that will itself iterate over all projects, so that's fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    toolsPython tools

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions