Rebrand user-visible CLI text; add legacy fallbacks for keyring, cache dir and version prefix
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4cb3bda43a
commit
ab4ed3c9e5
184 files changed
+934
-851
No files matched your search
@@ -19,18 +19,18 @@ type Command struct {
|
||||
}
|
||||
|
||||
func (c *Command) Synopsis() string {
|
||||
return "Manage Boundary's database"
|
||||
return "Manage Threshold's database"
|
||||
}
|
||||
|
||||
func (c *Command) Help() string {
|
||||
return base.WrapForHelpText([]string{
|
||||
"Usage: boundary database [sub command] [options] [args]",
|
||||
"Usage: threshold database [sub command] [options] [args]",
|
||||
"",
|
||||
" This command allows operations on Boundary's database. Example:",
|
||||
" This command allows operations on Threshold's database. Example:",
|
||||
"",
|
||||
" Initialize the database:",
|
||||
"",
|
||||
` $ boundary database init`,
|
||||
` $ threshold database init`,
|
||||
"",
|
||||
" Please see the database subcommand help for detailed usage information.",
|
||||
})
|
||||
|
||||
@@ -61,11 +61,11 @@ func migrateDatabase(ctx context.Context, ui cli.Ui, dialect, u string, initiali
|
||||
return unlock, 2
|
||||
}
|
||||
if initialized && !st.Initialized {
|
||||
ui.Output(base.WrapAtLength("Database has not been initialized. Please use 'boundary database init' to initialize the boundary database."))
|
||||
ui.Output(base.WrapAtLength("Database has not been initialized. Please use 'threshold database init' to initialize the threshold database."))
|
||||
return unlock, -1
|
||||
}
|
||||
if !initialized && st.Initialized {
|
||||
ui.Output(base.WrapAtLength("Database has already been initialized. Please use 'boundary database migrate' for any upgrade needs."))
|
||||
ui.Output(base.WrapAtLength("Database has already been initialized. Please use 'threshold database migrate' for any upgrade needs."))
|
||||
return unlock, -1
|
||||
}
|
||||
repairLogs, err := man.ApplyMigrations(ctx)
|
||||
@@ -73,7 +73,7 @@ func migrateDatabase(ctx context.Context, ui cli.Ui, dialect, u string, initiali
|
||||
ui.Error(fmt.Errorf("Error running database migrations: %w", err).Error())
|
||||
if checkErr, ok := err.(schema.MigrationCheckError); ok {
|
||||
ui.Error(fmt.Errorf("%s", strings.Join(checkErr.Problems, "\n")).Error())
|
||||
ui.Error(fmt.Sprintf("To automatically repair, use 'boundary database migrate -repair=%s:%d'. This will: %s", checkErr.Edition, checkErr.Version, checkErr.RepairDescription))
|
||||
ui.Error(fmt.Sprintf("To automatically repair, use 'threshold database migrate -repair=%s:%d'. This will: %s", checkErr.Edition, checkErr.Version, checkErr.RepairDescription))
|
||||
}
|
||||
return unlock, 2
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ func TestMigrateDatabase(t *testing.T) {
|
||||
return u
|
||||
},
|
||||
expectedCode: -1,
|
||||
expectedOutput: "Database has already been initialized. Please use 'boundary database migrate'\nfor any upgrade needs.\n",
|
||||
expectedOutput: "Database has already been initialized. Please use 'threshold database migrate'\nfor any upgrade needs.\n",
|
||||
},
|
||||
{
|
||||
name: "old_version_table_used_intialized",
|
||||
@@ -130,7 +130,7 @@ func TestMigrateDatabase(t *testing.T) {
|
||||
return u
|
||||
},
|
||||
expectedCode: -1,
|
||||
expectedOutput: "Database has already been initialized. Please use 'boundary database migrate'\nfor any upgrade needs.\n",
|
||||
expectedOutput: "Database has already been initialized. Please use 'threshold database migrate'\nfor any upgrade needs.\n",
|
||||
},
|
||||
{
|
||||
name: "bad_url_initialized",
|
||||
|
||||
@@ -49,16 +49,16 @@ type InitCommand struct {
|
||||
}
|
||||
|
||||
func (c *InitCommand) Synopsis() string {
|
||||
return "Initialize Boundary's database"
|
||||
return "Initialize Threshold's database"
|
||||
}
|
||||
|
||||
func (c *InitCommand) Help() string {
|
||||
return base.WrapForHelpText([]string{
|
||||
"Usage: boundary database init [options]",
|
||||
"Usage: threshold database init [options]",
|
||||
"",
|
||||
" Initialize Boundary's database:",
|
||||
" Initialize Threshold's database:",
|
||||
"",
|
||||
" $ boundary database init -config=/etc/boundary/controller.hcl",
|
||||
" $ threshold database init -config=/etc/threshold/controller.hcl",
|
||||
"",
|
||||
" Unless told not to via flags, some initial resources will be created, in the following order and in the indicated scopes:",
|
||||
"",
|
||||
@@ -99,13 +99,13 @@ func (c *InitCommand) Flags() *base.FlagSets {
|
||||
complete.PredictFiles("*.hcl"),
|
||||
complete.PredictFiles("*.json"),
|
||||
),
|
||||
Usage: `Path to a configuration file containing a "kms" block marked for "config" purpose, to perform decryption of the main configuration file. If not set, will look for such a block in the main configuration file, which has some drawbacks; see the help output for "boundary config encrypt -h" for details.`,
|
||||
Usage: `Path to a configuration file containing a "kms" block marked for "config" purpose, to perform decryption of the main configuration file. If not set, will look for such a block in the main configuration file, which has some drawbacks; see the help output for "threshold config encrypt -h" for details.`,
|
||||
})
|
||||
|
||||
f.StringVar(&base.StringVar{
|
||||
Name: flagLogLevelName,
|
||||
Target: &c.initFlags.flagLogLevel,
|
||||
EnvVar: "BOUNDARY_LOG_LEVEL",
|
||||
EnvVar: "THRESHOLD_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\".",
|
||||
@@ -221,14 +221,14 @@ func (c *InitCommand) Run(args []string) (retCode 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 Boundary. We also disable
|
||||
// because it is quite scary to see when first using Threshold. We also disable
|
||||
// this if the user has explicitly disabled mlock in configuration.
|
||||
if !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 Boundary on " +
|
||||
"systems where this call is supported. If you are running Boundary" +
|
||||
"supported on this system. For better security, only run Threshold on " +
|
||||
"systems where this call is supported. If you are running Threshold" +
|
||||
"in a Docker container, provide the IPC_LOCK cap to the container."))
|
||||
}
|
||||
|
||||
|
||||
@@ -55,16 +55,16 @@ type MigrateCommand struct {
|
||||
}
|
||||
|
||||
func (c *MigrateCommand) Synopsis() string {
|
||||
return "Migrate Boundary's database to the most recent schema supported by this binary."
|
||||
return "Migrate Threshold's database to the most recent schema supported by this binary."
|
||||
}
|
||||
|
||||
func (c *MigrateCommand) Help() string {
|
||||
return base.WrapForHelpText([]string{
|
||||
"Usage: boundary database migrate [options]",
|
||||
"Usage: threshold database migrate [options]",
|
||||
"",
|
||||
" Migrate Boundary's database:",
|
||||
" Migrate Threshold's database:",
|
||||
"",
|
||||
" $ boundary database migrate -config=/etc/boundary/controller.hcl",
|
||||
" $ threshold database migrate -config=/etc/threshold/controller.hcl",
|
||||
"",
|
||||
" For a full list of examples, please see the documentation.",
|
||||
}) + c.Flags().Help()
|
||||
@@ -92,13 +92,13 @@ func (c *MigrateCommand) Flags() *base.FlagSets {
|
||||
complete.PredictFiles("*.hcl"),
|
||||
complete.PredictFiles("*.json"),
|
||||
),
|
||||
Usage: `Path to a configuration file containing a "kms" block marked for "config" purpose, to perform decryption of the main configuration file. If not set, will look for such a block in the main configuration file, which has some drawbacks; see the help output for "boundary config encrypt -h" for details.`,
|
||||
Usage: `Path to a configuration file containing a "kms" block marked for "config" purpose, to perform decryption of the main configuration file. If not set, will look for such a block in the main configuration file, which has some drawbacks; see the help output for "threshold config encrypt -h" for details.`,
|
||||
})
|
||||
|
||||
f.StringVar(&base.StringVar{
|
||||
Name: "log-level",
|
||||
Target: &c.flagLogLevel,
|
||||
EnvVar: "BOUNDARY_LOG_LEVEL",
|
||||
EnvVar: "THRESHOLD_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\".",
|
||||
@@ -199,7 +199,7 @@ func (c *MigrateCommand) Run(args []string) (retCode int) {
|
||||
"encountered an error. The ability to run plugins will eventually " +
|
||||
"become mandatory (for instance, for KMS implementations), so we are " +
|
||||
"ensuring that it's feasible on a given system before migrating the " +
|
||||
"database to the new version of Boundary that requires this capability. " +
|
||||
"database to the new version of Threshold that requires this capability. " +
|
||||
"If your temporary directory is not writable and/or you cannot execute " +
|
||||
"binaries in that directory, try setting the field " +
|
||||
`"execution_dir" in the "plugins" block in the configuration file:`))
|
||||
@@ -221,14 +221,14 @@ plugins {
|
||||
}
|
||||
|
||||
// If mlockall(2) isn't supported, show a warning. We disable this in dev
|
||||
// because it is quite scary to see when first using Boundary. We also disable
|
||||
// because it is quite scary to see when first using Threshold. We also disable
|
||||
// this if the user has explicitly disabled mlock in configuration.
|
||||
if !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 Boundary on " +
|
||||
"systems where this call is supported. If you are running Boundary " +
|
||||
"supported on this system. For better security, only run Threshold on " +
|
||||
"systems where this call is supported. If you are running Threshold " +
|
||||
"in a Docker container, provide the IPC_LOCK cap to the container."))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user