Skip to content

Commit

Permalink
Add component startup message (minio#966)
Browse files Browse the repository at this point in the history
Signed-off-by: Bala.FA <bala@minio.io>
  • Loading branch information
balamurugana authored Nov 13, 2024
1 parent c269093 commit 1041d2e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/directpv/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var controllerCmd = &cobra.Command{
SilenceUsage: true,
SilenceErrors: true,
RunE: func(c *cobra.Command, _ []string) error {
klog.InfoS("Starting DirectPV controller server", "version", Version)
return startController(c.Context())
},
}
Expand Down
1 change: 1 addition & 0 deletions cmd/directpv/legacy-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var legacyControllerCmd = &cobra.Command{
SilenceUsage: true,
SilenceErrors: true,
RunE: func(c *cobra.Command, _ []string) error {
klog.InfoS("Starting DirectPV legacy controller server", "version", Version)
return startLegacyController(c.Context())
},
}
Expand Down
1 change: 1 addition & 0 deletions cmd/directpv/legacy-node-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var legacyNodeServerCmd = &cobra.Command{
SilenceUsage: true,
SilenceErrors: true,
RunE: func(c *cobra.Command, _ []string) error {
klog.InfoS("Starting DirectPV legacy node server", "version", Version)
return startLegacyNodeServer(c.Context())
},
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/directpv/node-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/minio/directpv/pkg/node"
"github.com/minio/directpv/pkg/sys"
"github.com/spf13/cobra"
"k8s.io/klog/v2"
)

var nodeControllerCmd = &cobra.Command{
Expand All @@ -34,6 +35,7 @@ var nodeControllerCmd = &cobra.Command{
SilenceUsage: true,
SilenceErrors: true,
RunE: func(c *cobra.Command, _ []string) error {
klog.InfoS("Starting DirectPV node controller", "version", Version)
if err := sys.Mkdir(consts.MountRootDir, 0o755); err != nil && !errors.Is(err, os.ErrExist) {
return err
}
Expand Down
1 change: 1 addition & 0 deletions cmd/directpv/node-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ var nodeServerCmd = &cobra.Command{
SilenceUsage: true,
SilenceErrors: true,
RunE: func(c *cobra.Command, _ []string) error {
klog.InfoS("Starting DirectPV node server", "version", Version)
if err := sys.Mkdir(consts.MountRootDir, 0o755); err != nil && !errors.Is(err, os.ErrExist) {
return err
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/directpv/repair.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/minio/directpv/pkg/types"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/klog/v2"
)

var (
Expand All @@ -40,6 +41,7 @@ var repairCmd = &cobra.Command{
SilenceUsage: true,
SilenceErrors: true,
RunE: func(c *cobra.Command, args []string) error {
klog.InfoS("Starting DirectPV drive repair", "version", Version, "args", args)
switch len(args) {
case 0:
return errors.New("DRIVE-ID must be provided")
Expand Down

0 comments on commit 1041d2e

Please sign in to comment.