This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "hclfmt" { | |
datacenters = ["nyc3"] | |
type = "service" | |
group "format" { | |
network { | |
mode = "host" | |
port "http" { | |
host_network = "internal" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ diff main/codecgen-pkg-100.generated.go numa/codecgen-pkg-100.generated.go | |
1018c1018 | |
< var t198 RaftServer | |
--- | |
> var t198 NUMA | |
1023c1023 | |
< var t199 RaftConfigurationResponse | |
--- | |
> var t199 LegacyNodeCpuResources | |
1028c1028 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diablo nomad.ent/nomad on main [m] | |
➜ go test -tags=ent -v -run _UpgradeMigration | |
=== RUN TestAutopilotEnterprise_UpgradeMigration | |
CLUSTERID id=a59eb8bb-556c-186c-48ec-80effdbca495 error=<nil> | |
--- PASS: TestAutopilotEnterprise_UpgradeMigration (0.33s) | |
PASS | |
ok github.com/hashicorp/nomad/nomad 0.353s | |
diablo nomad.ent/nomad on main [m] | |
➜ git diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
root=/sys/fs/cgroup | |
echo "[root]" | |
echo " cpuset.cpus.effective: $(cat $root/cpuset.cpus.effective)" | |
echo "" | |
echo "[nomad.slice]" | |
echo " cpuset.cpus.partition: $(cat $root/nomad.slice/cpuset.cpus.partition)" | |
echo " cpuset.cpus: $(cat $root/nomad.slice/cpuset.cpus)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"JobHCL":"variable \"X\" {\n type = string\n}\n\nvariable \"Y\" {\n type = number\n}\n\nvariable \"Z\" {\n type = bool\n}\n \njob \"demo\" {\n type = \"sysbatch\"\n group \"group\" {\n task \"task\" {\n driver = \"raw_exec\"\n\n config {\n command = \"echo\"\n args = [\"X ${var.X}, Y ${var.Y}, Z ${var.Z}\"]\n }\n\n resources {\n cpu = 10\n memory = 16\n }\n }\n }\n}\n", | |
"Variables": { | |
"X": "x", | |
"Y": 42, | |
"Z": true | |
}, | |
"Canonicalize":true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// net yet used because | |
// 1. very slow (like 10x worse than DeepEqual) | |
// 2. terrifying - i mean what even is this | |
var ( | |
cmpOptIgnorePrivate = ignoreUnexportedAlways() | |
cmpOptNilIsEmpty = cmpopts.EquateEmpty() | |
) | |
// ignoreUnexportedAlways is a derivative of go-cmp.IgnoreUnexported, but this one |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs/cgroup/nomad.slice | |
➜ cat 416baca9-bc05-d4c4-29f0-d0feec4e355c.task*.scope/cpuset.cpus | |
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
│ File: 416baca9-bc05-d4c4-29f0-d0feec4e355c.task1.scope/cpuset.cpus | |
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
1 │ 0-2,8-23 | |
───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
│ File: 416baca9-bc05-d4c4-29f0-d0feec4e355c.task2.scope/cpuset.cpus | |
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "pebble" { | |
type = "service" | |
group "pebble" { | |
network { | |
mode = "host" | |
port "acme" { | |
static = 6666 | |
} | |
port "mgmt" { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"strconv" | |
"strings" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"sort" | |
"strconv" | |
"strings" | |
) |
NewerOlder