hashicorp / hashicorp/nomad

Bug: Windows Driver Health always unhealthy with HCL Client Config

Open
#8,415 2 comments 0 reactions 0 assignees View on GitHub
theme/config theme/hcl theme/platform-windows
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

Output from `nomad version`
Nomad v0.11.3 (8918fc804a0c6758b6e3e9960e4eb2e605e38552)

### Operating system and Environment details
Windows Server 2019

### Issue
This just caught us in our production environments. We were moving all our configurations over from .json to .hcl

We discovered that on windows ONLY if the client config is HCL then all drivers report unhealthy (linux reports as expected).

The Nomad agent itself reports healthy, everything looks good at a glance, but when you look at driver status none are available thus no allocations are ever placed on the windows node. We realize that, according to the docs [here](https://www.nomadproject.io/docs/drivers/raw_exec#client-requirements), we are using a soon to be deprecated approach as well.

### Reproduction steps
use a HCL client config like follows (BAD RESULT)

```hcl
client {
enabled = true

# This enables Nomad to run things like bash scripts as a raw exec process
options {
driver.raw_exec.enabled = "1"
}

# group_names is ansible magic variable that gives all groups current host is part of
meta {
consoleonly = "true"
general_compute_windows = "true"
windows = "true"
}
}
```
Screen Shot 2020-07-09 at 7 29 25 AM

Same file config json - (GOOD RESULT)
```json
{
"client": {
"enabled": true,
"options":{
"driver.raw_exec.enable":"1"
},
"meta": [{ "consoleonly":"true","general_compute_windows":"true","windows":"true" }]
}
```

Note: The HCL version tags all the metadata, etc as expected in Nomad - it's purely the drivers that don't show as healthy

Screen Shot 2020-07-09 at 7 28 28 AM

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test is named in the report. Reproduce the Windows client setup with the HCL configuration and compare driver health with the equivalent JSON configuration; done means drivers report healthy and allocations can be placed on the Windows node.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
infrastructure
Issue type
Bug
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.