96 Commits

Author SHA1 Message Date
Edward Hope-Morley
e3502b2c9c Add ovn cert nrpe check
Certs are root readable so we use a cron job to perform
the check and save state for an nrpe check to read and
send back to nagios.

Closes-Bug: #1979539
Change-Id: I7c7cd238ddf3fd9f92bfa5879d19d78c091cf2ac
2023-08-23 13:03:17 +01:00
Martin Kalcok
db9216084f Don't mask OVN service during charm upgrade.
Closes-Bug: #2007847
Change-Id: Icdd8502fa4c176ffc8cc8a0446dd150048d78dd1
2023-07-19 08:51:27 +02:00
Corey Bryant
11408f28f6 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: If284bc3f7b3d55ba8a2b8849887a5a5c8ea5b68b
2023-03-29 21:01:50 +00:00
Corey Bryant
ebbaf4ff84 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: I0f668ccbd04927a98cfdb4065db41b8922d9c0a6
2023-03-21 00:04:17 +00:00
Frode Nordahl
bbb1584893 tox.ini: Fixup
Remove pins.

Properly format passenv list.

Drop the outer tox.ini func-target hack.

Drop the incepted tox in src/test-requirements.txt.

Drop pip.sh script.

Fix undeterministic check in test_configure_deferred_restarts

The test checks output of a class property that provides a list
in undetermined order.

Mocking class properties is non-trivial so let's just sort the
result and expected list.

Closes-Bug: #2001893
Change-Id: I25dec5d1853a5aeb686df353d7c661f4a6eb5b69
2023-01-05 10:48:04 +01:00
Zuul
16e3b745b9 Merge "Implementation of ovn-central downscaling." 2022-11-28 11:11:44 +00:00
Dmitrii Shcherbakov
a94b51c43d Enable strict confinement for the OVN exporter
Now that the use of system-files interface has been approved and the
prometheus-ovn-exporter snap with the relevant plugs has been released
to the store, devmode usage can be disabled and additional connections
can be made.

Change-Id: Ie90719e564f0e7b5b2b209c724267057e5538af9
2022-10-22 16:03:32 +02:00
Martin Kalcok
34a82bc763 Implementation of ovn-central downscaling.
This change includes:
* attempt to leave cluster gracefully when removing unit
* cluster-status action that shows status of SB and NB clusters
* cluster-kick action that allows user to remove cluster members

Associated spec: https://opendev.org/openstack/charm-specs/src/branch/master/specs/yoga/approved/ovn-central-downscaling.rst

Closes-Bug: #1948680
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/933
Change-Id: I40ae08669d00b3b1fa567a45db2ce51425e6d1cb
2022-10-21 14:33:59 +02:00
Dmitrii Shcherbakov
822f0d5844 Connect ovn-exporter snap interfaces
https://forum.snapcraft.io/t/allow-use-of-system-files-interface-and-auto-connection-for-prometheus-ovs-exporter-and-prometheus-ovn-exporter/32179

Therefore, we do it in the charm using the infrastructure present in the
snap layer.

The system-files entries in layer-yaml are commented out pending a
review by policy-reviewers at forum.snapcraft.io.

Change-Id: I42a640f6d73c68d2b02dbad8397c8f2a55ca44f0
Signed-off-by: Dmitrii Shcherbakov <dmitrii.shcherbakov@canonical.com>
2022-10-20 23:50:42 +02:00
Dmitrii Shcherbakov
28d3bc6492 Add prometheus-scrape interface
* Add prometheus-scrape interface

* Install the prometheus-ovn-exporter snap if the relevant option is
  set appropriately (to a valid channel rather than an empty string);
* Provide the endpoint details to the prometheus-k8s-operator
  scrape_interface compatible relation (app and unit data);
* Remove the snap or ignore steps to install it if the option is set to
  an empty string;
* Clear the relation data for individual jobs if the snap is removed.

Change-Id: Ic50ed032f91de36528cb0a93bfd9d52c9bee6e63
2022-10-17 14:00:29 +03:00
Frode Nordahl
565c1425c7
Fix description of ovn-source configuration option
The current description erronously refers to 'focal-ovn-22.03' as
a valid value, while the correct value is 'cloud:focal-ovn-22.03'.

Closes-Bug: #1992592
Change-Id: Ia391dac80787ed5f271274abccca2c19b6d845c4
2022-10-13 07:02:22 +02:00
Frode Nordahl
e8a319a587
Use charmcraft reactive plugin for build
Charmcraft 2.1 provides the required functionality to build the
charm using the reactive plugin.

