Commit Graph

184 Commits

Author SHA1 Message Date
Alex Kavanagh 8e06469fe4 Updates for caracal testing support
These updates, on the master branch, are to support testing the caracal
packages and support of the charms for caracal.  They do NOT lock the charms
down, and don't change the testing branches to stable branches.

Change-Id: Ieb68946379d497db3ac385513c528b852dba88cd
2024-02-24 19:53:38 +00:00
Alex Kavanagh 886fac87eb Improve platform mocking
Patch out charmhelpers.osplatform.get_platform() and
charmhelpers.core.host.lsb_release() globally in the unit tests to
insulate the unit tests from the platform that the unit tests are being
run on.

Change-Id: Ic35061597a52dda749f2e6e3f3d255f831c82a06
2023-10-24 20:12:50 +01:00
Yoshi Kadokawa 536540781a Add support of image format conversion on importing
Optinally enable conversion of images to raw format when uploading
images to Glance. Only supported when "image_conversion" is enabled in
Glance.

This is an equivalent change to the one in simplestreams:
https://git.launchpad.net/simplestreams/commit/?id=cbc0ac9

Closes-Bug: #1889729
Change-Id: Id15fab364c27242347c520b959065c490e4da6b6
2023-08-30 13:52:21 +09:00
Corey Bryant c6a07458dc Add 2023.2 Bobcat support
* sync charm-helpers to classic charms
* change openstack-origin/source default to bobcat
* add mantic to metadata series
* align testing with bobcat
* add new bobcat bundles
* add bobcat bundles to tests.yaml
* add bobcat tests to osci.yaml
* update build-on and run-on bases
* drop kinetic
* update charmcraft_channel to 2.x/stable

Change-Id: I6d6ebb956a977dcc68c20aea03f318c0257a4bb7
2023-08-02 14:20:38 -04:00
Corey Bryant 6faf284248 Enable jammy-antelope voting and drop kinetic-zed tests
* Voting was turned on for jammy-antelope in the
  project-template for charm-functional-jobs in zosci-config
* Voting for jammy-antelope bundles with non-standard names
  is turned on in individual charms
* Kinetic-zed bundles/tests are removed

Change-Id: I37c5aff2d71eae71015d1a1986fb73f64b864a94
2023-03-29 21:01:48 +00:00
Zuul 579c8f81f2 Merge "Add Antelope support" 2023-03-10 18:40:03 +00:00
Corey Bryant 36e29d6d8b Add Antelope support
* sync charm-helpers to classic charms
* change openstack-origin/source default to antelope
* align testing with antelope
* add new antelope bundles
* add antelope bundles to tests.yaml
* add antelope tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases

Change-Id: I884e0f8fa0602fb9b9ab79157619f4cd18191b79
2023-03-07 20:34:31 +00:00
Liam Young 6d8489d8cc Failed action due to locked file made more verbose
Fixes issue where a failed action due to a locked file returns an exit
status of 0 and shows a status of "complete". The failed action now
returns exit status 2, and the message is more verbose. Added actions
file to handle all actions with symbolic links to said file.

Closes-Bug: #1940965
Change-Id: Ie950efee8d1052d33274b0fe07ff81f343e9f3e6
2023-02-24 16:54:28 +04:00
Liam Young 308a4be3fc Fix charm for tox4 compatibility
Related-Bug: 2002788
Change-Id: Ieb47092784cadd4cd09b7aff959471d244704811
2023-01-16 16:12:24 +00:00
Bas de Bruijne 9304d15434 Add juju-exec for juju 3 compatibility
In juju3, juju-run is moved to juju-exec
gsss should be able to handle both

Closes-bug: #1993652
Change-Id: I980306269a68c04735811324f6b826622bc6647c
2022-12-08 15:57:24 -04:00
Corey Bryant 289671d18f Add jammy to default mirror_list config value
Change-Id: Ica89e3d81cd9e222050b38e6718056feef8d5c00
2022-10-07 12:31:48 -04:00
Guilherme Maluf Balzana 4754aca420 Add set_latest_property config to new image
When creating Openstack VMs the user has to specify the image it wants
to use. sstream-mirror-glance adds a date to the image name, so they
always have to recheck which is the current latest image.

