The name. The name. The name!

This commit is contained in:
Jeff Mitchell committed 2020-08-10 17:15:02 -04:00
1 parent 1c836c430b
commit 6661117d4c
321 files changed
+1295 -1300

No files matched your search

+16 -16
View File
@@ -6,16 +6,16 @@ import (
"strings"
"sync"
"github.com/hashicorp/boundary/globals"
"github.com/hashicorp/boundary/internal/auth/password"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/config"
"github.com/hashicorp/boundary/internal/servers/controller"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/vault/internalshared/configutil"
"github.com/hashicorp/vault/sdk/helper/mlock"
"github.com/hashicorp/vault/sdk/helper/strutil"
"github.com/hashicorp/watchtower/globals"
"github.com/hashicorp/watchtower/internal/auth/password"
"github.com/hashicorp/watchtower/internal/cmd/base"
"github.com/hashicorp/watchtower/internal/cmd/config"
"github.com/hashicorp/watchtower/internal/servers/controller"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -55,16 +55,16 @@ type Command struct {
}
func (c *Command) Synopsis() string {
return "Start a Watchtower controller"
return "Start a Boundary controller"
}
func (c *Command) Help() string {
helpText := `
Usage: watchtower controller [options]
Usage: boundary controller [options]
Start a controller with a configuration file:
$ watchtower controller -config=/etc/watchtower/controller.hcl
$ boundary controller -config=/etc/boundary/controller.hcl
For a full list of examples, please see the documentation.
@@ -91,7 +91,7 @@ func (c *Command) Flags() *base.FlagSets {
Name: "log-level",
Target: &c.flagLogLevel,
Default: base.NotSetValue,
EnvVar: "WATCHTOWER_LOG_LEVEL",
EnvVar: "BOUNDARY_LOG_LEVEL",
Completion: complete.PredictSet("trace", "debug", "info", "warn", "err"),
Usage: "Log verbosity level. Supported values (in order of more detail to less) are " +
"\"trace\", \"debug\", \"info\", \"warn\", and \"err\".",
@@ -149,14 +149,14 @@ func (c *Command) Flags() *base.FlagSets {
f.StringVar(&base.StringVar{
Name: "dev-api-listen-address",
Target: &c.flagDevControllerAPIListenAddr,
EnvVar: "WATCHTOWER_DEV_CONTROLLER_API_LISTEN_ADDRESS",
EnvVar: "BOUNDARY_DEV_CONTROLLER_API_LISTEN_ADDRESS",
Usage: "Address to bind the controller to in \"dev\" mode for \"api\" purpose.",
})
f.StringVar(&base.StringVar{
Name: "dev-cluster-listen-address",
Target: &c.flagDevControllerClusterListenAddr,
EnvVar: "WATCHTOWER_DEV_CONTROLLER_CLUSTER_LISTEN_ADDRESS",
EnvVar: "BOUNDARY_DEV_CONTROLLER_CLUSTER_LISTEN_ADDRESS",
Usage: "Address to bind the controller to in \"dev\" mode for \"cluster\" purpose.",
})
@@ -216,14 +216,14 @@ func (c *Command) Run(args []string) int {
}
// If mlockall(2) isn't supported, show a warning. We disable this in dev
// because it is quite scary to see when first using Watchtower. We also disable
// because it is quite scary to see when first using Boundary. We also disable
// this if the user has explicitly disabled mlock in configuration.
if !c.flagDev && !c.Config.DisableMlock && !mlock.Supported() {
c.UI.Warn(base.WrapAtLength(
"WARNING! mlock is not supported on this system! An mlockall(2)-like " +
"syscall to prevent memory from being swapped to disk is not " +
"supported on this system. For better security, only run Watchtower on " +
"systems where this call is supported. If you are running Watchtower" +
"supported on this system. For better security, only run Boundary on " +
"systems where this call is supported. If you are running Boundary" +
"in a Docker container, provide the IPC_LOCK cap to the container."))
}
@@ -452,7 +452,7 @@ func (c *Command) WaitForInterrupt() int {
for !shutdownTriggered {
select {
case <-shutdownCh:
c.UI.Output("==> Watchtower controller shutdown triggered")
c.UI.Output("==> Boundary controller shutdown triggered")
if err := c.controller.Shutdown(); err != nil {
c.UI.Error(fmt.Errorf("Error with controller shutdown: %w", err).Error())
@@ -461,7 +461,7 @@ func (c *Command) WaitForInterrupt() int {
shutdownTriggered = true
case <-c.SighupCh:
c.UI.Output("==> Watchtower controller reload triggered")
c.UI.Output("==> Boundary controller reload triggered")
// Check for new log level
var level hclog.Level