Add missing `kinetic` series in src/metadata.yaml.

Drop the `build-rective` target, old charm-tools environment
variables and redundant pins in tox.ini.

Fixup the bases configuration and make associated changes to test
bundles.

Change-Id: I46c9b035408d13474ddbf375434a6ec190653c22
2022-10-11 18:46:02 +02:00
Frode Nordahl
8f521963c9
Perform rolling upgrade of payload
Make use of the coordinator layer to ensure payload upgrades
happen at one unit at a time, starting with the charm leader.

Closes-Bug: #1902562
Change-Id: I6abc20651ba6f81172b0193d22fdde23e6d38ed0
2022-10-02 08:47:40 +02:00
Frode Nordahl
cd74dadf2a
Fix issues with charm and payload upgrade
Commit f049e91ea95 added support for using the UCA
focal-ovn-22.03 pocket by default for new deployments on Focal.

Unfortunately the change missed some required changes for this to
work end to end.

Ensure charm works on Focal without any UCA pocket with the
`openstack-release` package already installed.  The behavior
of `charms.openstack` is quite different dependning on whether
that information is available or not.

Ensure charm is able to detect availability of and to perform
payload upgrade on change of source.

Ensure charm does not attempt payload upgrade on charm upgrade.
When upgrading from a charm that does not have the `ovn-source`
configuration option, the reactive automatic flag
`config.changed.ovn-source` will fire even though it has not
changed.  Clear the flag in upgrade-charm hook.

Closes-Bug: #1991319
Change-Id: Ib7760bd6fc659ec8f2be65f1e00cac860f6943e6
2022-10-02 08:47:34 +02:00
Frode Nordahl
f049e91ea9
Default to OVN 22.03 for fresh deployments on Focal
Add `ovn-source` configuration option which should be used in
addition to the `source` configuration option.

The default of the `ovn-source` configuration option is
determined at runtime based on whether the end user has provided
config, whether its a fresh or upgraded charm deployment and which
series it is deployed on.

Change-Id: I54f2339a16bd958c29f877394209039f345e106e
2022-09-23 11:30:44 +02:00
Frode Nordahl
a809588086
Use native Raft storage for Vault in gate bundles
Change-Id: I80168dac29727937ae0cc606935fc071634612c1
2022-09-22 17:29:54 +02:00
Corey Bryant
55e337c5ca 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
* pin zipp to a version that does not require setuptools>=42 since this
  is causing an issue when the install hook runs at the deployment time.

Change-Id: I2cb698f719106e54b06009f24ea47259419e9cad
2022-09-21 16:49:58 +00:00
Frode Nordahl
5d5d089cd4
Drop configure_tls northd workaround
The ovn-northd daemon has gained support for runtime reload of
certificate data [0] and is now on par with the other OVS/OVN
daemons.

Remove the workaround from the charm.

0: https://github.com/ovn-org/ovn/commit/8de4f8005f210
Closes-Bug: #1895303
Change-Id: I7f45b36e03b985ba2d170ead391615f9ef9dad8e
2022-07-08 15:48:42 +02:00
James Page
16f821dd72
Updates for jammy/22.03 enablement
- charmcraft: build-on 20.04 -> run-on 20.04/22.04 [*archs]
- Refresh tox targets
- Drop impish bundles and OSCI testing
- Add jammy metadata
- Set default source config and update bundles to confirm it
  works.

Drop NRPE from Jammy bundles as the charm is not updated to
support Python 3.10 yet.

Func-Test-Pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/742
Change-Id: If83897aa488a415ab2e3ae85190ef06cbbe17dc9
2022-04-06 15:40:55 +02:00
Alex Kavanagh
f041fa5c83 Remove the charm artifact from the repository
Change-Id: Ifd060797d4a26aed1c4fde30c81cb4441d53ad6d
2022-03-16 11:19:10 +00:00
Frode Nordahl
d653b58bcd
Fix use of `openstack-release` to determine codename
Rebuild to get fix from charms.openstack.

Depends-On: I8ed6e2dfc7ce83c2e56fd072458e2ef189968e41
Change-Id: Ie302de8f0530bc0fc6b44e7411a065b49a697024
2022-02-24 08:04:17 +01:00
Alex Kavanagh
3d3fa8fa05 Update to build using charmcraft
Due to a build problem with the reactive plugin, this change falls back
on overriding the steps and doing a manual build, but it also ensures
the CI system builds the charm using charmcraft.  Changes:

