If the AZ system is being used and there is also a default boot network
set in the main config, the nova driver would not pick the right
interface when translating the amphora info for amps in custom AZs.
This affects the step that fetches the lb_network_ip (the management
address) from nova, immediately before the step that updates the
database with the correct IP. That IP is then used in the rest of the
amphora creation flow, which pulls in that address and uses it to
connect to the amp.
Change-Id: Ie4869035a557ebcddea2fce693067c82fbd2d2a9
Now that we are python3 only, we should move to using the built
in version of mock that supports all of our testing needs and
remove the dependency on the "mock" package.
This patch moves all references to "import mock" to
"from unittest import mock". It also cleans up some new line
inconsistency.
Change-Id: I72520a2ca010c2c27315d9dff839a4f9d7540b6b
Adds the ability for admins to create/manage availability_zones
and profiles for use with upcoming functionality. Works like flavors.
Depends-On: https://review.opendev.org/#/c/694057/
Change-Id: I468d9fdf8c9d0898f9e30f04ac233510a10a53fc
In some deploy production, using volume based instead of localdisk
to protect data and live migrate can perform.
This patch adds:
- creation a cinder volume for amphora
- boot amphora with cinder volume
- config options for cinder client
- unit tests for cinder functionality
Story: 2001594
Co-authored-by: Vadim Ponomarev <velizarx@gmail.com>
Co-authored-by: Margarita Shakhova <shakhova.margarita@gmail.com>
Change-Id: I8181ed696b9ab556e7741c08839d79167aff8350
This patch adds a new flavor capability to the amphora driver called
'compute_flavor'. This allows an amphora flavor to specify a compute
(nova) flavor to be used for the load balancer instances.
Change-Id: I8626eebd906c935a47d3e3510d1dfefae307c4e9
Operators want to have the ability to see amphora flavor information.
But they haven't access permisson of octavia configuration file. So
it is necessary to show amphora flavor information as part of command
'openstack loadbalancer amphora list/show'.
Story: 2002896
Task: 22986
Change-Id: Ib3ca05d816747d08ef7055ec532b81746468cbf9
Replace calls to the nova client with calls to the compute driver.
This will help non vm efforts (e.g. zune) and also make the code
easier to break up later.
Change-Id: I7ee175c5ecb98af0ca5e299c2ac10e43eb40ed30
This also fix build-openstack-sphinx-docs, there was a change introduced
in sphinx 1.6.6:
https://github.com/sphinx-doc/sphinx/pull/4335/files
If the size of __init__.py is less than 2, then the module would be
skipped which will cause the sphinx consistency checking failing later.
Change-Id: I9d8764b6e907aceed8bb8a9b04711145d0eb32ad
This will enable a number of possible features that need to select
amphorae based on their availability zone.
This would allow for quick-lookups on large lists and could be stale,
but it would be expected that future code that uses this would check
with nova for an update if it needs fully accurate data.
Having it be explicitly "cached" should take care of concerns about
users (operators, in this case) being confused about correctness.
Using simply the word "zone" should address concerns about commonality
between compute providers.
Change-Id: I8e26f99bca3496a454ba7bae2570f517e07d5fc2
Story: 2001221
Task: 5732
Octavia was not exposing the underlying compute driver exception
information to the operator in the octavia logs. This meant debugging
required examining the compute service logs.
This patch will pass through the fault message provided by the compute
driver in the exceptions raised and clarify in the logs when the
nova driver caused the failure.
Change-Id: If54656c635aac907d78b387a9b191320385d9852
Closes-Bug: #1658900
This option was NEVER read, so there is no point in continuing to allow
it to be configured (it is pointless).
Change-Id: I147abdd8d3d95164168ec606f5b92401cb24d1fe
Closes-Bug: #1691286
Some nova deployments automatically select their networks on boot.
We can allow for this by assuming there will be some default network if
the amp_boot_network_list is empty.
Change-Id: I38ccfb45afb93795860c12efaf5a32f9bd1689fd
This patch corrects some testing issues with improper configuration types.
These changes prepare octavia for oslo.config version 4.0.0 which sets
enforce_type=True by default.
Change-Id: I0a3bca495a40cd921b59e4f8b4c4ae8c228d4816
Related-Bug: #1517839
Change methods used in backend to authenticate with keystone.
Use autodetection mechanizm for API version and refactor config
options specified in Octavia.
Change-Id: Id0deee2714040d271f43a537c27f410e2f4e3ef2
Closes-Bug: #1620668
Closes-Bug: #1618691
Some of the tests were failing due to improper configuration overrides
in the test cases. This patch fixes those tests to use the current
recommended method with oslo test fixtures that will cleanup after the
test.
Change-Id: I5f1ea16bbc16056aa756415a618a8f4192436dfd
Closes-Bug: #1630060
This patch adds an optional configuration setting that allows an
operator to restrict the amphora glance image selection to a specific
owner id. This is a recommended security setting for clouds that
allow user uploadable images.
Change-Id: I73347b5b3e868d13974cd6ca6bada9cdf75773fe
Closes-Bug: #1620629
Currently the amp_network is a stringOpt and in code it
translates that to a list for processing. It may
be required to deploy with multiple networks,
a listOpt for amp_network option allows this.
Change-Id: I4364c1d03d4c7b560f0d8030b7d66412583a31ae
Deprecated amp_image_id option with the new amp_image_tag option.
Also switched devstack plugin to rely on the tag to update the image
used for new load balancers.
Implements: blueprint use-glance-tags-to-manage-image
Change-Id: Ibc28b2220565667e15ca2b2674e55074d6126ec3
https://blueprints.launchpad.net/octavia/+spec/anti-affinity
Added a new column in lb table for server group id;
Added a new task in compute tasks for creating server group;
Added a new task in dtabase tasks to update server
group id info for lb;
Add server group id in create method in nova driver to support
anti-affinity when creating compute instance
Change-Id: If0d3a9ba1012651937a2bda9bc95ab4f4c8852d5
Nova network (os-networks) is depcrecated and thus its
usage should be replaced by Nova interface (os-interface).
Create corresponding test cases.
Added nova networks back in since RAX still needs it
Ref url: http://developer.openstack.org/api-ref-compute-v2.1.html#listAttachedInterfaces
Change-Id: Iccfd028055e1d3dc13a63d5e48a8c6e3275d42f2
Each config option has limitation for type and value.
In production code, oslo.conf can ensure user's input
is valid, but in unit test, test methods can pass if
we use method CONF.set_override without parameter
enforce_type=True even we pass wrong type or wrong
value to config option. This commit makes sure calling
method CONF.set_override with enforce_type=True.
Change-Id: I1e4f2aa5797ba8582a5637cd86c6b2b626daa923
Closes-Bug: #1517839
Mock 1.0.1 is actually different enough than unittest.mock 3.4
to cause porting issues.
Hence deprecate unittest.mock use, use mock directly.
Closes-Bug: #1506808
Change-Id: I585a5f370566159ff4a071e25d7e2a3702392a2d
Used binary compressed encoding of json dumped object. To reduce
the size needed to send heart beats incase some stats objects
start getting sent later on. Also used sha256 instead of sha1
with hmac.
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Co-Authored-By: German Eichberger <german.eichbeger@hp.com>
Co-Authored-By: Carlos Garza <carlos.garza@rackspace.com>
Partially implements: health-manager
Change-Id: I932c693101b94c9132e1741291610508876eab43
Added a flow to complete automated failover for an amphora. Added new tasks
to retrieve ports, change port device ids for re-allocating to new amphora,
and added functionality to include existing ports on amphora creation.
Co-Authored-By: Brandon Logan <brandon.logan@rackspace.com>
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: Ic0d3f2b9a48ebf66df78e1ef98aef92ad7ee5057
Octavia does not support keystone regions and can choose an incorrect
endpoint url when multiple regions provides same services.
Change-Id: I5ea9de380419592920555a2c2fe7ac6f6935e700
Closes-Bug: #1487359