Skip to content

Commit

Permalink
Added very minimal logging to ickpt
Browse files Browse the repository at this point in the history
  • Loading branch information
edmc-ss committed Mar 9, 2022
1 parent fa7e278 commit ee3ba30
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To kick off development activities:
To build all the images:
* [`dev` /src#] make

To clear out prior launches and run the processes in the background:
To clear out prior deamon runs and run the daemons in the background:
* [`dev` /src#] rm -rf /tmp/ickptDB
* [`dev` /src#] ickpt/ickpt ickpt/dev.conf &
* [`dev` /src#] imgr/imgr imgr/dev.conf &
Expand All @@ -75,10 +75,12 @@ To clear out prior launches and run the processes in the background:
* [`dev` /src#] iclient/iclient iclient/dev.conf &

Notes:
* To relaunch the daemons without reformatting, skip the `rm -rf /tmp/ickptDB` and `idestroy...` steps
* `idestroy` step will fail with `httpGETResponse.Status unexpected: 404 Not Found` if this is the fist iteration through
* `imgr` and `iclient` will be logging to $StdOut in this example launching
* Each of the above can be terminated by delivering a SIGINT or SIGTERM to their processes
* To relaunch the daemons without reformatting:
* Skip the `rm -rf /tmp/ickptDB` and `idestroy...` steps
* Pass `-s` rather than `-fs` to `imgr/mkmount.sh`
* The daemons will be logging to $StdOut in this example launching
* Each of the above daemons may be terminated by delivering a SIGINT or SIGTERM to their processes

For a more appropriate environment in which to perform functional testing, the `docker-compose.yml` file my also be used to launch the suite of Docker Containers:

Expand Down
14 changes: 11 additions & 3 deletions ickpt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ import (

"github.com/NVIDIA/proxyfs/conf"
"github.com/NVIDIA/proxyfs/ickpt/ickptpkg"
"github.com/NVIDIA/proxyfs/utils"
)

func main() {
var (
confMap conf.ConfMap
err error
signalChan chan os.Signal
confMap conf.ConfMap
configMapJSONified string
err error
signalChan chan os.Signal
)

if len(os.Args) < 2 {
Expand All @@ -44,8 +46,12 @@ func main() {
os.Exit(1)
}

configMapJSONified = utils.JSONify(confMap, true)

// Start

fmt.Printf("Calling ickptpkg.Start(confMap)...with confMap:\n%s\n", configMapJSONified)

err = ickptpkg.Start(confMap)
if nil != err {
fmt.Fprintf(os.Stderr, "ickptpkg.Start(confMap) failed: %v\n", err)
Expand All @@ -65,6 +71,8 @@ func main() {

// Stop

fmt.Printf("Calling ickptpkg.Stop()...\n")

err = ickptpkg.Stop()
if nil != err {
fmt.Fprintf(os.Stderr, "ickptpkg.Stop() failed: %v\n", err)
Expand Down

0 comments on commit ee3ba30

Please sign in to comment.