assertEquals() logs a DeprecationWarning in Python 3.x,
use assertEqual() instead. The same goes for assertNotEquals().
Change-Id: Id3491b278018736f2e41bc85aa475e8aafe5723d
NOTE: Database schema altering change.
Companion commit for commit 0eb56f. Timeout values (for client,
server, connect) and connect retry values can now be specified
in the UPDATE request. E.g.:
{
"hpcs_action": "UPDATE",
"loadBalancers": [
"protocol": "http",
"options": {
"client_timeout": "30000",
"server_timeout": "30000",
"connect_timeout": "30000",
"connect_retries": "3"
},
...
]
}
Default values are saved to the LOADBALANCERS table in the database
if no values are given in the JSON message. The current defaults
match the defaults in the HAProxy worker driver so pre-existing LBs
will match new LBs.
Change-Id: I2edb67e462f314837fc89ac82eaf1140291a939e
Note: Schema altering change
Adds a new table that allows maximum number of load balancers to
be set per tenant ID. If a value is not set, the global value is
used. The per-tenant value always overrides the global value.
Change-Id: Ib7911742510756e34a4ef0ecf9380abb2a759e8e
MnB create and deletes have been moved out of the API calls
to the gearman client, after the creates / deletes have completed.
Also had to move billing_enable to the defaul config group.
Change-Id: I289e84d96d72a1fd493231938360f482c7820d41
Gearman message actions need to change to maintain backward
compatibility. PING will revert back to STATS, and METRICS
will replace the STATS message.
Worker message documentation is also updated.
Change-Id: I1aa7478abcf29ffe5dbd512b2175dc5633548064
This code was originally used to start a new thread that polled
the worker for statistics. This is gathered via the STATS message
now, so this is unused code.
Change-Id: I1cc7a1af1717f910308ac83967c21df1f705d8f8
Parse the new loadBalancers.options section of the UPDATE JSON
message to set various timeouts and retry values. These options
can be set per-protocol. Timeout values are assumed to be in
milliseconds, with the default being 30000 ms for the timeouts
and 3 for the retry value.
Example JSON message:
{
"hpcs_action": "UPDATE",
"loadBalancers": [
"protocol": "http",
"options": {
"client_timeout": "30000",
"server_timeout": "30000",
"connect_timeout": "30000",
"connect_retries": "3"
},
...
]
}
Change-Id: I45a6b9c85e8fc282ac80fa3f0eae0193e08e9756
Ask pip to upgrade packages in the virtualenv so that a long-lived
virtualenv is still kept up to date as external dependencies change.
Change-Id: I6a7da0a46ec8897f34cfeb38e5741e9ce0167cb2
The HAProxy statistics socket file will not exist on a new device,
so attempts to save the stats before a reload would fail.
Change-Id: Ib31509bb7d68424d63f41b1c3032f15a1ca786e2