Add timeout options for listener
This is a follow up of octavia-api change made in: Id4667201c1bfaa06f7af9060c936ba00c2f314f9 Change-Id: I2ae995e4f8a828128481b02e956444c8208fc41b Depends-On: https://review.openstack.org/#/c/561401/ Story: 1457556 Task: 12488
This commit is contained in:
parent
9d5c05900e
commit
e98966c795
@ -171,6 +171,10 @@ def create_listener(request, **kwargs):
|
||||
sni_container_refs=None,
|
||||
admin_state_up=data['listener'].get('admin_state_up'),
|
||||
insert_headers=data['listener'].get('insert_headers'),
|
||||
timeout_client_data=data['listener'].get('timeout_client_data'),
|
||||
timeout_member_connect=data['listener'].get('timeout_member_connect'),
|
||||
timeout_member_data=data['listener'].get('timeout_member_data'),
|
||||
timeout_tcp_inspect=data['listener'].get('timeout_tcp_inspect'),
|
||||
)
|
||||
|
||||
if data.get('pool'):
|
||||
@ -396,6 +400,10 @@ def update_listener(request, **kwargs):
|
||||
admin_state_up=data['listener'].get('admin_state_up'),
|
||||
default_pool_id=default_pool_id,
|
||||
insert_headers=data['listener'].get('insert_headers'),
|
||||
timeout_client_data=data['listener'].get('timeout_client_data'),
|
||||
timeout_member_connect=data['listener'].get('timeout_member_connect'),
|
||||
timeout_member_data=data['listener'].get('timeout_member_data'),
|
||||
timeout_tcp_inspect=data['listener'].get('timeout_tcp_inspect'),
|
||||
)
|
||||
|
||||
if data.get('pool'):
|
||||
|
@ -51,7 +51,10 @@
|
||||
item="ctrl.listener"
|
||||
property-groups="[[
|
||||
'id', 'name', 'description', 'project_id', 'created_at', 'updated_at',
|
||||
'connection_limit', 'insert_headers', 'default_pool_id']]">
|
||||
'connection_limit', 'insert_headers', 'default_pool_id',
|
||||
'timeout_client_data', 'timeout_member_connect',
|
||||
'timeout_member_data', 'timeout_tcp_inspect'
|
||||
]]">
|
||||
</hz-resource-property-list>
|
||||
</div>
|
||||
</uib-tab>
|
||||
|
@ -5,5 +5,7 @@
|
||||
['name', 'id', 'project_id'],
|
||||
['created_at', 'updated_at', 'description'],
|
||||
['protocol', 'protocol_port', 'connection_limit'],
|
||||
['insert_headers', 'default_pool_id']]">
|
||||
['insert_headers', 'default_pool_id', 'timeout_client_data'],
|
||||
['timeout_member_connect', 'timeout_member_data', 'timeout_tcp_inspect']
|
||||
]">
|
||||
</hz-resource-property-list>
|
||||
|
@ -177,6 +177,10 @@
|
||||
loadBalancerService.nullFilter
|
||||
]
|
||||
},
|
||||
timeout_client_data: gettext('Client Data Timeout'),
|
||||
timeout_member_connect: gettext('Member Connect Timeout'),
|
||||
timeout_member_data: gettext('Member Data Timeout'),
|
||||
timeout_tcp_inspect: gettext('TCP Inspect Timeout'),
|
||||
load_balancers: gettext('Load Balancers')
|
||||
};
|
||||
}
|
||||
|
@ -52,6 +52,7 @@
|
||||
ctrl.connectionLimitError = gettext(
|
||||
'The connection limit must be a number greater than or equal to -1.'
|
||||
);
|
||||
ctrl.timeoutError = gettext('The timeout must be a number between 0 and 31536000000.');
|
||||
|
||||
////////////
|
||||
|
||||
|
@ -37,3 +37,28 @@
|
||||
only "X-Forwarded-For" and "X-Forwarded-Port" are supported.
|
||||
</translate>
|
||||
</p>
|
||||
<p>
|
||||
<strong translate>Client Data Timeout:</strong>
|
||||
<translate>
|
||||
Frontend client inactivity timeout in milliseconds. Default: 50000.
|
||||
</translate>
|
||||
</p>
|
||||
<p>
|
||||
<strong translate>TCP Inspect Timeout:</strong>
|
||||
<translate>
|
||||
Time, in milliseconds, to wait for additional TCP packets for content
|
||||
inspection. Default: 0.
|
||||
</translate>
|
||||
</p>
|
||||
<p>
|
||||
<strong translate>Member Connect Timeout:</strong>
|
||||
<translate>
|
||||
Backend member connection timeout in milliseconds. Default: 5000.
|
||||
</translate>
|
||||
</p>
|
||||
<p>
|
||||
<strong translate>Member Data Timeout:</strong>
|
||||
<translate>
|
||||
Backend member inactivity timeout in milliseconds. Default: 50000.
|
||||
</translate>
|
||||
</p>
|
||||
|
@ -61,6 +61,66 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-12 col-sm-8 col-md-6">
|
||||
<div class="form-group required">
|
||||
<label class="control-label" for="protocol">
|
||||
<translate>Client Data Timeout</translate>
|
||||
</label>
|
||||
<input name="timeout_client_data" id="timeout_client_data" type="number" class="form-control"
|
||||
ng-model="model.spec.listener.timeout_client_data" ng-pattern="/^\d+$/" min="0" max="31536000000">
|
||||
<span class="help-block" ng-show="listenerDetailsForm.timeout_client_data.$error.number && listenerDetailsForm.timeout_client_data.$dirty">
|
||||
{$ ::ctrl.timeoutError $}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-8 col-md-6">
|
||||
<div class="form-group required">
|
||||
<label class="control-label" for="protocol">
|
||||
<translate>TCP Inspect Timeout</translate>
|
||||
</label>
|
||||
<input name="timeout_tcp_inspect" id="timeout_tcp_inspect" type="number" class="form-control"
|
||||
ng-model="model.spec.listener.timeout_tcp_inspect" ng-pattern="/^\d+$/" min="0" max="31536000000">
|
||||
<span class="help-block" ng-show="listenerDetailsForm.timeout_tcp_inspect.$error.number && listenerDetailsForm.timeout_tcp_inspect.$dirty">
|
||||
{$ ::ctrl.timeoutError $}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-12 col-sm-8 col-md-6">
|
||||
<div class="form-group required">
|
||||
<label class="control-label" for="protocol">
|
||||
<translate>Member Connect Timeout</translate>
|
||||
</label>
|
||||
<input name="timeout_member_connect" id="timeout_member_connect" type="number" class="form-control"
|
||||
ng-model="model.spec.listener.timeout_member_connect" ng-pattern="/^\d+$/" min="0" max="31536000000">
|
||||
<span class="help-block" ng-show="listenerDetailsForm.timeout_member_connect.$error.number && listenerDetailsForm.timeout_member_connect.$dirty">
|
||||
{$ ::ctrl.timeoutError $}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-8 col-md-6">
|
||||
<div class="form-group required">
|
||||
<label class="control-label" for="protocol">
|
||||
<translate>Member Data Timeout</translate>
|
||||
</label>
|
||||
<input name="timeout_member_data" id="timeout_member_data" type="number" class="form-control"
|
||||
ng-model="model.spec.listener.timeout_member_data" ng-pattern="/^\d+$/" min="0" max="31536000000">
|
||||
<span class="help-block" ng-show="listenerDetailsForm.timeout_member_data.$error.number && listenerDetailsForm.timeout_member_data.$dirty">
|
||||
{$ ::ctrl.timeoutError $}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-12 col-sm-8 col-md-6">
|
||||
|
@ -153,7 +153,11 @@
|
||||
admin_state_up: true,
|
||||
default_pool: null,
|
||||
default_pool_id: null,
|
||||
insert_headers: {}
|
||||
insert_headers: {},
|
||||
timeout_client_data: 50000,
|
||||
timeout_member_connect: 5000,
|
||||
timeout_member_data: 50000,
|
||||
timeout_tcp_inspect: 0
|
||||
},
|
||||
l7policy: {
|
||||
id: null,
|
||||
@ -744,6 +748,10 @@
|
||||
spec.admin_state_up = listener.admin_state_up;
|
||||
spec.default_pool_id = listener.default_pool_id;
|
||||
spec.insert_headers = listener.insert_headers;
|
||||
spec.timeout_client_data = listener.timeout_client_data;
|
||||
spec.timeout_member_connect = listener.timeout_member_connect;
|
||||
spec.timeout_member_data = listener.timeout_member_data;
|
||||
spec.timeout_tcp_inspect = listener.timeout_tcp_inspect;
|
||||
}
|
||||
|
||||
function setL7PolicySpec(l7policy) {
|
||||
|
@ -1177,7 +1177,7 @@
|
||||
it('has the right number of properties', function() {
|
||||
expect(Object.keys(model.spec).length).toBe(11);
|
||||
expect(Object.keys(model.spec.loadbalancer).length).toBe(5);
|
||||
expect(Object.keys(model.spec.listener).length).toBe(10);
|
||||
expect(Object.keys(model.spec.listener).length).toBe(14);
|
||||
expect(Object.keys(model.spec.l7policy).length).toBe(8);
|
||||
expect(Object.keys(model.spec.l7rule).length).toBe(7);
|
||||
expect(Object.keys(model.spec.pool).length).toBe(7);
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds the ability to set the timeout options on listeners.
|
Loading…
Reference in New Issue
Block a user