- add a build-requirements.txt
- modify charmcraft.yaml
- modify osci.yaml
    -> indicate build with charmcraft
- modify tox.ini
    -> tox -e build does charmcraft build/rename
    -> tox -e build-reactive does the reactive build
- modify bundles to use the <charm>.charm artifact in tests.
  and fix deprecation warning re: prefix
- tox inception to enable tox -e func-test in the CI

Change-Id: I9b41911cdc3f8e6c327d68df50007b5223aaed34
Co-authored-by: Aurelien Lourot <aurelien.lourot@canonical.com>
2022-02-15 14:51:59 +00:00
Frode Nordahl
49e1297da5
Do not execute certificate handlers in update-status hook
The certificate handler code does a bit of work and should not
run during the update-status hook.

Rebuild to pull in fix merged in layer-openstack.

Depends-On: I4a3aa544f98049c83db576f95de826038e8e1afc
Closes-Bug: #1954748
Change-Id: I2ee39f7a0dcd1f4a37051d8dc08e383522387f1f
2021-12-14 12:19:39 +01:00
Corey Bryant
9cd1cad8be Add WallabyOVNChassisCharm class
This aligns with the following charm-layer-ovn change:
https://github.com/openstack-charmers/charm-layer-ovn/pull/54

Depends-On: https://review.opendev.org/c/x/charm-ovn-central/+/816052
Closes-Bug: #1951462
Change-Id: I65e0e24ffe6758fae33c77d32a12906e2e03fe84
2021-11-19 14:21:19 -05:00
Corey Bryant
ce4110926f Add yoga bundles and release-tool syncs
* charm-helpers sync for classic charms
* sync from release-tools
* switch to release-specific zosci functional tests
* run focal-ussuri as smoke tests
* remove trusty, xenial, and groovy metadata/tests
* drop py35 and add py39

Change-Id: Icf8351b1ecea0ae879d101e2fce7083b52e19da7
2021-11-19 14:20:35 -05:00
Alex Kavanagh
b85469899d Add xena bundles
- add non-voting focal-xena bundle
- add non-voting impish-xena bundle
- rebuild to pick up charm-helpers changes
- update tox/pip.sh to ensure setuptools<50.0.0

Change-Id: I81014a39c9642eaf68a6029cbc39d69a86721e51
2021-09-29 09:30:58 +00:00
Zuul
1cff09761e Merge "Mention deferred service events in README" 2021-08-03 13:30:45 +00:00
Aurelien Lourot
8c7621ae5c 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: I7babf45a06bd2035313242d7f313cf064bd855fa
2021-07-22 14:59:51 +02:00
Peter Matulis
5736c676b8 Mention deferred service events in README
This is a boilerplate section that will eventually
be added to the README for every charm that supports
the deferred restart feature.

Change-Id: I1e53e2d47e81cbcfc80e8f5200f65481e6004769
2021-07-09 13:52:08 -04:00
Zuul
8e305de633 Merge "Add impish to metadata.yaml" 2021-06-07 08:03:07 +00:00
Zuul
4167a67c4a Merge "rebuild - restore c-h proxy env vars for add-apt-repository" 2021-06-04 23:42:29 +00:00
Aurelien Lourot
0c0e3e853b Add impish to metadata.yaml
Change-Id: I83f0276726b73f91485f2ec6df51e4689d212ae1
2021-06-03 11:23:49 +02:00
Alex Kavanagh
3b82240894 Test bundles for focal-wallaby and hirsute-wallaby
These are the test bundles (and any associated changes) for
focal-wallaby and hirsute-wallaby support.

Add missing charm-build job.

Change-Id: I01017a66cd1a20d5e8e680ab3d812a55e39260c4
2021-05-20 18:30:29 +02:00
Corey Bryant
115d58665b rebuild - restore c-h proxy env vars for add-apt-repository
Change-Id: Ife1d3ae03467b23272633d284c1b1a052124b738
2021-05-13 09:12:40 -04:00
Alex Kavanagh
1d00acd6fd 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: Ie3f9294a3d181f96e6841eaac767e1779a8dca78
2021-05-03 16:10:03 +01:00
Liam Young
7f11b1f857 Ensure OVN DB services are restarted
When the OVN packages are upgraded they restart the ovn-central
and the ovn north and south DB services. However, the restart
of ovn-central after the upgrade does not trigger the DB
services to be restarted. To fix this ensure that when the action
is run to restart services the DB services are done too.

