diff --git a/octavia_dashboard/api/rest/lbaasv2.py b/octavia_dashboard/api/rest/lbaasv2.py
index adb0aed7..797edfe9 100644
--- a/octavia_dashboard/api/rest/lbaasv2.py
+++ b/octavia_dashboard/api/rest/lbaasv2.py
@@ -216,6 +216,7 @@ def create_health_monitor(request, **kwargs):
delay=data['monitor']['interval'],
timeout=data['monitor']['timeout'],
max_retries=data['monitor']['retry'],
+ max_retries_down=data['monitor']['retry_down'],
pool_id=kwargs['pool_id'],
http_method=data['monitor'].get('method'),
url_path=data['monitor'].get('path'),
@@ -399,6 +400,7 @@ def update_monitor(request, **kwargs):
delay=data['monitor'].get('interval'),
timeout=data['monitor'].get('timeout'),
max_retries=data['monitor'].get('retry'),
+ max_retries_down=data['monitor'].get('retry_down'),
http_method=data['monitor'].get('method'),
url_path=data['monitor'].get('path'),
expected_codes=data['monitor'].get('status'))
diff --git a/octavia_dashboard/locale/id/LC_MESSAGES/djangojs.po b/octavia_dashboard/locale/id/LC_MESSAGES/djangojs.po
index f5c48fac..363705fa 100644
--- a/octavia_dashboard/locale/id/LC_MESSAGES/djangojs.po
+++ b/octavia_dashboard/locale/id/LC_MESSAGES/djangojs.po
@@ -152,6 +152,17 @@ msgstr ""
"tidak aktif. Harus\n"
" nomor dari 1 sampai 10."
+msgid ""
+"Retries down: \n"
+" The number of allowed connection failures before marking the member as "
+"error. Must be a\n"
+" number from 1 to 10. The default is 3."
+msgstr ""
+"Retries down: \n"
+" The number of allowed connection failures before marking the member as "
+"error. Must be a\n"
+" number from 1 to 10. The default is 3."
+
msgid ""
"Subnet: \n"
" The network on which to allocate the load balancer's IP address."
@@ -521,6 +532,9 @@ msgstr "Loading (pemuatan)"
msgid "Max Retries"
msgstr "Max Retries (pengulangan terbanyak)"
+msgid "Max Retries Down"
+msgstr "Max Retries Down"
+
msgid "Member ID"
msgstr "Member ID (ID anggota)"
@@ -667,6 +681,13 @@ msgstr ""
"Retries\n"
" "
+msgid ""
+"Retries down\n"
+" "
+msgstr ""
+"Retries down\n"
+" "
+
msgid "Round Robin"
msgstr "Round Robin"
diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/healthmonitors/detail.html b/octavia_dashboard/static/dashboard/project/lbaasv2/healthmonitors/detail.html
index a9395fde..a199a712 100644
--- a/octavia_dashboard/static/dashboard/project/lbaasv2/healthmonitors/detail.html
+++ b/octavia_dashboard/static/dashboard/project/lbaasv2/healthmonitors/detail.html
@@ -21,6 +21,8 @@
{$ ::ctrl.healthmonitor.delay $}
Max Retries
{$ ::ctrl.healthmonitor.max_retries $}
+ Max Retries Down
+ {$ ::ctrl.healthmonitor.max_retries_down $}
Timeout
{$ ::ctrl.healthmonitor.timeout $}
HTTP Method
diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.js b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.js
index b980f7f2..4404d860 100644
--- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.js
+++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.js
@@ -162,6 +162,7 @@
type: null,
interval: 5,
retry: 3,
+ retry_down: 3,
timeout: 5,
method: 'GET',
status: '200',
@@ -673,6 +674,7 @@
spec.interval = monitor.delay;
spec.timeout = monitor.timeout;
spec.retry = monitor.max_retries;
+ spec.retry_down = monitor.max_retries_down;
spec.method = monitor.http_method;
spec.status = monitor.expected_codes;
spec.path = monitor.url_path;
diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.spec.js b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.spec.js
index 823fbea2..0e20313d 100644
--- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.spec.js
+++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.spec.js
@@ -67,6 +67,7 @@
delay: 1,
timeout: 1,
max_retries: 1,
+ max_retries_down: 1,
http_method: 'POST',
expected_codes: '200',
url_path: '/test'
@@ -161,6 +162,7 @@
delay: 1,
timeout: 1,
max_retries: 1,
+ max_retries_down: 1,
http_method: 'POST',
expected_codes: '200',
url_path: '/test'
@@ -564,6 +566,7 @@
expect(model.spec.monitor.type).toBeNull();
expect(model.spec.monitor.interval).toBe(5);
expect(model.spec.monitor.retry).toBe(3);
+ expect(model.spec.monitor.retry_down).toBe(3);
expect(model.spec.monitor.timeout).toBe(5);
expect(model.spec.monitor.method).toBe('GET');
expect(model.spec.monitor.status).toBe('200');
@@ -610,6 +613,7 @@
expect(model.spec.monitor.interval).toBe(1);
expect(model.spec.monitor.timeout).toBe(1);
expect(model.spec.monitor.retry).toBe(1);
+ expect(model.spec.monitor.retry_down).toBe(1);
expect(model.spec.monitor.method).toBe('POST');
expect(model.spec.monitor.status).toBe('200');
expect(model.spec.monitor.path).toBe('/test');
@@ -706,6 +710,7 @@
expect(model.spec.monitor.type).toBe('HTTP');
expect(model.spec.monitor.interval).toBe(1);
expect(model.spec.monitor.retry).toBe(1);
+ expect(model.spec.monitor.retry_down).toBe(1);
expect(model.spec.monitor.timeout).toBe(1);
expect(model.spec.monitor.method).toBe('POST');
expect(model.spec.monitor.status).toBe('200');
@@ -788,6 +793,7 @@
expect(model.spec.monitor.type).toBe('HTTP');
expect(model.spec.monitor.interval).toBe(1);
expect(model.spec.monitor.retry).toBe(1);
+ expect(model.spec.monitor.retry_down).toBe(1);
expect(model.spec.monitor.timeout).toBe(1);
expect(model.spec.monitor.method).toBe('POST');
expect(model.spec.monitor.status).toBe('200');
@@ -870,6 +876,7 @@
expect(model.spec.monitor.type).toBeNull();
expect(model.spec.monitor.interval).toBe(5);
expect(model.spec.monitor.retry).toBe(3);
+ expect(model.spec.monitor.retry_down).toBe(3);
expect(model.spec.monitor.timeout).toBe(5);
expect(model.spec.monitor.method).toBe('GET');
expect(model.spec.monitor.status).toBe('200');
@@ -943,7 +950,7 @@
expect(Object.keys(model.spec.loadbalancer).length).toBe(4);
expect(Object.keys(model.spec.listener).length).toBe(5);
expect(Object.keys(model.spec.pool).length).toBe(7);
- expect(Object.keys(model.spec.monitor).length).toBe(8);
+ expect(Object.keys(model.spec.monitor).length).toBe(9);
expect(model.spec.members).toEqual([]);
});
@@ -1027,6 +1034,10 @@
expect(model.spec.monitor.retry).toBe(3);
});
+ it('sets monitor retry down count to 3', function() {
+ expect(model.spec.monitor.retry_down).toBe(3);
+ });
+
it('sets monitor timeout to 5', function() {
expect(model.spec.monitor.timeout).toBe(5);
});
@@ -1214,6 +1225,7 @@
model.spec.monitor.type = 'PING';
model.spec.monitor.interval = 1;
model.spec.monitor.retry = 1;
+ model.spec.monitor.retry_down = 1;
model.spec.monitor.timeout = 1;
model.spec.certificates = [{
id: 'container1',
@@ -1264,6 +1276,7 @@
expect(finalSpec.monitor.type).toBe('PING');
expect(finalSpec.monitor.interval).toBe(1);
expect(finalSpec.monitor.retry).toBe(1);
+ expect(finalSpec.monitor.retry_down).toBe(1);
expect(finalSpec.monitor.timeout).toBe(1);
expect(finalSpec.certificates).toBeUndefined();
});
@@ -1385,6 +1398,7 @@
model.spec.monitor.type = 'PING';
model.spec.monitor.interval = 1;
model.spec.monitor.retry = 1;
+ model.spec.monitor.retry_down = 1;
model.spec.monitor.timeout = null;
var finalSpec = model.submit();
@@ -1459,6 +1473,7 @@
model.spec.monitor.type = 'PING';
model.spec.monitor.interval = 1;
model.spec.monitor.retry = 1;
+ model.spec.monitor.retry_down = 1;
model.spec.monitor.timeout = 1;
model.spec.certificates = [{
id: 'container1',
@@ -1503,6 +1518,7 @@
expect(finalSpec.monitor.type).toBe('PING');
expect(finalSpec.monitor.interval).toBe(1);
expect(finalSpec.monitor.retry).toBe(1);
+ expect(finalSpec.monitor.retry_down).toBe(1);
expect(finalSpec.monitor.timeout).toBe(1);
expect(finalSpec.certificates).toBeUndefined();
});
@@ -1612,6 +1628,7 @@
model.spec.monitor.type = 'PING';
model.spec.monitor.interval = 1;
model.spec.monitor.retry = 1;
+ model.spec.monitor.retry_down = 1;
model.spec.monitor.timeout = null;
var finalSpec = model.submit();
@@ -1667,6 +1684,7 @@
model.spec.monitor.type = 'PING';
model.spec.monitor.interval = 1;
model.spec.monitor.retry = 1;
+ model.spec.monitor.retry_down = 1;
model.spec.monitor.timeout = 1;
model.spec.certificates = [{
id: 'container1',
@@ -1706,6 +1724,7 @@
expect(finalSpec.monitor.type).toBe('PING');
expect(finalSpec.monitor.interval).toBe(1);
expect(finalSpec.monitor.retry).toBe(1);
+ expect(finalSpec.monitor.retry_down).toBe(1);
expect(finalSpec.monitor.timeout).toBe(1);
expect(finalSpec.certificates).toBeUndefined();
});
@@ -1794,6 +1813,7 @@
model.spec.monitor.type = 'PING';
model.spec.monitor.interval = 1;
model.spec.monitor.retry = 1;
+ model.spec.monitor.retry_down = 1;
model.spec.monitor.timeout = null;
var finalSpec = model.submit();
@@ -1829,6 +1849,7 @@
expect(finalSpec.monitor.type).toBe('HTTP');
expect(finalSpec.monitor.interval).toBe(5);
expect(finalSpec.monitor.retry).toBe(3);
+ expect(finalSpec.monitor.retry_down).toBe(3);
expect(finalSpec.monitor.timeout).toBe(5);
expect(finalSpec.monitor.method).toBe('GET');
expect(finalSpec.monitor.status).toBe('200');
@@ -1876,6 +1897,7 @@
expect(finalSpec.monitor.type).toBe('HTTP');
expect(finalSpec.monitor.interval).toBe(1);
expect(finalSpec.monitor.retry).toBe(1);
+ expect(finalSpec.monitor.retry_down).toBe(1);
expect(finalSpec.monitor.timeout).toBe(1);
});
});
@@ -1917,6 +1939,7 @@
expect(finalSpec.monitor.type).toBe('HTTP');
expect(finalSpec.monitor.interval).toBe(1);
expect(finalSpec.monitor.retry).toBe(1);
+ expect(finalSpec.monitor.retry_down).toBe(1);
expect(finalSpec.monitor.timeout).toBe(1);
});
});
@@ -1959,6 +1982,7 @@
expect(finalSpec.monitor.interval).toBe(5);
expect(finalSpec.monitor.retry).toBe(3);
+ expect(finalSpec.monitor.retry_down).toBe(3);
expect(finalSpec.monitor.timeout).toBe(5);
});
});
@@ -2049,6 +2073,7 @@
it('should set final spec properties', function() {
model.spec.monitor.interval = 10;
model.spec.monitor.retry = 6;
+ model.spec.monitor.retry_down = 6;
model.spec.monitor.timeout = 8;
model.spec.monitor.method = 'GET';
model.spec.monitor.status = '200-204';
@@ -2067,6 +2092,7 @@
expect(finalSpec.monitor.type).toBe('HTTP');
expect(finalSpec.monitor.interval).toBe(10);
expect(finalSpec.monitor.retry).toBe(6);
+ expect(finalSpec.monitor.retry_down).toBe(6);
expect(finalSpec.monitor.timeout).toBe(8);
expect(finalSpec.monitor.method).toBe('GET');
expect(finalSpec.monitor.status).toBe('200-204');
diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/monitor/monitor.controller.js b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/monitor/monitor.controller.js
index 1d9e6cee..1484b286 100644
--- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/monitor/monitor.controller.js
+++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/monitor/monitor.controller.js
@@ -45,6 +45,7 @@
ctrl.intervalError = gettext('The health check interval must be greater than or equal to the timeout.');
/* eslint-enable max-len */
ctrl.retryError = gettext('The max retry count must be a number between 1 and 10.');
+ ctrl.retryDownError = gettext('The max retry down count must be a number between 1 and 10.');
ctrl.timeoutError = gettext('The timeout must be a number greater than or equal to 0.');
ctrl.statusError = gettext('The expected status code is not valid.');
ctrl.pathError = gettext('The URL path is not valid.');
diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/monitor/monitor.help.html b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/monitor/monitor.help.html
index 010bb1b6..02975a98 100644
--- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/monitor/monitor.help.html
+++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/monitor/monitor.help.html
@@ -13,6 +13,11 @@
The number of allowed connection failures before marking the member as inactive. Must be a
number from 1 to 10.
+
+ Retries down:
+ The number of allowed connection failures before marking the member as error. Must be a
+ number from 1 to 10. The default is 3.
+
Timeout:
The time after which a health check times out. Must be a number greater than or equal to 0
diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/monitor/monitor.html b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/monitor/monitor.html
index 5f08bc62..f1453972 100644
--- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/monitor/monitor.html
+++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/monitor/monitor.html
@@ -17,6 +17,22 @@
+
+
+
+ Retries down
+
+
+
+
+ {$ ::ctrl.retryDownError $}
+
+
+
+