This commit adds the `set_latest_property` configuration to include
--set-latest-property to sstream-mirror-glance command line argument.

When --set-latest-property is given sstream-mirror-glance will set the
recently synced image with the `latest=true` property and then remove
the `latest` property from all the os_version/architecture matching
images.

Configure bundles to fetch simplestreams snap from edge channel

Closes-bug: #1933130
Change-Id: Idf78294db7abb8c81d637086e8142782bf1dd36f
Func-Test-PR: https://github.com/openstack-charmers/zaza-openstack-tests/pull/853
2022-09-23 10:31:43 +02:00
Alex Kavanagh 712f73b707 Ensure that kinetic/22.10 is enabled
This patch adds kinetic to the metadata.yaml and ensures
that a run-on base for 22.10 is added in the
charmcraft.yaml

Change-Id: I29535a65b8cbae77223eb651ff935cf9fbb40f1a
2022-08-31 20:00:32 +01:00
Corey Bryant abbae65b13 Add Kinetic and Zed support
* sync charm-helpers to classic charms
* change openstack-origin/source default to zed
* align testing with zed
* add new zed bundles
* add zed bundles to tests.yaml
* add zed tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases
* add bindep.txt for py310
* sync tox.ini and requirements.txt for ruamel
* use charmcraft_channel 2.0/stable
* drop reactive plugin overrides
* move interface/layer env vars to charmcraft.yaml

Change-Id: Iff2f3d0e011b47d895136ab7376f0e7d9c3955fb
2022-08-26 18:40:34 +00:00
Alex Kavanagh ab9bf0b411 Pin tempest for different python versions
Change-Id: Ieb37203654a707f8c719d8ee44c7e052e92e9d50
2022-07-11 12:35:16 +01:00
Zuul b20e5c19bc Merge "Add bindep." 2022-07-06 09:20:08 +00:00
Felipe Reyes 35bef871ab Add bindep.
Include build dependencies for the python package `lxml`.

The file bindep.txt is managed by zuul-jobs to install deb packages
needed by the project.

Change-Id: I17411e202a5d1ee9179b1b2a8230ce595ce26b5c
2022-07-05 14:33:46 -04:00
Felipe Reyes 5687d74d61 Use yaml.safe_load()
Use safe_load() instead of load() when loading a yaml content, more
details at https://msg.pyyaml.org/load

Closes-Bug: #1979260
Change-Id: I5f96a102be8753eea240cf05e2ca304057101530
2022-07-04 10:58:47 -04:00
Nobuto Murata f8165cebb8 Support --visibility option for simplestreams
With the new option, Glance images can be uploaded with
"visibility=shared" for example instead of "public" so those can be
hidden from usual projects by default.

Closes-Bug: #1975663
Change-Id: I1955f3d2a56654c9a683a2b9d36b33c0f0fd63d4
2022-05-29 13:32:36 +09:00
James Page c749054e03 Fix compatibility with Jinja2 >= 2.10
The indentfirst parameter of the indent helper was renamed
to first at Jinja2 2.10 - update template to follow this
change.

Change-Id: I4299a72646a602720689b4f3c3075de8c21b0811
2022-05-23 14:23:13 +01:00
Alex Kavanagh 91e4aea451 Fix the trailing-slash issue on for product-streams endpoint
ceph-radosgw is now more strict and can't handle non-canonical
paths in http requests; this patch stopes that happening, and ensures
that the endpoint is set without a trailing slash.

