hashicorp / hashicorp/nomad

nomad uses flock for data_dir

Open
#6,394 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

theme/client type/enhancement
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

followup to https://github.com/hashicorp/nomad/pull/6348 https://github.com/hashicorp/nomad/pull/6348#issuecomment-532856312

We should be using flock (https://github.com/gofrs/flock) to lock access to the data directory when a Nomad process accesses it. If another Nomad process tries to access the same data directory, it should fail.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pull request #6348 and the linked discussion, then trace how Nomad processes access the data directory. Use the gofrs/flock reference to determine the locking entry point; done means a second Nomad process using the same data directory fails. The issue names no source file or test path.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.