Ran `flynt octavia` in order to replace old style string format with
f-strings.
Manually corrected lines that got too long and some occurences that were
not converted to f-strings.
Change-Id: I228a78baf2f4b6c47229d7dce1fcd81ef27c0030
The previous patch[1] that added a check for Amphora status missed
adding a task that generates the Amphora status information when a
listener is updated.
This patch corrects that by adding the AmphoraeGetConnectivityStatus
task to the firewall rules subflow.
[1] https://review.opendev.org/c/openstack/octavia/+/912599
Change-Id: I325de85b03080db646da847b58c15c3fbbdc6be2
Fix the following new errors detected by pylint 3.2.0.
- possibly-used-before-assignment
- used-before-assignment
- useless-return
Change-Id: Ibfa282e7311a06ed69797cb9969aa66459372d79
When filtering the GET calls with a boolean attribute, the value of the
attribute was a string and not a boolean, it made the queries incorrect.
Now, every boolean attribute is converted from a string to a boolean
before querying the DB.
Closes-Bug: #2045803
Change-Id: I9aea55371d3f3d054eba5673d09eead23d5c95a8
test_main may have randomly failed when running multiple tests in
parallel because ThreadingHTTPServer was not mocked, so a server was
created, this commit fixes this issue, the server is no longer
instantiated and is now mocked.
Change-Id: I2415aafaebd340e4a07b85df2c8917244266ed4c
Closes-Bug: #2039245
When reloading haproxy, check if a "<service> is not active, cannot
reload." error is triggered by systemd, it means that haproxy crashed
during the reload. When this error is detected, verify if haproxy has
reloaded correctly (check the socket and its uptime).
Related-Bug: #2054666
Change-Id: Ibadf6e529d53fb5a45b73af57243cee5a3f70d9b
The autoload arugment was removed[1] in SQLAlchemy and only
the autoload_with argument should be passed.
The autoload argument is set according to the autoload_with argument
automatically even in SQLAlchemy 1.x[2] so is not at all needed.
[1] c932123bac
[2] ad8f921e96
Closes-Bug: #2061303
Change-Id: Ic18044b8065d2350c180ad26f5307a77aa99037b
Octavia replace "limit" with None when it is less 1. (for example 0, -1)
However the further code failed to compare None and int values.
This patch fixes it by validation, that limit is None.
Co-Authored-By: Roman Goncharov <gadzhet007@gmail.com>
Closes-Bug: #2060917
Change-Id: I9bb45a1aca6b7b18644752a3dccc3ebfb7c106ef
Result of running
$ pyupgrade --py38-plus $(git ls-files | grep ".py$")
This was inspired by Nova [1]
Fixed PEP8 errors introduced by pyupgrade by running:
$ autopep8 --select=E127,E128,E501 --max-line-length 79 -r \
--in-place octavia
and manual updates.
[1]: https://review.opendev.org/c/openstack/nova/+/896986
Change-Id: I9399730fed16b85686caa586788a1bc03ebd123a
Result of running
$ pyupgrade --py38-plus $(git ls-files | grep ".py$")
This was inspired by Nova [1]
Fixed PEP8 errors introduced by pyupgrade by running:
$ autopep8 --select=E127,E128,E501 --max-line-length 79 -r \
--in-place octavia
and manual updates.
[1]: https://review.opendev.org/c/openstack/nova/+/896986
Change-Id: I3924de7cd8e2d242006ec4f272ece0276053e2ed
Result of running
$ pyupgrade --py38-plus $(git ls-files | grep ".py$")
This was inspired by Nova [1]
Fixed PEP8 errors introduced by pyupgrade by running:
$ autopep8 --select=E127,E128,E501 --max-line-length 79 -r \
--in-place octavia
and manual updates.
[1]: https://review.opendev.org/c/openstack/nova/+/896986
Change-Id: I9aeb3d603a519c3029b5be1ab622a0250f628f7d
Result of running
$ pyupgrade --py38-plus $(git ls-files | grep ".py$")
This was inspired by Nova [1]
Fixed PEP8 errors introduced by pyupgrade by running:
$ autopep8 --select=E127,E128,E501 --max-line-length 79 -r \
--in-place octavia
and manual updates.
[1]: https://review.opendev.org/c/openstack/nova/+/896986
Change-Id: I7d69a002c4e4c79fc2f5a13e9056aa2461d0ab7a
Result of running
$ pyupgrade --py38-plus $(git ls-files | grep ".py$")
This was inspired by Nova [1]
Fixed PEP8 errors introduced by pyupgrade by running:
$ autopep8 --select=E127,E128,E501 --max-line-length 79 -r \
--in-place octavia
and manual updates.
[1]: https://review.opendev.org/c/openstack/nova/+/896986
Change-Id: Ib160f988cea0c6a27b3c1efeb2b2953f8929dc5c
Result of running
$ pyupgrade --py38-plus $(git ls-files | grep ".py$")
This was inspired by Nova [1]
Fixed PEP8 errors introduced by pyupgrade by running:
$ autopep8 --select=E127,E128,E501 --max-line-length 79 -r \
--in-place octavia
and manual updates.
[1]: https://review.opendev.org/c/openstack/nova/+/896986
Change-Id: I4ad020fbedd8106a3a86768c25a0c4dc750ec88a
Result of running
$ pyupgrade --py38-plus $(git ls-files | grep ".py$")
This was inspired by Nova [1]
Fixed PEP8 errors introduced by pyupgrade by running:
$ autopep8 --select=E127,E128,E501 --max-line-length 79 -r \
--in-place octavia
and manual updates.
[1]: https://review.opendev.org/c/openstack/nova/+/896986
Change-Id: I8560b5440c0c2338e468b12d8c4abcc47a8fb50a
Add file to the reno documentation build to show release notes for
stable/2024.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.1.
Sem-Ver: feature
Change-Id: I744c29c1a03aba952b98a9fa3b6772073fa3805c
When creating a LB + a listener with an allowed_cidr with the
fully-populated API, an issue happened when Octavia validated that the
allowed_cidrs and the VIP ip address have the same IP version. The
vip.ip_address value was not updated in the load balancer object,
forcing the expiration of the DB object before entering _graph_create
fixes this issue.
Note: there's no change in the tests, the test function for this feature
exists, looks correct, and passes successfully, the bug is only
reproducible in octavia-api.
Closes-Bug: 2057751
Change-Id: Ia106d81c1b2588e5d938d2238c8a2f6660bf5ef1
Ubuntu Focal is no longer part of the tested environments, because of
newer LTS available now (Jammy).
Change-Id: I7a6df974762abdd94784416609304618ce702b6e
As noted on an earlier patch[1], the "SetAmphoraFirewallRules" task was not
checking the Amphora status nor using an API timeout. This could cause failover
flows to take longer than necessary if one of the Amphora is missing.
This patch corrects that issue by honoring both the Amphora status and timeout.
[1] https://review.opendev.org/c/openstack/octavia/+/910101/13/octavia/controller/worker/v2/flows/amphora_flows.py
Change-Id: Ic5e8140b13164267236f0a5d9a48fbd84bcdd688