{"record":{"id":"8ff4c7b00262433a","repo":"hashicorp/nomad","slug":"createnetwork-rpc-not-supported-by-driver","errorCode":null,"errorMessage":"CreateNetwork RPC not supported by driver","messagePattern":"CreateNetwork RPC not supported by driver","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/drivers/server.go","lineNumber":418,"sourceCode":"\t\t\tTaskName:    event.TaskName,\n\t\t\tTimestamp:   pbTimestamp,\n\t\t\tMessage:     event.Message,\n\t\t\tAnnotations: event.Annotations,\n\t\t}\n\n\t\tif err = srv.Send(pbEvent); err == io.EOF {\n\t\t\tbreak\n\t\t} else if err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (b *driverPluginServer) CreateNetwork(ctx context.Context, req *proto.CreateNetworkRequest) (*proto.CreateNetworkResponse, error) {\n\tnm, ok := b.impl.(DriverNetworkManager)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"CreateNetwork RPC not supported by driver\")\n\t}\n\n\tspec, created, err := nm.CreateNetwork(req.GetAllocId(), networkCreateRequestFromProto(req))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &proto.CreateNetworkResponse{\n\t\tIsolationSpec: NetworkIsolationSpecToProto(spec),\n\t\tCreated:       created,\n\t}, nil\n}\n\nfunc (b *driverPluginServer) DestroyNetwork(ctx context.Context, req *proto.DestroyNetworkRequest) (*proto.DestroyNetworkResponse, error) {\n\tnm, ok := b.impl.(DriverNetworkManager)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"DestroyNetwork RPC not supported by driver\")\n\t}","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/plugins/drivers/server.go#L400-L436","documentation":"CreateNetwork on the driver plugin server requires the underlying driver to implement the DriverNetworkManager interface. If the driver does not, the RPC is unsupported and this error is returned to the caller.","triggerScenarios":"Calling CreateNetwork (e.g. via Nomad's network isolation hooks / bridge or netns setup) against a driver plugin that does not implement DriverNetworkManager.","commonSituations":"Task drivers without network namespace support being scheduled with network isolation requirements; older plugin binaries lacking the network manager capability; misconfigured task group requesting CNI/netns features with an incompatible driver.","solutions":["Use a driver that implements DriverNetworkManager (e.g. exec/qemu/docker variants with network support).","Upgrade the driver plugin to a version implementing DriverNetworkManager.","Remove network isolation requirements (network stanza / isolation features) from the task when using this driver."],"exampleFix":"// before\nfunc (d *MyDriver) TaskStart(...) error { ... } // no network manager\n// after\nfunc (d *MyDriver) CreateNetwork(allocID string, spec *drivers.NetworkIsolationSpec) (string, bool, error) {\n\treturn d.net.CreateNetwork(allocID, spec)\n}","handlingStrategy":"type-guard","validationCode":"// Verify the driver supports network management before requesting isolation\nif _, ok := drv.(drivers.DriverNetworkManager); !ok {\n\treturn errors.New(\"driver cannot create networks; remove network isolation requirements\")\n}","typeGuard":"func supportsNetworkManager(d interface{}) bool {\n\t_, ok := d.(drivers.DriverNetworkManager)\n\treturn ok\n}","tryCatchPattern":"_, err := client.CreateNetwork(ctx, req)\nif err != nil && err.Error() == \"CreateNetwork RPC not supported by driver\" {\n\t// fall back to host networking or fail scheduling with a clear message\n}","preventionTips":["Pair network-isolation task requirements only with netns-capable drivers.","Upgrade plugins before enabling network features in task groups.","Probe driver capabilities at registration time and record them.","Keep create/destroy network usage on the same driver type."],"tags":["plugin","driver","network","capability"],"backgroundTag":"capability-not-supported","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"}