{"record":{"id":"a85ed5c17cc1e01e","repo":"juanfont/headscale","slug":"saving-netmap-to-tmp-control-w","errorCode":null,"errorMessage":"saving netmap to /tmp/control: %w","messagePattern":"saving netmap to /tmp/control: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"integration/tsic/tsic.go","lineNumber":1055,"sourceCode":"\tcommand := []string{\n\t\ttailscaleBin,\n\t\t\"debug\",\n\t\t\"netmap\",\n\t}\n\n\tnm, raw, err := execJSON[netmap.NetworkMap](\n\t\tt,\n\t\tcommand,\n\t\t\"executing tailscale debug netmap command\",\n\t\t\"unmarshalling tailscale netmap\",\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\terr = os.WriteFile(fmt.Sprintf(\"/tmp/control/%s_netmap.json\", t.hostname), []byte(raw), 0o755) //nolint:gosec // test infrastructure log files\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"saving netmap to /tmp/control: %w\", err)\n\t}\n\n\treturn nm, nil\n}\n\n// Netmap returns the current Netmap ([netmap.NetworkMap]) of the Tailscale instance.\n// This implementation is based on getting the netmap from `tailscale debug watch-ipn`\n// as there seem to be some weirdness omitting endpoint and DERP info if we use\n// Patch updates.\n// This implementation works on all supported versions.\n// func (t *TailscaleInContainer) Netmap() (*netmap.NetworkMap, error) {\n// \t// watch-ipn will only give an update if something is happening,\n// \t// since we send keep alives, the worst case for this should be\n// \t// 1 minute, but set a slightly more conservative time.\n// \tctx, _ := context.WithTimeout(context.Background(), 3*time.Minute)\n\n// \tnotify, err := t.watchIPN(ctx)\n// \tif err != nil {","sourceCodeStart":1037,"sourceCodeEnd":1073,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/integration/tsic/tsic.go#L1037-L1073","documentation":"Error \"saving netmap to /tmp/control: %w\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at integration/tsic/tsic.go:1055 when the library encounters an invalid state.","commonSituations":"Saving the netmap to /tmp/control failed. Check the debug collection directory is writable in the test environment.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (saving netmap to /tmp/control); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (saving netmap to /tmp/control); retry the operation after fixing the input, configuration, or environment.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"565fd254d06c4c7f9a8cad1714a43445c79ba420","analyzedAt":"2026-08-15T13:12:30.133Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}