Skip to content

Commit

Permalink
nodesim: add alloc ID node metadata. (#23)
Browse files Browse the repository at this point in the history
Adding any allocation ID when running nodesim on Nomad helps
debugging.
  • Loading branch information
jrasell authored Apr 8, 2024
1 parent 407135b commit 3736c5d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,11 @@ func startClient(logger hclog.Logger, buildInfo *internalSimnode.BuildInfo, cfg
Reserved: &structs.Resources{},
Links: map[string]string{},
Meta: map[string]string{
"nodesim.id": cfg.NodeNamePrefix,
"nodesim.enabled": "true",
"nodesim.version": buildInfo.Version,
"nodesim.sum": buildInfo.Sum,
"nodesim.id": cfg.NodeNamePrefix,
"nodesim.alloc_id": os.Getenv("NOMAD_ALLOC_ID"),
"nodesim.enabled": "true",
"nodesim.version": buildInfo.Version,
"nodesim.sum": buildInfo.Sum,
},
CSIControllerPlugins: make(map[string]*structs.CSIInfo),
CSINodePlugins: make(map[string]*structs.CSIInfo),
Expand Down

0 comments on commit 3736c5d

Please sign in to comment.