Commit Graph

80 Commits

Author SHA1 Message Date
Aurelien Lourot c4eaed25f2 Migrate functional tests from Amulet to Zaza
Change-Id: Ief33e4bebff904778df18fafb77c318ec212677b
Closes-Bug: #1828424
Func-Test-PR: https://github.com/openstack-charmers/zaza-openstack-tests/pull/233
2020-04-19 17:02:22 +02:00
Hemanth Nakkina 793daaef3e Fix zuul/CI failures
Zuul check openstack-tox-py35 fails with the following error
ERROR: Package 'python-heatclient' requires a different
Python: 3.5.2 not in '>=3.6'

openstack client packages in test-requirements are only
required for func-smoke tests. Also func-smoke tests are
executed on python 2.7 environment. So the fix pins the
exact versions of openstack client packages for python 2.7.

Keystone config parameter admin-token is removed from latest
keystone charm. Remove the param from the bundle generator.

Change-Id: I657e221c43ec9807fb1886089d7068727ffb9ed9
2020-03-31 11:43:06 +05:30
Frode Nordahl ad3f230e64
tests: Remove admin_token from ks relation introspection
Change-Id: Ided7811b4e859159f9fc0b514b1a63b9b2a9deba
2020-03-16 12:08:19 +01:00
Alex Kavanagh 11483d5efb Patch basic_deploymeny.py for juju 2.7 compat
Essentially, Juju 2.7 changed the semantics of "juju run" in a way that
breaks Amulet.  Amulet is no longer supported, and this charm will have
its tests migrated to zaza in the near future.  This patch just
monkey-patches the file_contents() method of Amulet's Sentry() class so
that the memcache verify test can pass.

Change-Id: I046d9ee5fda4ca15a5824650d8aceb5d24741d94
2019-11-22 11:27:09 +00:00
Corey Bryant d565a0204b Enable functional tests for bionic-train
This patch also updates the smoke test to run bionic-train.

Change-Id: I6c063ca760a9d48f632d6cac095f4b12cd66db3c
2019-10-22 15:17:40 -04:00
Corey Bryant 81860afeca Disable nova placement API
The placement project has split from nova into its own project
in Train. This patch disables the nova placement API as of Stein
when the placement charm relatation joins, and discontinues
nova placement installation as of Train for new installs.

Change-Id: If7c37ef8936e418b5afd21d83c9322563348cbcf
Needed-By: https://review.opendev.org/#/c/687915/
Partial-Bug: 1811681
2019-10-11 20:00:38 +00:00
Chris MacNaughton 764b8027b3 Sync charm-helpers
Change-Id: I7436d0d90b90fb1b6f97259387d11d879eee3a1c
2019-07-16 07:06:03 +00:00
Rodrigo Barbieri a51efaf640 Propagate vendor_data from nova-cloud-controller
When using DVR and L3HA neutron deployment options,
Nova API Metadata requests are served from compute nodes,
instead of from neutron-gateway nodes.

This change allows nova-cloud-controller to send vendor_data
configuration values to nova-compute charm relation so it
can write to nova-compute's nova.conf appropriately.

Replaced the existing context logic with inheritance
from a new context created in charm-helpers, so the
logic can be shared across several charms that write
vendor metadata to nova.conf and vendor_data.json.

Also, small fix in the vendor-data and vendor-data-url
descriptions, where it was incorrectly stating that such
configuration would be effective in nova-cloud-controller
on Queens release.

The values set in vendor-data and vendor-data-url config
options will always be propagated to nova-compute regardless
of the OpenStack release. Those values will continue to only
be effective in nova-cloud-controller nodes on Rocky release
or later.

Included sync of charm-helpers code in order to inherit
the refactored vendor metadata contexts.

Change-Id: If8373fc6b2d04dbc29ed07896d385ac920cae3f4
Depends-On: I0c79e1bfac9fbe7009a7e862ad010cfa2de8cfda
Closes-Bug: #1777714
2019-06-05 10:22:56 -03:00
Frode Nordahl bd3d84cfcd
Enable bionic/stein and disco/stein functional tests
Drop service check for ``glance-registry``.  The service is
removed as of Stein, and it really is not this charm functional
tests job of checking this anyway.  Any such detail should
be deferred to the ``charm-glance`` functional tests.

Change-Id: I10ff155730875fbc47f77bb900e30791e9bfdef0
2019-04-10 07:21:49 +02:00
Chris MacNaughton 370e4b8380 Add security-checklist action
Change-Id: I717ddc16d29d4e45e374c98e6e0f7913c9583522
2019-03-13 10:33:15 +01:00
Frode Nordahl fe0ba3b883
Adjust default of ``ram-allocation-ratio`` configuration option
In modern hyper-converged architectures the upstream default of
1.5 does not really fit.

