moby / moby/swarmkit

Provide initial set of node labels during swarm join

Open
#1,160 10 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/orchestration kind/question priority/P2
Dominant language
Go
Stars
3.7k
Forks
676
Avg merge
4d 9h
Merged PRs (30d)
6

Description

As of now, setting a node's labels is a task that can be performed by a manager through docker node update after a node has already joined the cluster. However, the following scenarios would benefit from the ability to specify an initial set of labels through something similar to docker swarm join --label key=value:

  • A global or replicated service with a constraint of node.label.key!=value might deploy a task in the new node before the operator labels the node with key=value
  • The formation of a multi-node cluster where a labelling scheme is known a priori requires an open connection to a manager node just for labelling, assuming secrets or autoaccept are used.
  • A global service with a node.role==manager constraint which creates containers that bind-mount the docker socket could utilize an initial set of node labels for node-related metadata.

Contributor guide

Open the contributing guide

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 by tracing the docker swarm join path and comparing it with docker node update, focusing on when node labels become available to scheduling. Define the behavior for an initial key=value label set and verify that constrained services cannot schedule before those labels are applied; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.