Change-Id: I1c2de2aad2f7652906d91865e5e214b403d2a37b
2022-04-11 18:57:17 +01:00
Alex Kavanagh de4f9a6a97 Updates to enable jammy and finalise charmcraft builds
- Add 22.04 to charmcraft.yaml
- Update metadata to include jammy
- Remove impish from metadata
- Update osci.yaml to include py3.10 default job
- Modify tox.ini to remove py35,py36,py37 tox target and add py310
  target.
- ensure that the openstack-origin is yoga

func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/745
Change-Id: I118ac221202fb02fc440a21910235fbc645a54c8
2022-04-11 11:33:05 +01:00
Alex Kavanagh a8785bc2cf Update to classic charms to build using charmcraft in CI
This update is to ensure that the Zuul Canonical CI builds the charm
before functional tests and ensure that that artifact is used for the
functional tests.  This is to try to ensure that the charm that gets
landed to the charmhub is the same charm that was tested with.

Change-Id: I2b4ecddd0aa8b7dfcb3cf739a2f52ef93dc7ecf2
2022-02-17 12:30:08 -05:00
Alex Kavanagh 5288a0fcad Migrate charm to charmhub latest/edge track
Change-Id: I5653b9631b340fed318aaafcb8cee55ea3602e60
2022-01-27 20:16:43 +00:00
Hervé Beraud e80b2b6b2b Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Note that https://github.com/openstack/charms.openstack is used during tests
and he need `mock`, unfortunatelly it doesn't declare `mock` in its
requirements so it retrieve mock from other charm project (cross dependency).
So we depend on charms.openstack first and when
Ib1ed5b598a52375e29e247db9ab4786df5b6d142 will be merged then CI
will pass without errors.

Depends-On: Ib1ed5b598a52375e29e247db9ab4786df5b6d142
Change-Id: I57ef29855eefd0f8dc40cc427eb9bfc8796032e3
2021-12-15 10:22:52 +00:00
Zuul 46221b7519 Merge "Additional test updates" 2021-11-18 14:57:04 +00:00
Corey Bryant 123697e62f Additional test updates
* drop xenial metadata and function tests
* switch to release-specific zosci functional tests
* switch to yoga zosci unit test job
* add py39

Change-Id: I248d0c92e64692127e2a53a8cffc2efe56a8d790
2021-11-17 14:47:05 -05:00
Alex Kavanagh f2eac23ca2 Remove 'jammy' metadata - unblock gate
The charmstore doesn't accept charms with jammy metadata yet.

Change-Id: Ie2836e1625447658bd3e3713ad57c1822e3c8e5a
2021-11-12 11:02:29 +00:00
Corey Bryant b9bfe131d7 Add yoga bundles and release-tool syncs
* charm-helpers sync for classic charms
* pin pyparsing for aodhclient
* pin cffi for py35
* add non-voting focal-yoga bundle
* add non-voting jammy-yoga bundle
* add series metadata for jammy
* switch xena bundles to voting
* run focal-ussuri as smoke tests
* remove groovy bundles

Change-Id: Icd1043fb0841908caeba593be2dbd07597fccb8b
2021-11-09 10:27:03 -05:00
Yoshi Kadokawa bf23ef75b2 Add support for juju resources
Simplestreams package is now installed via snap. By having the juju
resources for the snap package, it can benefit in offline environment.

Closes-Bug: 1921832
Change-Id: I5f21ca9faff35427281076e142942c3458e71091
2021-10-05 06:04:44 +00:00
Alex Kavanagh 60ceb7c5a1 Add xena bundles
- add non-voting focal-xena bundle
- add non-voting impish-xena bundle
- charm-helpers sync for new charm-helpers changes
- update tox/pip.sh to ensure setuptools<50.0.0

Change-Id: Ib870520e0fe1027132024633dd429cb637dd33df
2021-09-23 10:50:27 +01:00
Billy Olsen 6733e22006 Add use-internal-endpoints as a new config option
Enable the glance-simplestreams-sync charm to be configured to only
use internal endpoints, removing the requirement that the charm
access APIs via the public network.

