Commit Graph

99 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
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
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
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
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 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
Jenkins 8672f2a400 Merge "Skip all types of service ports when creating allocation config" 2016-04-11 17:43:21 +00: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
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
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 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
Adam Gandelman d217d58068 Fix test to only inspect ports that are router interfaces
Limit the ports we inspect in the tenant router test to only those
that are marked as router interfaces.

Change-Id: Ic1f8605f4c3bc95fdcdc138e786d724320a41080
2016-03-16 14:12:51 -07:00
vishal mahajan 1fdb2aa2cd py3.x: Use six.text_type() instead of unicode()
Python 3 doesn't support unicode(), use six.text_type instead.

Change-Id: I0f991d7b0f13bcddd65b7da68ee0965c94d2e439
2016-03-10 17:15:39 +05:30
Jenkins ddcdc7a911 Merge "Fix comparasion of bytes" 2016-03-09 21:31:53 +00:00
Jenkins 060e9178e0 Merge "Remove external network hooks and auto-added resources" 2016-03-08 20:54:16 +00:00
Adam Gandelman f9c5941b97 Handle a race between pre-populate and hash ring bootstrapping
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
2016-03-07 14:59:05 -08:00
Mark McClain f8d7a37abb Remove external network hooks and auto-added resources
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
2016-03-07 13:15:35 -08:00
Yang Hongyang aeca99d5a6 Fix comparasion of bytes
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
2016-02-29 23:58:42 +08:00
Chaozhe.Chen c4d834dbe8 Stop using WritableLogger() which is deprecated.
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
2016-02-23 00:35:27 +08:00
Jenkins b74bf37c25 Merge "Remove redundant config push in CheckBoot()" 2016-02-08 22:49:26 +00:00
Jenkins 9a0a0ce4f3 Merge "Refactor ensure_cache for instance manager" 2016-02-08 22:22:33 +00:00
Adam Gandelman cef007a772 Stop tracking test.conf.sample in git
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
2016-02-04 11:16:17 -08:00
Adam Gandelman 3decd5277d Remove redundant config push in CheckBoot()
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
2016-02-04 10:32:00 -08:00