In Python 3 __ne__ by default delegates to __eq__ and inverts the
result,but in Python 2 they urge you to define __ne__ when you define
__eq__ for it to work properly.There are no implied relationships
among the comparison operators. The truth of x==y does not imply that
x!=y is false.Accordingly, when defining __eq__(), one should also
define __ne__() so that the operators will behave as expected.
Change-Id: I9859ad3bdf304ba87d04c9ecabf069b0fdfe4b45
Following OpenStack Style Guidelines[1]:
http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
[H203] Unit test assertions tend to give better messages for more
specific assertions. As a result, assertIsNone(...) is preferred
over assertEqual(None, ...) and assertIs(..,None).
Change-Id: I72327e4c740ef11ee9cba4cda9642e4a270d1b52
This change makes Astara compatible with Newton. This change adds support
for Neutron agent reporting and service providers to work with new L3
drivers. Included in this change is a temporary filed called newton_fix.py.
This file will be removed in follow-up change after changes are migrated to
astara-neutron.
Change-Id: I5843e84e36af2e46de5b8420ca5749033c26ee69
When an exception was caught and rethrown, it should call 'raise'
without any arguments because it shows the place where an exception
occured initially instead of place where the exception re-raised.
Change-Id: Ib9d568d1d2915d5f183c076a114312c7bd9d5dfc
Some tests used incorrect order assertEqual(observed, expected).
The correct order expected by testtools is
assertEqual(expected, observed).
This patch will fix the issue.
Change-Id: I44c7c6a6bf248b17c4f001586a79a91ff9d9dc3d
Partial-Bug: #1259292
Instead of spawning our own threads and relying on the oslo.messaging
executor blocking, lets just use oslo.messaging's internal threading
capabilities. This converts rpc.Connection to rpc.MessagingService,
which is an oslo.service-based service and sets up messaging to managed
there instead.
Closes-bug: #1583330
Change-Id: I9f5a15f1c5dff7e90761887c519a15888096636b
Subscribe to the correct floatingip event for events that broadcast
when a nova associate or disassociate floating IP takes place.
Change-Id: I9aa0704fc7de75b22ecfb8795a65671e8ffcae23
Closes-bug: #1576886
We currently pass the ssh key read from disk straight into
cloud-init. If it contains newlines before or after, it can
break the yaml formatting of the cloud-init causing the appliance
to fail to successfull boot.
Change-Id: I26ef83dc7b02afc5e30f09447363ee27c9dca07c
Closes-bug: #1573167
We currently do not allow operators to specify which endpoint type
needs to be used to reach nova and neutron via their clients. This
adds a new option that defaults to publicURL (as it is today) but
allows operators to specify internalURL or adminURL if they need.
Change-Id: I9432b4df8a5b4fc9f0cc06e6ffb662df634ec4f8
Closes-bug: #1572693
When astara creates allocation config, it has always skipped
service ports (historically VRRP ports), but it currently does not
skip LB ports. This adds some constants where we can define astara's
service port labels and expand in the future, and takes these into
account when deciding which ports to leave out of allocation config.
Change-Id: I6d815b1e7e6e24120ad7fd9becc94a216bfb625b
Closes-bug: #1567163
Neutron very recently changed the device_owner field of router
interfaces on HA routers. We need to account for this when
creating appliance network config, otherwise we omit HA interfaces
from its network config.
Change-Id: Ib41d4255f1ad3180c75f6e89ec6162dfdd0d2796
Closes-bug: #1567623
Bump alive timeout to 60s to deal with slow qemu instances.
Also, give astara more time to recover from a degraded cluster. This
can be slow to recover when a slow qemu node is waiting on a long-running
config update.
Change-Id: I491b96c43d898f7a961725e4f5720af7b9547038
- Dont cache management address of appliances
- Wait for nova instance status==active before asserting router status
- Wait a full config_timeout (600s) for rebuild
- Also look for ha router interfaces when cleaning up
Change-Id: I69341c6abee4e36b10f8e9b676587babe861f0c0
Validates that an instance pair is booted for an HA router and
that the cluster is rebuilt if one server is deleted via Nova.
Depends-On: Icbca3966901d22978bd987faa00b0f48d5e453bb
Change-Id: I9bd4c35343004b01e6539c935f47eca56e6fd2eb
This changes the instance manager to use the InstanceGroupManager
to manage clusters of instances instead of individual instances,
including clusters of 1 node for non-HA resources.
This also adds some missing documenation on enabling clustering
of the astara-orchestartor service.
Change-Id: Ib679453aafe68e6653c8c5f9f412efa72c2b7cb1
When a tenant network is detached from the logical router
the related vrrp port on the astara router is detached but
not deleted. That makes any attempt to delete the network
fail.
Change-Id: I721b25f72a4b0afb1d02fa0e50c5112d66bcd15d
Signed-off-by: Rosario Di Somma <rosario.disomma@dreamhost.com>
Closes-Bug: 1531274
This allow users to specify the driver and image associated with
a network function. This is dependent on the correct API extension
being loaded into neutron from the astara-neutron repo.
Depends-on: I6b6f98e8ae89c704f45b05f87f17ebed5a70fc1d
Partially-implements: blueprint astara-sfc
Co-authored by: Mark McClain <mark@mcclain.xyz>
Change-Id: I1c349e56fd23d1aa95c7f8c0da68d25246b0ceb2
This change adds support for VPNaaS to appliance router driver. Since
VPNaaS is a router based service, each router driver must implement it's
own configuration rendering.
Change-Id: I2ffb8946b9c5716e398ca8a55654adfafe664889
Implements-Blueprint: neutron-vpnaas
Instead of using assertEqual(A, None) and assertTrue(A * B),
developers should use assertIsNone and assertLess.
Change-Id: I3f995f4150e96916904da5066af03ca50778444d
We keep passing around driver instances as a 'driver' parameter
and track it locally in the instance and state manager as self.driver.
This is actually a resource encapsulated, and we should reference it
as such to avoid being opaque. This renames it accordingly.
It also removes some redundancy where we are passing resource_id along
with a resource object, which contains the id as well.
Change-Id: I65490f01608fda1da3467455ee58ecb5fa6c7873
This change limits the number of update events generated for a router by
removing the catch-all conditional that previously applied. In
addition, floatingip events were added as intersting events for a
router.
Change-Id: I67c3082d8b9f3ad3e47d65f6c13ef05c06d4d6d1
Closes-Bug:1556294
Limit the ports we inspect in the tenant router test to only those
that are marked as router interfaces.
Change-Id: Ic1f8605f4c3bc95fdcdc138e786d724320a41080
On startup, if the worker receives messages for pre-populated resources
prior to processing the initial cluster rebalance event, the messages
will be dropped. This fixes the race by tracking when the hash ring
has been initialized. Any events it receives prior to finishing init
will be batched up and processed as part of the initial bootstrapping
procedure.
Change-Id: I3caf95f57380076ab48e4270e1cd575906fba386
Closes-bug: #1554248
Previously the orchestrator could be configured to create access to the
external network. This combined with auto external gateway additions
would cause problems with automation tools and did not work reliably.
This change removes this functionality since it was often disabled in
production deployments. This change aslo slightly reduces devstack
runtime by removing the Neutron restart.
Change-Id: I556f1fc2729f1d62a60de24b6d5e9ed473749f9a
We use jsonutils.dump_as_bytes() to dump data, so we should expect
bytes instead of str.
Change-Id: I56a43b26711dd952cdc4519ab9de8d89fc7eaa74
Partially-Implements: blueprint astara-python3
With Eventlet 0.17.2, we can directly pass the logger instance. This
allows us to deprecate/remove the WritableLogger class from oslo.log.
Change-Id: I7706a8e876b0446ae75e7b2573cf94ab72610696
Closes-Bug: #1524860
This file changes anytime anyone generates configs, including devstack, and
can lead to unintended changes in patches if using a devstack env. as a
development environment. This follows what we do with orchestrator.ini and
tracks the sample as test.conf and ignores the .sample.
Change-Id: I9151b1fa2161943cd9839927409b24f3c0430ffb
The CheckBoot state should really only be concerned with testing that the
instance has successfully booted and its API is up and ready for
ConfigureInstance's config push. This is handled entirely by update_state()
and pushing the config here as part of the boot test is redundant, which can
be problematic in environments where a config update is an expensive task.
Change-Id: I5de24c627e468ba12fbccd3a3be713db380b645a