Commit Graph

177 Commits

Author SHA1 Message Date
Andreas Jaeger 7759e2fd82 Retire astara repo
Retire repository, following
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project

Change-Id: If5f7d284bd107a93edd9272ac0ed8e6d20ba5c51
2018-10-14 12:50:35 +02:00
Jenkins eec8a2004b Merge "Fix a failing functional test" 2016-10-05 18:15:43 +00:00
Jenkins 2c72536137 Merge "Using assertIsNone() instead of assertIs(None)" 2016-10-05 15:55:31 +00:00
Jenkins e37150ac99 Merge "Using assertIsNone() instead of assertIs(None, ..)" 2016-10-05 15:14:09 +00:00
Jenkins 5ed027e776 Merge "Fix typos in instance_manager.py & base.py" 2016-10-05 14:12:45 +00:00
Jenkins 7b7dfc202d Merge "Add __ne__ built-in function for astara" 2016-10-05 14:12:39 +00:00
Jenkins 94057c01e7 Merge "Fix typo in coordination.py" 2016-10-05 14:12:34 +00:00
Ryan Petrello 1d99e2a84e Fix a failing functional test
Change-Id: Iae1934c5c7fef58e3403149be1efe1d24937eb69
2016-10-05 13:51:53 +00:00
qinchunhua 9eaa071cb0 Replace __builtin__ with six.moves.builtins
Python 3: Fix basic py3 issues.

TrivialFix.

Change-Id: Ibe5cad2e27ef7174bf3f0d17b0814fd881251b39
2016-10-04 21:25:38 +00:00
gengchc2 93d61f3689 Add __ne__ built-in function for astara
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
2016-10-04 21:24:15 +00:00
zhangyanxian 317194c483 Fix typos in instance_manager.py & base.py
TrivialFix

Change-Id: I9796139eb99ea9422cae02ab7628a31b17b83333
2016-10-04 21:23:19 +00:00
zhangyanxian 87390bbb79 Using assertIsNone() instead of assertIs(None)
Change-Id: Ia05b6a86ddc745f202d501f3ca4e07e33fc0890c
2016-10-04 21:23:05 +00:00
Ji-Wei e3b3947af8 Using assertIsNone() instead of assertIs(None, ..)
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
2016-10-04 21:22:55 +00:00
zhangyanxian b626edaaad Fix typo in coordination.py
TrivialFix

Change-Id: I07af7a959f5a216ae66b0e0ba9437336198a9c87
2016-10-04 21:22:37 +00:00
Mark McClain 59e25b504d Make Astara Newton compatible
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
2016-10-04 10:49:09 -04:00
qinchunhua b8283527be Correct reraising of exception
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
2016-07-11 02:18:14 -04:00
Ji-Wei 3fbbcd941c Fix order of arguments in assertEqual
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
2016-06-26 08:59:57 +00:00
Adam Gandelman 6a934060f0 Fix messaging layer for newer oslo.messaging changes
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
2016-05-21 21:07:46 -07:00
Jenkins 6fd701be79 Merge "Show version info for astara-dbsync" 2016-05-02 17:14:39 +00:00
Adam Gandelman 3f26c9a298 Subscribe to correct event for FIP assoc/disassoc
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
2016-04-29 15:34:17 -07:00
liyang b87c8924dc Show version info for astara-dbsync
Closes-bug #1567155

Change-Id: Ia932f9f840ad967d46c6185a56588bbecc8e53ad
2016-04-28 14:55:07 +08:00
Jenkins be4e3965e1 Merge "Ensure ssh key is sanitized when read from disk" 2016-04-21 21:50:39 +00:00
Adam Gandelman 158cf8d670 Ensure ssh key is sanitized when read from disk
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
2016-04-21 11:00:14 -07:00
Adam Gandelman 64453dc26d Disable port security for mgt ports as well
In some deployments (OVS), port security must also be disabled
on the management port for communication from astara to the appliance
API.