Closes-Bug: 1924750
Change-Id: Ic058a10f9534d35d6402b66f7e1d88a90c772f1f
2021-04-16 14:43:53 +00:00
Zuul
48d13ad357 Merge "Implementation of deferred restarts" 2021-04-14 18:25:10 +00:00
Liam Young
da530f0e79 Implementation of deferred restarts
Add deferred restart actions and config.

Change-Id: I74274ab33781ae3a980efb8cfae7ff0cb922f69d
2021-04-14 10:24:43 +00:00
Alex Kavanagh
9bddf6d784 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: Ib8720493e67c5395416b3af5a920711745c049a2
2021-04-08 13:55:24 +00:00
Alex Kavanagh
c7b188ae4c 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: Ia0120000edf459b794e6f6f576de507d67111bbe
2021-03-02 21:03:12 +00:00
Zuul
fa656c5142 Merge "Add new osci.yaml" 2021-02-26 20:58:41 +00:00
Chris MacNaughton
65d8e690dc Add new osci.yaml
This change is preparatory to migration Ubuntu OpenStack CI
from Jenkins to Zuul

Change-Id: I996496c12e189257a27fdb39dd094ccb0a6df929
2021-02-18 08:38:19 +01:00
Alex Kavanagh
1050257bdb Updates to pin charm-tools to 2.8.3
* Update requirements.txt to pin charm-tools to 2.8.3
* Update tox.ini to change the build parameters.
* This upgrades from <2.7 which adds reproducible charms
* Bug was fixed that controlled the default output directory
  doesn't get 'builds' appended.  The tox change puts it
  back so that stable & master both build to the same
  directory.  This may be reviewed in the future.

Change-Id: Ic9070ad185650647d23978d17d811579d388fca5
2021-02-17 12:17:09 +00:00
Alex Kavanagh
cff23efd5a Rebuild to use charm-tools pre 2.8 release
Reverting to an earlier version of charm-tools to
resolve some building issues seen with latest 2.8.2
version.

Change-Id: Ia016386d30afdc1af67162fbf87fc4c9fb574884
2021-02-02 17:12:36 +00:00
David Ames
36d0fd1b2a Rebuild with udpated charm-tools 2.8.2
Validate the newest version of charm-tools: 2.8.2
https://github.com/juju/charm-tools/pull/598

Change-Id: I14fcb3ebde29ec7fd324efd5271b230a1730eb48
2021-02-01 14:12:00 -08:00
Alex Kavanagh
d5b0f9bfa8 Updates for testing period for 20.01 release
Includes updates to charmhelpers/charms.openstack for cert_utils
and unit-get for the install hook error on Juju 2.9

* charm-helpers sync for classic charms
* rebuild for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
  - ensure master branch for charms.openstack
  - ensure master branch for charm-helpers

Change-Id: I881ff2c3b570b8c273ba18de74812225ec2fac67
2021-01-15 16:04:18 +00:00
Alex Kavanagh
d1604581e9 Updates for testing period for 20.01 release
* charm-helpers sync for classic charms
* rebuild for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
  - ensure master branch for charms.openstack
  - ensure master branch for charm-helpers

Change-Id: I831f67cd799ef76830794d09c6153246996b2404
2021-01-12 15:42:24 +00:00
Zuul
a0cba039f7 Merge "Do not render cluster remote address on charm leader" 2020-12-17 13:42:33 +00:00
Aurelien Lourot
3cf41bb387 Sync release-tools
Sync release-tools boilerplate containing these changes
in order to pin pip < 20.3:
https://github.com/openstack-charmers/release-tools/pull/125
https://github.com/openstack-charmers/release-tools/pull/126

Change-Id: I263d04ada0ca1eb1f4735fb62326548cd1aa97d7
2020-12-11 14:02:26 +01:00
Frode Nordahl
0d52902d37
Do not render cluster remote address on charm leader
The `ovn-ctl` script uses the combination of presence of
`--db-*-cluster-local-addr` and non-presence of
`--db-*-cluster-remote-addr` to decide when to do certain actions. [0]

Update the charm to not render the `--db-*-cluster-remote-addr`
argument on the charm leader.

Note that once the clustered database file has been created and
peers have joined the OVSDB server processes uses the contents
of the database file to connect to their peers and not the
information provided as arguments to the `ovn-ctl` script.

0: 67e2f386cc

Change-Id: I88b4aba31c8c05dba6f3f4ade5a8951613483d64
Closes-Bug: #1907081
2020-12-07 12:48:27 +01:00