diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodesResponse.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodesResponse.java index 03044319d54..5b0c0f0e16e 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodesResponse.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodesResponse.java @@ -237,6 +237,7 @@ private void toSlime(Collection events, Cursor array) { object.setString("event", event.type().name()); object.setLong("at", event.at().toEpochMilli()); object.setString("agent", event.agent().name()); + event.reason().ifPresent(reason -> object.setString("reason", reason)); } } diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/dockerhost6.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/dockerhost6.json index 0e1892b4190..f30c50b6c27 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/dockerhost6.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/dockerhost6.json @@ -49,7 +49,8 @@ { "event": "failed", "at": 123, - "agent": "operator" + "agent": "operator", + "reason": "MockNodeRepository" }, { "event": "deprovisioned", @@ -76,7 +77,8 @@ { "event": "failed", "at": 123, - "agent": "operator" + "agent": "operator", + "reason": "MockNodeRepository" }, { "event": "deprovisioned", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-after-changes.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-after-changes.json index a3589e760ad..325e250bf48 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-after-changes.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-after-changes.json @@ -88,7 +88,8 @@ { "event": "wantToFail", "at": 123, - "agent": "operator" + "agent": "operator", + "reason": "Failed through the nodes/v2 API" }, { "event": "rebooted", @@ -135,7 +136,8 @@ { "event": "wantToFail", "at": 123, - "agent": "operator" + "agent": "operator", + "reason": "Failed through the nodes/v2 API" }, { "event": "rebooted", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5-after-changes.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5-after-changes.json index fafaf61ef78..8f3c32a4ce6 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5-after-changes.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5-after-changes.json @@ -48,7 +48,8 @@ { "event": "failed", "at": 123, - "agent": "system" + "agent": "system", + "reason": "MockNodeRepository" } ], "log": [ @@ -70,7 +71,8 @@ { "event": "failed", "at": 123, - "agent": "system" + "agent": "system", + "reason": "MockNodeRepository" } ], "ipAddresses": ["::5:1", "127.0.5.1"], diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5.json index aae4fe84fb8..c7d2d7988ed 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5.json @@ -50,7 +50,8 @@ { "event": "failed", "at": 123, - "agent": "system" + "agent": "system", + "reason": "MockNodeRepository" } ], "log": [ @@ -72,7 +73,8 @@ { "event": "failed", "at": 123, - "agent": "system" + "agent": "system", + "reason": "MockNodeRepository" } ], "ipAddresses": ["::5:1", "127.0.5.1"],