{"record":{"id":"ed8393d3827d338a","repo":"hashicorp/nomad","slug":"driver-s-does-not-implement-network-management-rp","errorCode":null,"errorMessage":"driver %s does not implement network management RPCs","messagePattern":"driver (.+?) does not implement network management RPCs","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/allocrunner/network_manager_linux.go","lineNumber":91,"sourceCode":"\t\t\treturn nil, fmt.Errorf(\"failed to retrieve capabilities for driver %s: %v\",\n\t\t\t\ttask.Driver, err)\n\t\t}\n\n\t\t// check that the driver supports the requested network isolation mode\n\t\tnetIsolationMode := netModeToIsolationMode(taskNetMode)\n\t\tif !caps.HasNetIsolationMode(netIsolationMode) {\n\t\t\treturn nil, fmt.Errorf(\"task %s does not support %q networking mode\", task.Name, taskNetMode)\n\t\t}\n\n\t\t// check if the driver needs to create the network and if a different\n\t\t// driver has already claimed it needs to initiate the network\n\t\tif caps.MustInitiateNetwork {\n\t\t\tif networkInitiator != \"\" {\n\t\t\t\treturn nil, fmt.Errorf(\"tasks %s and %s want to initiate networking but only one driver can do so\", networkInitiator, task.Name)\n\t\t\t}\n\t\t\tnetManager, ok := driver.(drivers.DriverNetworkManager)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"driver %s does not implement network management RPCs\", task.Driver)\n\t\t\t}\n\n\t\t\tnm = netManager\n\t\t\tnetworkInitiator = task.Name\n\t\t} else if len(tg.Networks) > 0 && tg.Networks[0].Hostname != \"\" {\n\t\t\t// TODO jrasell: remove once the default linux network manager\n\t\t\t//  supports setting the hostname in bridged mode. This currently\n\t\t\t//  indicates only Docker supports this, which is true unless a\n\t\t\t//  custom driver can which means this check still holds as true as\n\t\t\t//  we can tell.\n\t\t\t//  Please see: https://github.com/hashicorp/nomad/issues/11180\n\t\t\treturn nil, fmt.Errorf(\"hostname is not currently supported on driver %s\", task.Driver)\n\t\t}\n\n\t\t// mark this driver's capabilities as checked\n\t\tdriverCaps[task.Driver] = struct{}{}\n\t}\n","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/allocrunner/network_manager_linux.go#L73-L109","documentation":"When a driver claims MustInitiateNetwork, it must also implement the drivers.DriverNetworkManager interface (CreateNetwork/DestroyNetwork RPCs). If the type assertion fails, Nomad cannot delegate network lifecycle RPCs to it and rejects the allocation.","triggerScenarios":"driver.(drivers.DriverNetworkManager) type assertion fails during newNetworkManager for a driver whose caps set MustInitiateNetwork=true — i.e. an old or custom driver plugin that declares network initiation but wasn't built against the DriverNetworkManager RPC interface.","commonSituations":"Out-of-tree/legacy driver plugin compiled against an older Nomad drivers SDK; mismatched plugin and Nomad client versions; a custom driver incorrectly advertising MustInitiateNetwork.","solutions":["Rebuild/upgrade the driver plugin against a Nomad SDK version that includes DriverNetworkManager.","Downgrade or align the plugin with the Nomad client version.","Remove MustInitiateNetwork from the custom driver's capabilities if it cannot implement network management RPCs.","Use a built-in driver (e.g. docker) for tasks that require group bridge networking."],"exampleFix":"// before (custom driver)\nfunc (d *Driver) Capabilities() (*drivers.Capabilities, error) {\n  return &drivers.Capabilities{MustInitiateNetwork: true}, nil\n}\n// after\nfunc (d *Driver) Capabilities() (*drivers.Capabilities, error) {\n  return &drivers.Capabilities{MustInitiateNetwork: false}, nil\n}","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"func implementsDriverNetworkManager(d drivers.DriverPlugin) bool {\n  _, ok := d.(drivers.DriverNetworkManager)\n  return ok\n}","tryCatchPattern":null,"preventionTips":["Build custom driver plugins against the current Nomad drivers SDK.","Never set MustInitiateNetwork without implementing CreateNetwork/DestroyNetwork.","Test plugins with `nomad plugin status` and a bridge-network job before production."],"tags":["nomad","driver","interface-assertion","driver-network-manager"],"backgroundTag":"driver-network-manager-not-implemented","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}