This introduces a new option use-internal-endpoints, which is in-line
with other openstack charms which can be configured to use the internal
endpoints rather than public endpoints.

This option will only be valid for Keystone v3 API versions, which
should not be problematic as the v2 API has been deprecated for quite
some time now.

Closes-Bug: #1896438
Change-Id: I6d83a5469c34c2add3c1bc4ac5052be6d51ed343
2021-09-02 11:03:32 -07:00
Dmitrii Shcherbakov d1f8c4ba4c Remove local apache2 install, rework use_swift
The functionality of use_swift where a local apache2 instance was set up
for metadata was deprecated for removal and this change actually removes
this. However, the option itself can still be used as an indicator
whether Swift is intended to be used for simplestreams metadata or not.
If the usage is explicitly requested, the charm but Swift endpoints are
not yet present, the charm will now will set the unit state to
maintenance in addition to local logging that was done previously.

Swift presence checking is now endpoint-based instead of being
service-based (no use for the case where endpoints are not set up while
the service is in the catalog).

The lack of swift presence is also ignored for the purposes of
generating proxy setting context - if the endpoint is not there there is
not point in trying to generate NO_PROXY rules for it.

This change also makes test bundles use ceph as a storage medium for
glance since out of space errors were encountered during testing as the
glance unit was running out of space for image storage.

Closes-Bug: #1942047
Closes-Bug: #1934563
Closes-Bug: #1938069

Change-Id: I6519b1449806ad19ee4545501bc4631c9f8e535f
2021-09-02 17:34:25 +03:00
Zuul cf1f8bf725 Merge "Dynamically generate proxy settings for image syncs" 2021-07-23 14:38:45 +00:00
Dmitrii Shcherbakov 009c8a7b92 Dynamically generate proxy settings for image syncs
sstream-mirror-glance has several endpoints it needs to talk to:

* Image mirrors - typically, public Internet endpoints;
* Keystone - typically, a directly reachable endpoint;
* Glance - typically, a directly reachable endpoint;
* Object store (Swift) - typically, a directly reachable endpoint but
  sometimes it may be deployed externally and added to the region
  catalog in Keystone (in which case it might be accessible via a proxy
  only).

While sstream-mirror-glance does not support specifying proxy settings
for individual directions, since we know all of them based on the
Keystone catalog, a list of endpoints to add to NO_PROXY environment
variable can be generated dynamically.

The complication is that image syncs are periodically done via a cron
job so a juju-run invocation is needed to retrieve relevant proxy
settings from model-config at each invocation of the synchronization
script.

Additionally, the charm is long-lived so there may be some environments
that rely on legacy proxy settings. This change accounts for that and
acts both on juju-prefixed (new) and unprefixed (legacy) proxy settings.

Whether to use proxy settings for connections to the object store API
is controlled by a charm option which the script is made to react to.
Proxy settings are ignored for object store connections by default.

Closes-Bug: #1843486
Change-Id: Ib1fc5d2eebf43d5f98bb8ee405a3799802c8b8dc
2021-07-22 21:14:03 +03:00
Aurelien Lourot 02ff4a0438 Sync release-tools
In order to fix ResolutionImpossible on tox invocation.

https://github.com/openstack-charmers/release-tools/issues/151
https://github.com/openstack-charmers/release-tools/pull/152

Change-Id: I64cde3e5338c6f47736afb9b5cfff78668c772dd
2021-07-22 14:54:17 +02:00
Alex Kavanagh 787a9c5ae9 Ensure py3 pkgs installed on series-upgrade
On series-upgrade the g-s-s stopped syncing due python packages required
by the sync file (that is run in the context of the unit, rather than
the charm) not being present.  I believe they may have been removed
during the series-upgrade when unused packages were removed.

This patch ensures that on both upgrade and series upgrade, all the
packages that are needed are installed.