Set to 0.98 to give some headroom on the compute nodes and add
a note about the potential need to adjust this value further.

Change-Id: I64e3379686128dd7f222bdfae133a6c90e8f3ef0
Closes-Bug: #1818234
2019-03-01 22:56:29 +01:00
Sahid Orentino Ferdjaoui 13eca55803 service: updates nova-api-os-compute service to use apache wsgi
Due to an issue in python3 oslo_cache+eventlet when using
memcached. As workaroud for Rocky it has been decided to run service
nova-api-os-compute from systemd to apache2.

Closes-Bug: #1812672
Depends-On: https://review.openstack.org/#/c/633218
Depends-On: https://review.openstack.org/#/c/633482
Change-Id: I3bf279638c5decf1020345f3d2e876e379144997
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-02-01 16:32:28 -05:00
Syed Mohammad Adnan Karim 95cd9bfd10 Add default project quota configuration for compute
Prior to this, the charm config did not support default quota
configurations for compute (ie. instances, compute, ram, etc.).
Default quota configuration changes will not impact existing
projects with modified quotas. Only new projects and projects with
unmodified quotas will adopt the defaults in the configuration file.

The following default quota settings were added:
instances
cores
ram
metadata_items
injected_files
injected_file_content_bytes
injected_file_path_length
key_pairs
server_groups
server_group_members

The functional test added checks that nova.conf quotas are set in
the correct section of the file.

Change-Id: Iae8c84dbfec97e1879d51963125f7674ea20ba22
Closes-Bug: 1386911
2018-12-17 20:29:03 +00:00
Liam Young 630a07013f Accept lists in pci-alias charm config
Allow json lists to be passed in via the pci-alias charm config
option so that multiple aliases can be set.

Increase amulet timeout due to gate failures

Change-Id: I3b5ea70224536f8d40f9c04482fa676c2b230bdd
Partial-Bug: #1735205
2018-10-05 10:07:51 +00:00
Corey Bryant d5c5cccb0a py3: Switch to using Python 3 for rocky or later
Switch package install to Python 3 for OpenStack Rocky or later.

When upgrading, remove any python-* packages that were explicitly
installated and then autoremove --purge any dependencies that are
no longer required.

Change-Id: I87ee4a0a854f88b931093f6245a3a1057bf56c57
2018-10-04 11:19:06 +01:00
Liam Young e20db83c7d Add nova-metadata service
Add a service for handling nova metadata api services. This was
previously handled by the neutron-gateway and still is for
deployemnts up to and including Pike, For the neutron metadata
service and the nova service to communicate they need a shared
secret. To achieve this, the change includes:

* A charmhelper sync to get support for multiple wsgi vhosts
* Rendering new wsgi vhost and corresponding haproxy config.
* Setting a shared-secret down the relation with the neutron
  gateway.
* Remove fragile keystone authtoken checks as they are failing
  after a ch sync and any issues will be caught by the instance
  launch functional test.

Change-Id: I5ad15ba782cb87b6fdb3c0941a6482d201670bff
2018-10-03 07:24:05 +00:00
Liam Young 9cdf1baccd Get glance v1 client for icehouse.
Previously the image virt type was qemu and the compute node virt
type was kvm. This works for deployments prior to rocky but in
rocky this causes the image type filter to return no valid hosts.
An update to charmhelpers has removed the default behaviour of
setting the virt type to 'qemu' by default.

