diff options
author | Andreas Eriksen <andreer@pvv.ntnu.no> | 2018-09-28 16:13:35 +0200 |
---|---|---|
committer | olaaun <ola.aunroe@gmail.com> | 2018-09-28 16:13:35 +0200 |
commit | 3d74ee9620abd934e84c9482dd4ff10090d1e4dd (patch) | |
tree | 88258c1d957c00c349593cb596aac8fa831a9d26 /node-repository | |
parent | e6f46440bd697d78921379dba4f7e55ca2d85c7a (diff) |
andreer/flavor bandwidth (#7141)
* add bandwidth to flavor
* accept having more disk / memory than expected
* add bandwidth to node-admin bindings
* add bandwidth to test
* fix test
* disable ping check (and assume ipv6 connectivity)
check has been deemed too unreliable to rely on for failing out nodes
* add bandwidth field to expected responses
Diffstat (limited to 'node-repository')
30 files changed, 30 insertions, 0 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/NodesResponse.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/NodesResponse.java index 3b7cf857a86..9364c5f5f80 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/NodesResponse.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/NodesResponse.java @@ -153,6 +153,7 @@ class NodesResponse extends HttpResponse { if (node.flavor().cost() > 0) object.setLong("cost", node.flavor().cost()); object.setBool("fastDisk", node.flavor().hasFastDisk()); + object.setDouble("bandwidth", node.flavor().getBandwidth()); object.setString("environment", node.flavor().getType().name()); if (node.allocation().isPresent()) { toSlime(node.allocation().get().owner(), object.setObject("owner")); diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/cfg1.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/cfg1.json index 796b03e7e68..f57f40ea171 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/cfg1.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/cfg1.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-default", "minCpuCores": 2.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "rebootGeneration": 1, "currentRebootGeneration": 0, diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/cfg2.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/cfg2.json index 361459390f9..54cf3269b09 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/cfg2.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/cfg2.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-default", "minCpuCores": 2.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "rebootGeneration": 1, "currentRebootGeneration": 0, diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/controller1.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/controller1.json index 144882aa88e..a5d2a7a37dd 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/controller1.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/controller1.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-default", "minCpuCores": 2.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "rebootGeneration": 0, "currentRebootGeneration": 0, diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-container1.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-container1.json index 7823ed0431d..c98fbb46ff8 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-container1.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-container1.json @@ -13,6 +13,7 @@ "description": "Flavor-name-is-docker", "minCpuCores": 0.2, "fastDisk": true, + "bandwidth":0.0, "environment": "DOCKER_CONTAINER", "owner": { "tenant": "tenant3", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node1-os-upgrade-complete.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node1-os-upgrade-complete.json index 2e8092012fb..203220d1b84 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node1-os-upgrade-complete.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node1-os-upgrade-complete.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-large", "minCpuCores": 4.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "owner": { "tenant": "zoneapp", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node1-os-upgrade.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node1-os-upgrade.json index 88bda7544d9..eed164689f1 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node1-os-upgrade.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node1-os-upgrade.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-large", "minCpuCores": 4.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "owner": { "tenant": "zoneapp", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node1.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node1.json index a13dfae927f..e92cf895a8a 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node1.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node1.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-large", "minCpuCores": 4.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "owner": { "tenant": "zoneapp", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node2.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node2.json index f7a1d6ab9a9..b832fddf119 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node2.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node2.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-large", "minCpuCores": 4.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "owner": { "tenant": "zoneapp", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node3.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node3.json index f877d33672f..17729207c1e 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node3.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node3.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-large", "minCpuCores": 4.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "owner": { "tenant": "zoneapp", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node4.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node4.json index 913cf9852aa..2c3d112c69a 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node4.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node4.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-large", "minCpuCores": 4.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "owner": { "tenant": "zoneapp", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node5.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node5.json index 685b0a52b15..73c7f89ff0f 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node5.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/docker-node5.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-large", "minCpuCores": 4.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "owner": { "tenant": "zoneapp", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node1.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node1.json index 08e4904e35c..794082db0c1 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node1.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node1.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-default", "minCpuCores": 2.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "owner": { "tenant": "tenant1", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node10.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node10.json index fe65f34bae5..9b18c8ea52c 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node10.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node10.json @@ -13,6 +13,7 @@ "description": "Flavor-name-is-default", "minCpuCores": 2.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "owner": { "tenant": "tenant1", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node11.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node11.json index e0e899afbef..ae0354b4d27 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node11.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node11.json @@ -13,6 +13,7 @@ "description": "Flavor-name-is-docker", "minCpuCores": 0.2, "fastDisk": true, + "bandwidth":0.0, "environment": "DOCKER_CONTAINER", "rebootGeneration": 0, "currentRebootGeneration": 0, diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node2.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node2.json index aa60cfae815..5835d718f50 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node2.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node2.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-default", "minCpuCores": 2.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "owner": { "tenant": "tenant2", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node3.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node3.json index eb13d077d7f..7a36c26f385 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node3.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node3.json @@ -13,6 +13,7 @@ "minCpuCores": 6.0, "cost": 200, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "rebootGeneration": 1, "currentRebootGeneration": 0, diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node4-after-changes.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node4-after-changes.json index 86f31c5aa62..247099fcae7 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node4-after-changes.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node4-after-changes.json @@ -13,6 +13,7 @@ "description": "Flavor-name-is-medium-disk", "minCpuCores": 6.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "owner": { "tenant": "tenant3", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node4.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node4.json index a2f72766d7f..87a4a355b57 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node4.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node4.json @@ -13,6 +13,7 @@ "description": "Flavor-name-is-docker", "minCpuCores": 0.2, "fastDisk": true, + "bandwidth":0.0, "environment": "DOCKER_CONTAINER", "owner": { "tenant": "tenant3", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node5-after-changes.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node5-after-changes.json index 1e1ea1a2445..4c22b4397e0 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node5-after-changes.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node5-after-changes.json @@ -13,6 +13,7 @@ "description": "Flavor-name-is-docker", "minCpuCores": 0.2, "fastDisk": true, + "bandwidth":0.0, "environment": "DOCKER_CONTAINER", "rebootGeneration": 1, "currentRebootGeneration": 0, diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node5.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node5.json index ceb393f4bf6..4e1032442b3 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node5.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node5.json @@ -13,6 +13,7 @@ "description": "Flavor-name-is-docker", "minCpuCores": 0.2, "fastDisk": true, + "bandwidth":0.0, "environment": "DOCKER_CONTAINER", "rebootGeneration": 1, "currentRebootGeneration": 0, diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node55-after-changes.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node55-after-changes.json index f3f1306af1e..18d019c4b6e 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node55-after-changes.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node55-after-changes.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-default", "minCpuCores": 2.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "rebootGeneration": 1, "currentRebootGeneration": 0, diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node55.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node55.json index 4f8b988ccbf..9d2c67ffcb7 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node55.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node55.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-default", "minCpuCores": 2.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "rebootGeneration": 1, "currentRebootGeneration": 0, diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node6-after-changes.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node6-after-changes.json index a5043746749..3e33cfb7a8d 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node6-after-changes.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node6-after-changes.json @@ -12,6 +12,7 @@ "description":"Flavor-name-is-default", "minCpuCores":2.0, "fastDisk":true, + "bandwidth":0.0, "environment":"BARE_METAL", "owner": { "tenant": "tenant2", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node6.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node6.json index c5382dfd1a7..f0c63048dcc 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node6.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node6.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-default", "minCpuCores": 2.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "owner": { "tenant": "tenant2", diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node7.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node7.json index b1c654b4e00..53a6e5c8d77 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node7.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node7.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-default", "minCpuCores": 2.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "rebootGeneration": 0, "currentRebootGeneration": 0, diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node8.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node8.json index 0fa0bf6631d..a768cf73dda 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node8.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node8.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-default", "minCpuCores": 2.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "rebootGeneration": 0, "currentRebootGeneration": 0, diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node9.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node9.json index 43405f0aafc..8fb4372fb80 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node9.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/node9.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-large-variant", "minCpuCores": 64.0, "fastDisk": true, + "bandwidth":0.0, "environment": "BARE_METAL", "rebootGeneration": 0, "currentRebootGeneration": 0, diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/parent1.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/parent1.json index 190dbc41f34..10eaeba153a 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/parent1.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/parent1.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-default", "minCpuCores": 2.0, "fastDisk":true, + "bandwidth":0.0, "environment": "BARE_METAL", "rebootGeneration": 1, "currentRebootGeneration": 0, diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/parent2.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/parent2.json index c7f6344d974..74c65d30f34 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/parent2.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/v2/responses/parent2.json @@ -12,6 +12,7 @@ "description": "Flavor-name-is-large-variant", "minCpuCores": 64.0, "fastDisk":true, + "bandwidth":0.0, "environment": "BARE_METAL", "rebootGeneration": 0, "currentRebootGeneration": 0, |