Change-Id: I10bae7041aab7b4b143987bf07d800b3e50a6444
Closes-bug: #1573156
2016-04-21 10:21:36 -07:00
Adam Gandelman b305beacd4 Allow specification of endpoint_type to clients
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
2016-04-20 12:09:11 -07:00
Mark McClain 665f50b36d Remove APIParamsCall references
This decorator is no longer supported by the Neutron Client, so we can
safely remove it.

Change-Id: Ib12f18a4430725e703c7a680324d948fee306758
Closes-Bug:1570423
2016-04-14 10:50:41 -04:00
Jenkins b18f54d9ca Merge "Cleanup loadbalancer mgt and service ports" 2016-04-11 17:43:26 +00:00
Jenkins 8672f2a400 Merge "Skip all types of service ports when creating allocation config" 2016-04-11 17:43:21 +00:00
Adam Gandelman 63a2a59786 Cleanup loadbalancer mgt and service ports
Adds a missing driver function to the LB driver to cleanup its management
and service ports on deletion or error, similar to the behavior of routers.

Change-Id: I371a33be15977f20d0806e386e34d0ebf3db9df9
Closes-bug: #1567667
2016-04-07 14:22:55 -07:00
Adam Gandelman 968c7da141 Skip all types of service ports when creating allocation config
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
2016-04-07 12:33:36 -07:00
Adam Gandelman 33edf3a581 Include newly-labelled HA router interfaces in network config
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
2016-04-07 12:31:29 -07:00
Jenkins 12785c941d Merge "Fix typos in Astara" 2016-04-05 22:21:19 +00:00
Adam Gandelman 93261b2a1a devstack: Bump alive_timeout
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
2016-03-29 14:54:06 -07:00
Adam Gandelman f4cfb48080 Fix bugs in functional tests
- 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
2016-03-28 19:50:25 -07:00
Nguyen Hung Phuong 4959d768dd Fix typos in Astara
This patch fixes typos in Astara files.

Change-Id: I1cfe3f57240a57511eaa277466cbaa7c60969bc3
2016-03-26 15:03:31 +07:00
Adam Gandelman 93ecf4dbca Adds HA router functional test
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
2016-03-18 14:25:51 -07:00
Adam Gandelman 6613031d91 Add clustering capabilities to instance manager
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
2016-03-18 14:25:51 -07:00
Jenkins fd8fe9c431 Merge "Delete detached vrrp ports when a newtork is removed" 2016-03-18 21:02:28 +00:00
Jenkins 23e3607089 Merge "Adds ability to run appliance with user-specified drivers/images" 2016-03-18 20:48:30 +00:00
Jenkins c7ce3d42dd Merge "Add support for VPNaaS" 2016-03-18 20:12:58 +00:00
Jenkins d1a1c836f7 Merge "Use assertIsNone and assertLess" 2016-03-18 19:42:00 +00:00
Rosario Di Somma 1bd785da97 Delete detached vrrp ports when a newtork is removed
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
2016-03-18 12:27:47 -07:00
Adam Gandelman 2aabf4b185 Adds ability to run appliance with user-specified drivers/images
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
2016-03-18 12:02:34 -07:00
Mark McClain d6db296c80 Add support for VPNaaS
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
2016-03-18 11:17:43 -07:00
Béla Vancsics 609e60ebf0 Use assertIsNone and assertLess
Instead of using assertEqual(A, None) and assertTrue(A * B),
developers should use assertIsNone and assertLess.

Change-Id: I3f995f4150e96916904da5066af03ca50778444d
2016-03-17 23:29:17 +00:00
Adam Gandelman e2eb7d4689 Rename self.driver to self.resource where applicable
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
2016-03-17 23:20:44 +00:00
Jenkins 3d96794fd7 Merge "py3: use function next() instead of next() method on iterator objects" 2016-03-17 21:45:43 +00:00
Jenkins b0616745ca Merge "Handle a race between pre-populate and hash ring bootstrapping" 2016-03-17 18:29:52 +00:00
Jenkins f4361d459d Merge "Properly limit router driver event processing" 2016-03-17 02:39:32 +00:00
Mark McClain d55ffba180 Properly limit router driver event processing
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
2016-03-16 15:10:15 -07:00