Skip to content

Commit

Permalink
Merge efb07cb into ea6b09a
Browse files Browse the repository at this point in the history
  • Loading branch information
rgooch committed Aug 16, 2019
2 parents ea6b09a + efb07cb commit 1091246
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cmd/dominator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ var (
imageServerPortNum = flag.Uint("imageServerPortNum",
constants.ImageServerPortNumber,
"Port number of image server")
mdbFile = flag.String("mdbFile", "mdb",
"File to read MDB data from, relative to stateDir (default format is JSON)")
mdbFile = flag.String("mdbFile", constants.DefaultMdbFile,
"File to read MDB data from")
minInterval = flag.Uint("minInterval", 1,
"Minimum interval between loops (in seconds)")
objectsDir = flag.String("objectsDir", "objects",
Expand Down Expand Up @@ -116,7 +116,7 @@ func main() {
os.Exit(1)
}
interval := time.Duration(*minInterval) * time.Second
mdbChannel := mdbd.StartMdbDaemon(path.Join(*stateDir, *mdbFile), logger)
mdbChannel := mdbd.StartMdbDaemon(*mdbFile, logger)
objectServer, err := newObjectServer(path.Join(*stateDir, *objectsDir),
logger)
if err != nil {
Expand Down
5 changes: 2 additions & 3 deletions cmd/mdbd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ var (
"Interval between fetches from the MDB source, in seconds")
hostnameRegex = flag.String("hostnameRegex", ".*",
"A regular expression to match the desired hostnames")
mdbFile = flag.String("mdbFile", "/var/lib/Dominator/mdb",
mdbFile = flag.String("mdbFile", constants.DefaultMdbFile,
"Name of file to write filtered MDB data to")
portNum = flag.Uint("portNum", constants.SimpleMdbServerPortNumber,
"Port number to allocate and listen on for HTTP/RPC")
sourcesFile = flag.String("sourcesFile",
"/var/lib/Dominator/mdb.sources.list",
sourcesFile = flag.String("sourcesFile", "/var/lib/mdbd/mdb.sources.list",
"Name of file list of driver url pairs")
pidfile = flag.String("pidfile", "", "Name of file to write my PID to")
)
Expand Down
2 changes: 2 additions & 0 deletions lib/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ const (
AssignedOIDBase = "1.3.6.1.4.1.9586.100.7"
PermittedMethodListOID = AssignedOIDBase + ".1"
GroupListOID = AssignedOIDBase + ".2"

DefaultMdbFile = "/var/lib/mdbd/mdb.json"
)

var RequiredPaths = map[string]rune{
Expand Down

0 comments on commit 1091246

Please sign in to comment.