Change-Id: I8dfa9b0111fa3f204364e2c0833595bf8b219a7c
Closes-Bug: #1934306
2021-07-01 15:44:40 +01:00
Zuul 45a1d02716 Merge "Add impish to metadata.yaml" 2021-06-07 09:38:37 +00:00
Zuul 7e7c63b627 Merge "c-h sync - restore proxy env vars for add-apt-repository" 2021-06-04 23:31:01 +00:00
Aurelien Lourot b475e544f7 Add impish to metadata.yaml
Change-Id: Ia66b27b90dcbab7985f7478ac647036d1fef7aa2
2021-06-03 11:12:16 +02:00
Frode Nordahl 8bd1b89b6f
Forward returncode from sync program
When performing sync from an action, the caller of the action will
be interested in knowing the result of the operation.

Move hirsute-wallaby job to experimental pipeline.

Closes-Bug: #1929668
Change-Id: I20f20f852af7d1e17c6881ab3720b6cc1c16222a
2021-05-26 20:47:29 +02:00
Corey Bryant 3997b01ce1 c-h sync - restore proxy env vars for add-apt-repository
Change-Id: Ic066d5e0c7be9ca0f17db3eb8e73ae2002a6203d
2021-05-13 08:46:33 -04:00
Alex Kavanagh 9d5de4d077 Test bundles for focal-wallaby and hirsute-wallaby
These are the test bundles (and any associated changes) for
focal-wallaby and hirsute-wallaby support.

Sync libraries.

hisute-wallaby test is disabled (moved to dev) due to [1] as bundle may
reference a reactive charm.

[1] https://github.com/juju-solutions/layer-basic/issues/194

Change-Id: I2a09dc92ae59ed43c87c3c24def1240c117482fd
2021-05-06 10:11:27 +00:00
Alex Kavanagh 7dd5035ae1 Updates to flip all libraries back to master
This patchset updates all the requirements for charms.openstack,
charm-helpers, charms.ceph, zaza and zaza-openstack-tests back
to master branch.

Change-Id: I99fbbf9010f40b77054192e5718c983449c4c71d
2021-05-03 16:04:42 +01:00
Alex Kavanagh f60ec380c8 21.04 sync - add 'hirsute' in UBUNTU_RELEASES
The 'hirsute' key in c-h/core/host_factory/ubuntu.py:
UBUNTU_RELEASES had been missed out, and is needed for
hirsute support in many of the charms.  This sync is to
add just that key.  See also [1]

Note that this sync is only for classic charms.

[1] https://github.com/juju/charm-helpers/pull/598

Change-Id: Idf0fe26c9c284054cbe6c51137c02964503c0c78
2021-04-11 16:53:15 +01:00
Alex Kavanagh a40612e033 21.04 libraries freeze for charms on master branch
* charm-helpers sync for classic charms
* build.lock file for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
  - ensure stable/21.04 branch for charms.openstack
  - ensure stable/21.04 branch for charm-helpers

Change-Id: I41cb22762cad421770ed7f9256ffa9e95d87c8f5
2021-04-03 20:24:54 +01:00
Alex Kavanagh 36873ab84a Add hirsute and remove trusty from metadata.yaml
This update adds the new hirsute Ubuntu release (21.04) and
removes trusty support (14.04 which is EOL at 21.04).

Change-Id: I6121fe56f684d7738ef19ce04275d3165e1df506
2021-03-02 20:55:41 +00:00
Zuul 020cfe2087 Merge "Add new osci.yaml" 2021-02-24 12:18:05 +00:00
Chris MacNaughton 740d80cbed Add new osci.yaml
This change is preparatory to migration Ubuntu OpenStack CI
from Jenkins to Zuul

Change-Id: I16e82e0f295a9c0f6f21e4ff343e2f1afda1d82d
2021-02-23 11:15:40 +01:00
Billy Olsen 2367d52488 Prune gate tests
Prune gate tests and move tests to dev_bundles.

Change-Id: Ia2dd54c7c9eeb18764f841166ef1e31ac9a1288d
2021-02-19 17:01:28 -07:00