| index 043fe8599..a23bf26c1 100644 |
| --- a/appconfig_cli.go |
| +++ b/appconfig_cli.go |
| @@ -108,11 +108,15 @@ func printRestartNotice(w io.Writer, app string, a *restartAnswer) { |
| if h.Unit != "" { |
| line = fmt.Sprintf(restartCopyUnit, h.Host, app, h.Unit) |
| } |
| - fmt.Fprintf(w, "%s %s %s\n", c.warn("note:"), line, c.muted(restartCopyScope)) |
| + fmt.Fprintf(w, "%s %s\n", c.warn("note:"), line) |
| } |
| for _, h := range a.pending.Unresolved { |
| fmt.Fprintf(w, "%s %s\n", c.warn("note:"), fmt.Sprintf(restartCopyUnresolved, h)) |
| } |
| + // Once, under the list, rather than on every line: the caveat is about |
| + // the LIST — what this box could see — so repeating it per host would be |
| + // three copies of one sentence saying nothing more the third time. |
| + fmt.Fprintf(w, "%s\n", c.muted(restartCopyScope)) |
| } |
| |
| // checkNoEmptyValues refuses a `secrets set` carrying any empty value, and |
| @@ -142,12 +146,14 @@ func checkNoEmptyValues(kv map[string]string) error { |
| // shapes and were reviewed as one. The verb sites format these; they do not |
| // write their own. |
| const ( |
| - secretsCopyEmpty = "TODO(copy-review) %s: empty" |
| - restartCopyPlain = "TODO(copy-review) %s: plain" |
| - restartCopyUnit = "TODO(copy-review) %s %s %s: unit" |
| - restartCopyUnresolved = "TODO(copy-review) %s: unresolved" |
| - restartCopyUnknown = "TODO(copy-review): unknown" |
| - restartCopyScope = "TODO(copy-review): scope" |
| + // Carries its own "secrets set:" prefix, so its one call site prints it |
| + // bare rather than prefixing it again. |
| + secretsCopyEmpty = "secrets set: %s: empty value: nothing stored. To remove a secret use `carlos secrets unset`; for a deliberately empty value use `carlos env set`. (A command substitution that produced nothing is the usual cause.)" |
| + restartCopyPlain = "%s has the file but is still running the old values. carlos routes to this process without owning it. Restart to fix." |
| + restartCopyUnit = "%s has the file but is still running the old values. carlos restart --app %s cycles %s." |
| + restartCopyUnresolved = "could not tell whether %s picked this up. Its config bundle would not load." |
| + restartCopyUnknown = "could not check which routes are still running the old values. This console cannot see the route registry." |
| + restartCopyScope = "(this machine's routes only)" |
| ) |
| |
| const envUsage = `usage: carlos env <command> |
| @@ -727,9 +733,15 @@ func runEnvSync(args []string) { |
| log.Fatal(err) |
| } |
| } |
| - fmt.Printf("%s for %s — exec-backed instances converge within seconds; "+ |
| - "unit-backed routes within seconds where the box's carlos-adopt.path trigger is armed, "+ |
| - "else on the next hourly root pass\n", colorFor(os.Stdout).ok("config sync requested"), appName) |
| + // The files, not the processes. The old wording promised that |
| + // "exec-backed instances converge within seconds", which is true of the |
| + // file and false of the program reading it for exactly the route shape |
| + // discussion #16 was filed about — and this is the command people run |
| + // while waiting for a change to take effect, so overstating it sends |
| + // them off to debug the wrong thing. |
| + fmt.Printf("%s for %s the files land within seconds; programs carlos owns restart themselves, "+ |
| + "and anything else keeps its old values until you restart it\n", |
| + colorFor(os.Stdout).ok("config sync requested"), appName) |
| } |
| |
| const secretsUsage = `usage: carlos secrets <command> |
| @@ -856,7 +868,7 @@ func runSecretsSet(args []string) { |
| // and because it can name every offending key at once where the door, |
| // which validates var by var, names the first. |
| if err := checkNoEmptyValues(kv); err != nil { |
| - log.Fatalf("secrets set: %v", err) |
| + log.Fatal(err) |
| } |
| // Validate every value while the plaintext is still in hand, before |
| // either branch below seals anything — after Seal the value is opaque |