Due to a bug in icehouse updating glance image properties using
the v2 api fails (See Bug #1371559) so for icehouse deploys
get a v1 client.

Change-Id: I20548118092a4480f37c7ab7e9d60e72e299989b
2018-09-26 09:38:50 +00:00
Frode Nordahl 1ee5ce6b55 Sync charm helpers and enable Rocky func test
Change-Id: Id2784943aa3cd5fbaec451dde735de9574013dc1
2018-08-29 09:02:23 -05:00
Chris MacNaughton 4e7dfc3714 Remove old nova-compute / mysql relation
Change-Id: I1a90043581bc5845df19538f1fd9d307863cf22f
Closes-Bug: #1713807
2018-07-18 10:29:18 +02:00
Liam Young 21b17020d8 Remove support for nova cells v1
This change removes support for nova cells v1.

Change-Id: Id86697b6a2e893e023769ea214671e958e7166ca
2018-06-15 05:57:52 +00:00
Liam Young 1cd062efde Fix up amulet for queens
Switch to use Keystone v3 clients for Queens

Change-Id: Ic93b430fa12f9d283c507a51a58e0468b7d4a850
2018-02-27 09:01:48 +00:00
Liam Young 0a9b1a21a7 Add amulet test for pci-alias
Add an amulet test to check pci-alias setting is propagated
properly into nova.conf. This is a prerequisite for work to support
setting multiple aliases.

Depends-On: I6ac49b0a2782df2ebc8f3d1fe299dec3cc078d7c
Change-Id: Ic8d51dfb3130670cd6810ca80378d6ef8c0d0346
2018-01-15 12:52:01 +00:00
James Page 0f14eac672 Remove deploy from source support
Drop support for deployment from Git repositories, as deprecated
in the 17.02 charm release.  This feature is unmaintained and has
no known users.

Change-Id: I2fe15b648d485e5b03965a00dee6324669ebe9fa
2018-01-12 10:42:50 +00:00
Liam Young c837c1412f Update amulet tests for new s3/ec2/nova username
Keystone now orders the elements of the username when constructing
a username for multiple services. Update amulet to expect the
new username (only actually affects icehouse).

Change-Id: I6ac49b0a2782df2ebc8f3d1fe299dec3cc078d7c
Closes-Bug: #1739409
Depends-On: I0f857d7c2d5c4abf4843bc3fe1a9848164048fe2
2018-01-03 13:00:53 +00:00
James Page e8f5341034 Drop nova-cert >= newton
nova-cert was deprecated @ newton, and only supports ec2 services
which we dropped in the charms @ liberty so remove installation
and configuration of this service for >= newton.

Change-Id: I6d0ed6a1e058f38cb5d556a34b6f4299bf6d2055
2017-06-23 13:59:24 +01:00
Jorge Niedbalski 5d3c601dd4 Use interface param and fallback to endpoint_type on url_for.
Since >= liberty the url_for parameter endpoint_type was replaced by
interface d227f6d237

Change-Id: I98ebbf9f2c7582fae5f466dfc1d224bf66e38a24
Closes-Bug: #1698398
Signed-off-by: Jorge Niedbalski <jorge.niedbalski@canonical.com>
2017-06-16 11:59:56 -04:00
David Ames c009d5e18d Ocata Deprecations
Update the nova.conf template for ocata to move configuration
items to their preferred locations and removed deprecated items.

Per https://docs.openstack.org/releasenotes/nova/ocata.html#upgrade-notes

Change-Id: I008c8791be24086b393bc82851833d6962260c79
2017-05-15 16:21:08 -07:00
Jenkins b03380aab2 Merge "Enable network spaces for the memcache relation" 2017-05-04 16:49:31 +00:00
Alex Kavanagh f9b97ac66c Fix alphanumeric comparisons for openstack and ubuntu releases
- sync charmhelpers with fix-alpha helpers
- fix up code where the alpha comparisons are done
- fix tests which assumed mocks would just work on os_release()

Change-Id: I48b4853ed343bd3188c16f2bc432b4ca0badc473
Related-Bug: #1659575
2017-04-27 10:52:43 +01:00
Alex Kavanagh 3ffd566f55 Enable network spaces for the memcache relation
This enables network spaces for the memcache relation.  Essentially,
the charm tries to use the binding for the memcache, and if that doesn't
work falls back to the private address.

Change-Id: I831c4df22a698709fc0fa42ccea74f10b64a469b
2017-04-26 21:13:46 +01:00
David Ames e94f7882cb Avoid shared-db change when using access-network
When the percona-cluster charm sets an access-network but the default
unit-get address is not on that network extra shared-db relations get
executed. This is specifically a problem when running upgrades and
trying to avoid API downtime.

The root cause is that the access-network is not checked until the
SharedDBContext is consulted. But then db_joined function will
change it back to the wrong ip on subsequent runs.

This change adds a check for access-network on the relation during the
db_joined function and pushes IP selection off to get_relation_ip.

Charm helpers sync to pull in changes to get_relation_ip.

Partial-bug: #1677647
Change-Id: Ifd4e975d9abbb9f7a8b0f12c8f0a8cf8f78595b6
2017-04-25 14:32:19 -07:00
Corey Bryant 7dd8357b06 Enable SSL termination for nova-placement-api
determine_ports() was not adding the nova-placement-api port to the
ports list because it is run under the apache2 service. This fix
enables determine_ports() to get 'nova-placement-api' from the list
of services rather than 'apache2', allowing it to determine the port
that nova-placement-api uses.

Also enable tests/gate-basic-xenial-ocata in this commit.

Change-Id: I8113e911272ee671026bace9f6e0e8c4ce072e6b
2017-03-01 14:27:35 +00:00
Corey Bryant 2564cf5a5f Enable nova-placement-api
This change installs the nova-placement-api, runs it under
mod_wsgi with apache2, updates nova.conf accordingly, and
registers its endpoints.

Change-Id: I4af4afa591cf68964e6146ca0ca0c51d1ddb8a64
2017-02-09 21:30:13 +00:00
Liam Young dfd8208354 Enable Memcache service for Token Caching
With the release of 4.2.0 of keystonemiddleware using the
in-process token cache is no longer recommended. It is recommended
that a memcache backend to store tokens is used instead,

This installs and configures memcache and configures neutron-server
to use memcache for token caching.

http://docs.openstack.org/releasenotes/keystonemiddleware/mitaka.html#id2

Change-Id: I747d107d28474d545e4a3612a927d46cae34e6b6
2016-12-13 09:31:19 +00:00
Ryan Beisner 24df5f451d Update Amulet defs, series metadata and c-h sync
- Sync charm helpers if applicable.

- Fix test executable hashbags for virtualenv prep.

- Add Yakkety-Newton Amulet test definitions.

- Prep Xenial-Ocata Amulet test definitions (not yet enabled).

- Prep Zesty-Ocata Amulet test definitions (not yet enabled).

- Add Zesty charm series metadata.

- Remove Precise charm series metadata if present.

- Remove Precise Amulet test definitions if present.

Change-Id: I42776be9284b0eee2fd58b62b0269a5a3c556453
2016-11-28 14:55:42 -06:00
Ryan Beisner 2bd1f60d7c Update amulet test definitions for Newton
- Remove Precise-Icehouse Amulet test definitions if they exist.

- Add Xenial-Newton Amulet test definitions.

- Add Yakkety-Newton Amulet test definitions.

- Use the percona-cluster charm in tests instead of the mysql charm.

Change-Id: Idab48a7831008c5353eeb56da5deb49ce1305a41
2016-10-12 13:34:02 -05:00
James Page 3e0520aef7 Use bundletester for amulet test execution
Switch to using bundletester for execution of functional tests,
leveraging tox to build out test virtualenvs.

Rename amulet tests inline with gate-* and dfs-* naming standards.

Update README to refer to functional testing section of the charm
guide.

Change-Id: Id353b3a1c8a74d8b2bed7fe0490090b5273e228f
2016-07-19 10:21:50 +01:00
James Page c103450dbb Re-license charm as Apache-2.0
All contributors to this charm have agreed to the switch
from GPL v3 to Apache 2.0; switch to Apache-2.0 license
as agreed so we can move forward with official project status.

Change-Id: I20448e0370138e103a00c7fcf0f49949c82d33a9
2016-07-03 16:38:27 +00:00
Liam Young 44a5cc737c Update keystone_auth section for Mitaka
The keystone_auth section has changed for Mitaka. The Liberty format
,which is currently being used, is incompatible with keystone v3 on
Mitaka as it assumes the id of the default domain is default where
as in Mitaka it is a uuid.

The install documentation for Mitaka dictates that domain name should
be used rather than id when setting project_domain and user_domain

Change-Id: Id79a3dc10f3f08f837e6efdfb446380bb00a5891
Partial-Bug: 1571347
2016-04-17 16:59:46 +00:00
Corey Bryant 902224c44b Update config templates for Mitaka
Update api-paste.ini to align with the upstream Mitaka version.

Add nova.conf for Mitaka, dropping all EC2 config options as the
EC2 API was dropped from the nova source tree in Mitaka.

Change-Id: I341d0043d2580db2aa7974537321913dac70c3b7
2016-04-08 15:40:59 +00:00
Jenkins 25c7a5968e Merge "Add Liberty template with keystone v3 support" 2016-03-30 08:37:29 +00:00
Liam Young 0e58516b13 Add Liberty template with keystone v3 support
This change adds a template for liberty or above that works with a keystone
v3 endpoint. It also removes the Mitaka template as it duplicated the liberty
one.

Change-Id: Ic0bd24c8516b541c44dac9c8a92357050e75fcf6
Partial-Bug: 1522397
2016-03-29 08:20:24 +00:00
Liam Young bb9ef8b039 Add pause/resume actions and sync charm-helpers
Adds pause and resume unit to the charm such that the
charm stays paused during maintenance operations.

Change-Id: Ia422aa4077fbdd8cdb0353306c14f5633e2affb8
Partial-Bug: 1558642
2016-03-23 15:41:30 +00:00
Ryan Beisner e573053e59 Update amulet test for Mitaka; Refactor conf dict checks for clarity and simplicity; Remove Essex conditionals and definition. 2016-02-17 19:36:02 +00:00
James Page 8b03321b06 Drop ec2 and objectstore checks from restart tests for liberty or greater 2016-02-16 18:59:48 +00:00
James Page a33bded635 Drop tests for ec2 and objectstore on >= liberty 2016-02-12 11:57:24 +00:00
Ryan Beisner 027dc7c9e0 stop using deprecated delete helpers 2015-10-16 05:41:09 +00:00
Ryan Beisner a80619a289 wait for unit extended status message to determine when the deployment is ready for testing 2015-10-15 16:57:48 +00:00
Ryan Beisner 498f049ee0 expect nova-conductor service 2015-10-14 02:33:13 +00:00
Ryan Beisner 9360af4c41 add api check/wait 2015-10-08 13:35:50 +00:00