diff --git a/nomad/state/state_store.go b/nomad/state/state_store.go index eb57f3814..273ef3de4 100644 --- a/nomad/state/state_store.go +++ b/nomad/state/state_store.go @@ -80,6 +80,12 @@ func NewStateStore(config *StateStoreConfig) (*StateStore, error) { config: config, abandonCh: make(chan struct{}), } + + // Initialize the state store with required enterprise objects + if err := s.enterpriseInit(); err != nil { + return nil, fmt.Errorf("enterprise state store initialization failed: %v", err) + } + return s, nil } diff --git a/nomad/state/state_store_oss.go b/nomad/state/state_store_oss.go index cf6841e0d..3ef4e600b 100644 --- a/nomad/state/state_store_oss.go +++ b/nomad/state/state_store_oss.go @@ -7,6 +7,12 @@ import ( "github.com/hashicorp/nomad/nomad/structs" ) +// enterpriseInit is used to initialize the state store with enterprise +// objects. +func (s *StateStore) enterpriseInit() error { + return nil +} + // namespaceExists returns whether a namespace exists func (s *StateStore) namespaceExists(txn *memdb.Txn, namespace string) (bool, error) { return namespace == structs.DefaultNamespace, nil