Commit Graph

192 Commits

Author SHA1 Message Date
Chris MacNaughton c75f2fcb6d Ensure that zaza-openstack-tests can talk to an IPv6 Keystone
When configuring the address to use to talk to Keystone,
the format_addr helper should be used to ensure that an
IPv4 or IPv6 address can be correctly handled.
2020-09-08 11:11:13 +02:00
Alex Kavanagh 056e29cbdc Remove commented out code sections
These were left over from the refactor.
2020-08-20 11:15:16 +01:00
Alex Kavanagh 5ad5f85f99 Fix the charm-upgrade tests as used by CoT
The biggest change is that the upgrade_groups() is a list of tuples ...
[()] ... rathern than a collections.OrderedDict().  This tends to make
more sense as they are processed in order and don't actually need to be
indexed.

Also excludes easyrsa (as it's not an upgrade target) and adds a
"Database Services" which upgrades mysql or percona FIRST before moving
on to rabbitmq and other stateful services.  This is because some charms
really need to talk to mysql if one of the other stateful services does
a relation changed hook.  This makes it more likely that the system will
ugprade correctly.
2020-08-19 20:47:00 +01:00
Liam Young 59b6c1bd35 Merge pull request #341 from openstack-charmers/lourot/keystone
Minor improvements to keystone tests
2020-07-16 13:26:09 +01:00
Aurelien Lourot 0287664d92 Fix paramiko.ssh_exception.BadAuthenticationType (#355)
Fix paramiko.ssh_exception.BadAuthenticationType when SSHing to a new Ubuntu instance.

Note that paramiko still has a few issues around authentication:
https://github.com/paramiko/paramiko/pull/1106/files

This paramiko PR also shows that password='' isn't the same as
password=None
2020-07-09 16:35:00 +02:00
Liam Young 7f122b8611 Last unit test fix (passing locally, was failing in travis) 2020-07-07 12:38:18 +00:00
Liam Young ed2aded7f9 Fix another unit test 2020-07-07 12:32:54 +00:00
Liam Young 9b706b8eaa Remove swap files 2020-07-07 12:24:32 +00:00
Liam Young 76fdb61e0f Fix up unit tests 2020-07-07 12:18:01 +00:00
Aurelien Lourot 670292c683 Remove more deprecation warnings 2020-07-02 12:11:23 +02:00
Liam Young 58182b86b8 Deprecate zaza.openstack.utilities.juju (#340)
This is the 3rd change in the effort to deprecate
zaza.openstack.utilities.juju in favour of zaza.utilities.juju.
All functions now just wrap their equivalents in
zaza.utilities.juju and a decorator has been added which logs a
warning if the function is used.
2020-07-01 14:38:19 +02:00
Liam Young a419fccdb7 Merge pull request #308 from openstack-charmers/ipv6-fixes
Ipv6 fixes
2020-06-19 10:59:12 +01:00
Corey Bryant de893b66b8 Drop OS_ prefix from OS_TEST_HTTP_PROXY
As part of this change also switch to using deployment_env.
2020-06-12 02:35:35 +00:00
Frode Nordahl 2e6a2ef534 Add helper to format IP addresses appropriately
The ``format_addr`` helper will allow you to write IP version
agnostic code by encapsulating IPv6 addresses in brackets ('[]').
2020-06-06 14:38:38 +02:00
Frode Nordahl 8c747390d3 Fail early when no units found for external port creation
Fixes #298
2020-05-28 13:24:14 +02:00
Aurelien Lourot 59ec82f542 Make ssh_test() more robust 2020-05-07 14:25:47 +02:00
Dmitrii Shcherbakov 740bc2060f Pass arguments BaseCharmTest.setUpClass
Not doing so triggers an incorrect behavior leading to functional test
failures as the application name is not set correctly.

https://github.com/openstack-charmers/zaza-openstack-tests/issues/256
https://review.opendev.org/#/c/712980/1
2020-05-04 20:45:55 +03:00
Chris MacNaughton f49259e426 Set some apt config to accept package defaults
Because the OpenStack charms re-render their config
whenever things are incorrect, we can accept any new
package defaults as a part of the upgrade and
resolve incorrect config after the upgrade
2020-04-17 13:45:47 +02:00
Liam Young 3245a6646f Merge pull request #224 from ChrisMacNaughton/feature/parallel-series-upgrade-refactor
Series upgrade can be done in massively parallel batches
2020-04-16 12:31:10 +01:00
Chris MacNaughton 2bc2234cad Update to migrate bits out to Zaza 2020-04-16 11:53:35 +02:00
Chris MacNaughton fa4587f366 Ensure that origin is set only after the first machine is rebooting 2020-04-15 16:38:42 +02:00
Chris MacNaughton 592622935c tidy up and add more debugability 2020-04-15 10:06:41 +02:00
Aurelien Lourot 83246a9305 Print stderr when failing to ping new instance 2020-04-14 14:50:31 +02:00
Chris MacNaughton 27e5f7d8bc We must have async functions for the before/after callables 2020-04-10 16:51:41 +02:00
Chris MacNaughton 208439cdf1 Add unit tests for pre and post-app upgrade functions 2020-04-10 11:42:21 +02:00
Chris MacNaughton 183b3c012f Add unit tests for new rabbit and mysql helpers 2020-04-10 11:02:38 +02:00
Chris MacNaughton e2d6a5c081 Add test coverage for follower-first upgrades 2020-04-10 10:50:43 +02:00
Chris MacNaughton 7649bcb10e Skip the async unit tests on py35 2020-04-10 10:50:43 +02:00
Chris MacNaughton 74652f2523 Add unit test coverage for series upgrades
This also includes some tidying
2020-04-10 10:50:43 +02:00
Chris MacNaughton cf1ea4c71b First pass at batched parallel series upgrade 2020-04-10 10:50:43 +02:00
Liam Young a822f6995b Added unit tests 2020-04-01 13:45:47 +00:00
Chris MacNaughton 42b0f5fcb1 Secondary first upgrades should also support the origin argument
Closes #210
2020-04-01 09:31:03 +02:00
Chris MacNaughton 540e0ea4fc tidy up style things, add docstring 2020-03-25 08:44:41 +01:00
Chris MacNaughton f73b4c1d6d fix up unit tests and assumptions 2020-03-25 08:44:41 +01:00
Chris MacNaughton 0a94b97cf4 update for style bits 2020-03-25 08:44:41 +01:00
Chris MacNaughton 8450216f72 Create parallel (async) series upgrade 2020-03-25 08:44:41 +01:00
Chris MacNaughton 93fd631b1a Split up and re-organize upgrade helpers 2020-03-25 08:44:41 +01:00
Alex Kavanagh 7538791b52 Merge pull request #145 from gnuoy/add-openstack-upgrade-lib
Add functions for performing OpenStack upgrades
2020-02-04 11:42:54 +00:00
David Ames b5e250513b Fix for NDR testing race condition
Previous attempts to fix LP Bug#1784083 added a workaround (commit
820ed808) which is being removed here.

The root cause seems to be upstream in the dragent. It may never have
been envisioned to run the agent by itself the way the charm does.

So that even if neutron-api completes its amqp relation first,
neutron-dynamic-routing can still see
oslo_messaging.exceptions.MessagingTimeout errors. Some operation
must occur against neutron before dragent is truly ready. i.e. some post
deploy openstack command. So it is outside the purview of the charm.

This change adds a service restart late.

Partial-Bug: #1841459
2020-01-21 10:07:01 -08:00
Liam Young 721f3bc905 Fix unit test 2019-12-17 12:21:39 +00:00
Liam Young 4af37d9556 Add functions for performing OpenStack upgrades 2019-12-12 13:57:55 +00:00
Alex Kavanagh 1503751d5c Merge pull request #141 from thedac/iteration-handling
py3.7+ StopIteration handling
2019-12-11 16:50:50 +00:00
Liam Young f3ebe916f2 Add get_subordinate_units
Add zaza.openstack.utilities.juju.get_subordinate_units to get a list
of all subordinate units associated with units in unit_list.
Subordinate can be filtered by using 'charm_name' which will only
return subordinate units which have 'charm_name' in the name of the
charm.
2019-12-11 12:12:25 +00:00
David Ames 40e9c86df4 Test the condition not the implementation 2019-12-10 08:36:22 -08:00
David Ames c109abbe25 Fix unit test 2019-12-09 09:22:01 -08:00
Liam Young d2904e228d Add Swift Global Replication Tests 2019-11-29 11:47:43 +00:00
Liam Young 9c34bc42da Expose model_name option in get_keystone_session_from_relation 2019-11-25 17:40:03 +00:00
Liam Young 748915646a First set of updates to set model name explicitly 2019-11-25 10:49:50 +00:00
Frode Nordahl 8e8544bab7 Fix ovn_present for ovn-dedicated-chassis
Add missing unit test.
2019-11-02 10:31:30 +01:00
Frode Nordahl 7d1d04a742 Deduce whether DVR is enabled from neutron-api config
Add helper to detect presence of OVN in deployment
2019-11-01 06:39:17 +01:00