juanfont/headscale · error
saving netmap to /tmp/control: %w
Error message
saving netmap to /tmp/control: %w
What it means
Error "saving netmap to /tmp/control: %w" thrown in juanfont/headscale.
Source
Thrown at integration/tsic/tsic.go:1055
command := []string{
tailscaleBin,
"debug",
"netmap",
}
nm, raw, err := execJSON[netmap.NetworkMap](
t,
command,
"executing tailscale debug netmap command",
"unmarshalling tailscale netmap",
)
if err != nil {
return nil, err
}
err = os.WriteFile(fmt.Sprintf("/tmp/control/%s_netmap.json", t.hostname), []byte(raw), 0o755) //nolint:gosec // test infrastructure log files
if err != nil {
return nil, fmt.Errorf("saving netmap to /tmp/control: %w", err)
}
return nm, nil
}
// Netmap returns the current Netmap ([netmap.NetworkMap]) of the Tailscale instance.
// This implementation is based on getting the netmap from `tailscale debug watch-ipn`
// as there seem to be some weirdness omitting endpoint and DERP info if we use
// Patch updates.
// This implementation works on all supported versions.
// func (t *TailscaleInContainer) Netmap() (*netmap.NetworkMap, error) {
// // watch-ipn will only give an update if something is happening,
// // since we send keep alives, the worst case for this should be
// // 1 minute, but set a slightly more conservative time.
// ctx, _ := context.WithTimeout(context.Background(), 3*time.Minute)
// notify, err := t.watchIPN(ctx)
// if err != nil {View on GitHub (pinned to 565fd254d0)
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.
Example fix
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.
When it happens
Trigger: Thrown at integration/tsic/tsic.go:1055 when the library encounters an invalid state.
Common situations: Saving the netmap to /tmp/control failed. Check the debug collection directory is writable in the test environment.
AI-assisted analysis of juanfont/headscale@565fd254d0 (2026-08-15).
Data as JSON: /api/errors/a85ed5c17cc1e01e.
Report an issue: GitHub.