Set state directory using config instead of hardcoding
Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
parent
b14e2d2937
commit
1d4421af49
1 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/containers/image/types"
|
"github.com/containers/image/types"
|
||||||
sstorage "github.com/containers/storage/storage"
|
sstorage "github.com/containers/storage/storage"
|
||||||
|
@ -75,8 +76,8 @@ func New(config *Config) (*Server, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// HACK HACK HACK TODO MAKE CONFIGURABLE
|
// TODO: Should we put this elsewhere? Separate directory specified in the config?
|
||||||
state, err := state.NewFileState("/tmp/crio_state_test", r)
|
state, err := state.NewFileState(filepath.Join(config.RunRoot, "ocid_state"), r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue