{"record":{"id":"5cfda09a636cf42d","repo":"hashicorp/nomad","slug":"deprecated-config-field-raftboltnofreelistsync-i","errorCode":null,"errorMessage":"deprecated config field 'RaftBoltNoFreelistSync' is set; use 'RaftLogStoreConfig.BoltDBNoFreelistSync' instead","messagePattern":"deprecated config field 'RaftBoltNoFreelistSync' is set; use 'RaftLogStoreConfig\\.BoltDBNoFreelistSync' instead","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/server.go","lineNumber":341,"sourceCode":"\n\t// EnterpriseState is used to fill in state for Pro/Ent builds\n\tEnterpriseState\n\n\tleft         bool\n\tshutdown     bool\n\tshutdownLock sync.Mutex\n\n\tshutdownCtx    context.Context\n\tshutdownCancel context.CancelFunc\n\tshutdownCh     <-chan struct{}\n}\n\n// NewServer is used to construct a new Nomad server from the\n// configuration, potentially returning an error\nfunc NewServer(config *Config, consulCatalog consul.CatalogAPI, consulConfigFunc consul.ConfigAPIFunc) (*Server, error) {\n\t// Validate that deprecated config fields are not set\n\tif config.RaftBoltNoFreelistSync {\n\t\treturn nil, fmt.Errorf(\"deprecated config field 'RaftBoltNoFreelistSync' is set; use 'RaftLogStoreConfig.BoltDBNoFreelistSync' instead\")\n\t}\n\n\t// Configure TLS\n\ttlsConf, err := tlsutil.NewTLSConfiguration(config.TLSConfig, true, true)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tincomingTLS, tlsWrap, err := getTLSConf(config.TLSConfig.EnableRPC, tlsConf, config.Region)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Create the logger\n\tlogger := config.Logger.ResetNamedIntercept(\"nomad\")\n\n\t// Validate enterprise license before anything stateful happens\n\tif err = config.LicenseConfig.Validate(); err != nil {\n\t\treturn nil, err","sourceCodeStart":323,"sourceCodeEnd":359,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/server.go#L323-L359","documentation":"Nomad renamed the Raft BoltDB freelist-sync option: RaftBoltNoFreelistSync was replaced by RaftLogStoreConfig.BoltDBNoFreelistSync. NewServer fails fast at startup if the deprecated field is set, refusing to start so operators don't silently rely on removed configuration.","triggerScenarios":"Constructing a Nomad server (NewServer) with config.RaftBoltNoFreelistSync == true — typically after populating Config from a server config file or code that still sets the old field.","commonSituations":"Upgrading Nomad across the version that deprecated the field while keeping an old server.hcl; in-process embedders (test harnesses, go-launchers) that set the old Config field directly; copy-pasted config from older deployments.","solutions":["Remove RaftBoltNoFreelistSync and set RaftLogStoreConfig.BoltDBNoFreelistSync instead (config: raft_log_store { boltdb_no_freelist_sync = true })","If the setting was default/no-op, delete the line entirely and restart","Update code that builds Config to use the new nested struct"],"exampleFix":"// before\nserver {\n  raft_bolt_no_freelist_sync = true\n}\n// after\nserver {\n  raft_log_store {\n    boltdb_no_freelist_sync = true\n  }\n}","handlingStrategy":"validation","validationCode":"// Fail fast in embedders before calling NewServer\nif cfg.RaftBoltNoFreelistSync {\n    cfg.RaftLogStoreConfig.BoltDBNoFreelistSync = true\n    cfg.RaftBoltNoFreelistSync = false\n}","typeGuard":null,"tryCatchPattern":"srv, err := nomad.NewServer(config, consulCatalog, consulConfig)\nif err != nil && strings.Contains(err.Error(), \"RaftBoltNoFreelistSync\") {\n    return fmt.Errorf(\"config uses deprecated RaftBoltNoFreelistSync: %w\", err)\n}","preventionTips":["Grep configs for raft_bolt_no_freelist_sync before upgrades and migrate to raft_log_store block","Treat NewServer startup errors as fatal config validation in deployment scripts","Pin config schema docs to the Nomad version being deployed"],"tags":["nomad","go","deprecated-config","startup"],"backgroundTag":"deprecated-config-field","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"}