mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 13:37:30 +00:00
Scripts: update host timeout error message (#13626)
- Update copy for erorr message we display when we haven't heard back from the host in over 1 minute.
This commit is contained in:
parent
a02b8b140d
commit
b7868831c2
2 changed files with 3 additions and 3 deletions
|
|
@ -1137,9 +1137,9 @@ func (hsr HostScriptResult) AuthzType() string {
|
|||
func (hsr HostScriptResult) UserMessage(hostTimeout bool) string {
|
||||
switch {
|
||||
case hostTimeout:
|
||||
return "Fleet hasn't heard from the host in over 1 minute because it went offline. Run the script again when the host comes back online."
|
||||
return "Fleet hasn't heard from the host in over 1 minute. Fleet doesn't know if the script ran because the host went offline."
|
||||
case !hostTimeout && time.Since(hsr.CreatedAt) > time.Minute:
|
||||
return "Fleet hasn't heard from the host in over 1 minute because it went offline. Run the script again when the host comes back online."
|
||||
return "Fleet hasn't heard from the host in over 1 minute. Fleet doesn't know if the script ran because the host went offline."
|
||||
case hsr.ExitCode.Int64 == -1:
|
||||
return "Timeout. Fleet stopped the script after 30 seconds to protect host performance."
|
||||
case hsr.ExitCode.Int64 == -2:
|
||||
|
|
|
|||
|
|
@ -3762,7 +3762,7 @@ func (s *integrationEnterpriseTestSuite) TestRunHostScript() {
|
|||
require.Equal(t, host.ID, runSyncResp.HostID)
|
||||
require.NotEmpty(t, runSyncResp.ExecutionID)
|
||||
require.True(t, runSyncResp.HostTimeout)
|
||||
require.Contains(t, runSyncResp.Message, "Fleet hasn't heard from the host in over 1 minute because it went offline.")
|
||||
require.Contains(t, runSyncResp.Message, "Fleet hasn't heard from the host in over 1 minute. Fleet doesn't know if the script ran because the host went offline.")
|
||||
|
||||
s.DoJSON("POST", "/api/fleet/orbit/scripts/result",
|
||||
json.RawMessage(fmt.Sprintf(`{"orbit_node_key": %q, "execution_id": %q, "exit_code": 0, "output": "ok"}`, *host.OrbitNodeKey, runSyncResp.ExecutionID)),
|
||||
|
|
|
|||
Loading…
Reference in a new issue