Commit Graph

337 Commits

Author SHA1 Message Date
Nobuto Murata c4209b3965 Allow ceph device scrape-health-metrics
Ceph has a function to collect health metrics through smartctl or nvme
command out of the box. And it relies on sudo spawned from the ceph-osd
process so it needs to be considered in the apparmor policy.

[/etc/sudoers.d/ceph-smartctl in ceph-base package]
> ## allow ceph daemons (which run as user ceph) to collect device
> ## health metrics
>
> ceph ALL=NOPASSWD: /usr/sbin/smartctl -x --json=o /dev/*
> ceph ALL=NOPASSWD: /usr/sbin/nvme * smart-log-add --json /dev/*

Also sync charmhelpers and mock platform info

Closes-Bug: #2031637
Change-Id: I981a5db0fd49eca83aa8a619f0cbd0d34a533842
2023-11-06 20:18:36 +01:00
Peter Sabaini 1bac66ee50 Remove FileStore support
Remove support for creating FileStore OSDs. Also prevent upgrade
attempts to Reef if a FileStore OSD is detected

Change-Id: I9609bc0222365cb1f4059312b466a12ef4e0397f
2023-10-06 09:03:51 +02:00
Samuel Walladge ceb8187284 Warn in status if tune-osd-memory-target invalid
This is useful, because if an invalid value is set,
the value is ignored and not overridden,
and an error logged.
So now we warn about this in the status to be more obvious to the user.

Change-Id: Idc4a7706f30cbcea8aee83a1406fa84139fe510d
2023-09-29 13:39:08 +09:30
Luciano Lo Giudice e97890043c Sync charm libraries
Change-Id: Ie6ae6fa1369db537fa606fa04df538f9a5587a0c
2023-09-12 19:23:43 -03:00
Samuel Walladge ba6186e5de Add config option for tuning osd memory target
Closes-Bug: #1934143

Depends-On: https://review.opendev.org/c/openstack/charm-ceph-mon/+/869896

Change-Id: I22dfc25c4ac2737f5d872ca2bdab3c533533dbff
2023-08-15 15:16:52 +09:30
Corey Bryant 986981c6f4 Add 2023.2 Bobcat support
* sync charm-helpers to classic charms
* change openstack-origin/source default to quincy
* 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

Change-Id: I7449eba63107b43525359fb92ae1a0ad9e648bab
2023-07-25 17:26:56 -04:00
Felipe Reyes 57d647005b Charm-helpers sync
Sync to get Antelope support.

Change-Id: I850bf37fa395949d6df9ad2c5157b75012ee8ba2
2023-03-28 09:01:40 -03:00
Peter Sabaini 22dfd2cc8f Fix pristine status
Only check configured devices instead of all system devices and don't check already processed devices when computing pristine status

Closes-Bug: #1988088
Change-Id: Ia6bf7a5b7abddb72c3ec61fd9e02daf42e94c2da
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1025
2023-03-20 20:40:53 +01:00
Samuel Walladge 97be046f9b Save the crash module auth key
Read the key set on the mon relation,
and use ceph-authtool to save it to a keyring,
for use by the crash module for crash reporting.

When this auth key is set, the crash module (enabled by default)
will update ceph-mon with a report.
It also results in a neat summary of recent crashes
that can be viewed by `ceph health detail`.
For example:

```
$ juju ssh ceph-mon/leader -- sudo ceph health detail

HEALTH_WARN 1 daemons have recently crashed
[WRN] RECENT_CRASH: 1 daemons have recently crashed
    osd.1 crashed on host node-3 at 2023-01-04T05:25:18.218628Z
```

ref. https://docs.ceph.com/en/latest/mgr/crash/

See also https://review.opendev.org/c/openstack/charm-ceph-mon/+/869138
for where the client_crash_key relation data set is implemented.

Depends-On: https://review.opendev.org/c/openstack/charm-ceph-mon/+/869138

Closes-Bug: #2000630
Change-Id: I77c84c368e6665e4988ebe9a735f000f99d0b78e
2023-01-20 15:13:13 +10:30
Corey Bryant 856dffb486 Sync charm-helpers for zed support
Change-Id: I266226c771282194f809120be0271012705cb4bd
2022-09-26 19:01:37 +00:00
Chris MacNaughton ea56c2c197 Ensure add-disk and hooks handle disks the same way
Depends-On: I2ea119f5a1b2a36ccd36df4db094f208a1db100e
Depends-On: Ie19e5318ea35c38e5d02963260b85fec0f233df6
Change-Id: Idebe45504233fb5559a3e9ddd9b2d6534cba7bb2
Closes-Bug: #1820271
2022-09-12 09:29:05 -04:00
Billy Olsen 82f576ac30 Don't bootstrap osds on mon-relation-departed hook
The charm attempts to bootstrap OSDs on both the mon-relation-changed
and the mon-relation-departed hooks. There is no logical reason that
the OSDs should be bootstrapped in the -departed hook.

Change-Id: I79a790291b0e361d2748d6bed8c989d16ad36daf
Closes-Bug: #1885195
2022-05-13 11:40:39 -07:00
Billy Olsen d4f3dd2ee6 Updates for jammy quincy and finalise charmcraft builds
- Update charmcraft.yaml for arch builds
- Remove impish-xena tests
- Update osci.yaml to include py3.10 default job
- Resync charmhelpers and charms.ceph

Change-Id: I41abace773d8926eaa00076dd83f52849c96150d
2022-04-07 16:47:55 +02:00
Luciano Lo Giudice 55720fa087 Implement the 'remove-disk' action
This new action allows users to either purge an OSD, or remove it,
opening up the possibility of recycling the previous OSD id. In
addition, this action will clean up any bcache devices that were
created in previous steps.

Change-Id: If3566031ba3f02dac0bc86938dcf9e85a66a66f0
Depends-On: Ib959e81833eb2094d02c7bdd507b1c8b7fbcd3db
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/683
2022-03-31 18:50:22 +00:00
Luciano Lo Giudice 65207967cf Enhance the 'add-disk' action for disk replacement
As part of the task to improve disk replacement, the 'add-disk' action
needs some changes. This includes:
- Creating 'bcache' devices to accelerate disk access.
- Creating caching partitions of a specified size.
- Recycling previously deactivated OSD ids.

Change-Id: Id5027f30d51c23d2be4c34f82867d65a50b35137
Depends-On: I43d0a0bc11664c37532c0117711affc93c9d1ad1
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/675
2022-02-18 12:43:46 -03:00
James Troup 73fe60b3df Spelling fixes from codespell with additional consistency cleanups.
Includes a resync of charms.ceph.

Change-Id: I281fe17acaea826b79bfa902a8d9e7a8b59482a9
2021-12-20 13:21:33 +00:00
Corey Bryant f2d704a14d 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
* charms.ceph sync

Change-Id: I4d517c40a4450ef1395dd0240513eeebc069384c
2021-11-17 13:46:25 -05:00
Alex Kavanagh fe570c72f2 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: Iaaef29dfd8e682121dc0256e5cf3d97293cf84b3
2021-09-21 14:34:05 +01:00
Robert Gildein d0d3d3edf5 Add an action to provide information about AZ
The 'get-availability-zone' action will get information about an
availability zone that will contain information about the CRUSH
structure. Specifically 'rack' and 'row'.

Closes-Bug: #1911006
Change-Id: I99ebbef5f23d6efe3c848b089c7f2b0d26ad0077
2021-09-03 09:48:24 +02:00
Zuul 3cc1cc1b11 Merge "Update get_mon_hosts to not specify mon ports" 2021-06-15 03:29:59 +00:00
Zuul 88b735c938 Merge "c-h sync - restore proxy env vars for add-apt-repository" 2021-06-04 18:27:06 +00:00
Edward Hope-Morley 362e340130 Filter luks devices from pristine checks
update-status needs to account for devices that
are used as bluestore devices where the device
is mapped to a luks dev.

Change-Id: I92e67a5d62eb50dbf5da430d03a6b7ff5485ce46
Closes-Bug: #1929417
2021-05-24 13:33:08 +01:00
Corey Bryant 18bbada288 c-h sync - restore proxy env vars for add-apt-repository
Change-Id: Ic2b610be597fb6b84e8c8bb48409a4f080447474
2021-05-13 08:45:39 -04:00
Alex Kavanagh ddaeb604e7 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: I66384babf597072499799c0b3aaff00fedbe69a0
2021-04-11 16:50:56 +01:00
Alex Kavanagh cf2948f8f0 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: I773d5f9f699af1a2ea7be543c4e58e0f7bc4433a
2021-04-09 08:42:26 -07:00
Chris MacNaughton 1af3d6f041 Update get_mon_hosts to not specify mon ports
Update get_mon_hosts to avoid specifying the port number for the
MON daemons; we use the default so this is not required, and at
Nautilus the MON daemons run both v1 and v2 messenger ports.

Specifying the port in the ceph.conf file disables the v2
messenger port which is not the desired behaviour on upgrade
or new installation.

Change-Id: I5333cc85f755771733fe09e963d5523fd93c16d2
Closes-Bug: #1917742
2021-03-16 10:38:45 +01:00
Alex Kavanagh da7953396f Hotfix charmhelpers sync for local_address() fix
The network-get --primary-address juju-info fails on pre-2.8.?
versions of juju.  This results in a NoNetworkBinding error.
Fallback to unit_get() if that occurs for local_address().

Change-Id: I3a7d4e5093f15a1fb32310522229d0b4ebd61c59
2021-01-20 12:20:25 +00:00
Alex Kavanagh 22a8db4a2c 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: Ie6146da90c4adc38e817e644e1328ad6c41d678f
2021-01-19 12:22:08 +00:00
Zuul ee866012d7 Merge "Add `osds` argument to the osd-in/osd-out action" 2021-01-15 20:12:07 +00:00
Robert Gildein e928f1376c Add `osds` argument to the osd-in/osd-out action
The `osds` parameter has been copied from function start/stop to preserve
the same functionality. By default, osd-in/osd-out needs list of IDs as
an argument or it will not do anything (previously, it applied the change
to all the osds). It's possible to take in/out *all* with provided `osds`
parameter as `all`.

Closes-Bug: #1910150
Change-Id: I0275f015e2d0bbbb661d2b7dea59c320ba6c021c
2021-01-15 15:13:29 +01:00
Alex Kavanagh 73a95c0887 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: Iffb92ef062f307bc9b2b27e217431b2fc122acfc
2021-01-12 15:28:53 +00:00
Zuul 857f3296c2 Merge "Sync charm-helpers to pick up the commit: 09208c2a2c" 2020-12-03 09:45:11 +00:00
Ponnuvel Palaniyappan f749de225d Sync charm-helpers to pick up the commit:
09208c2a2c

Change-Id: I4ced679e814c3b58595a9bc123ce0d402b1c1811
Signed-off-by: Ponnuvel Palaniyappan <ponnuvel.palaniyappan@canonical.com>
2020-11-12 14:12:11 +00:00
Aurelien Lourot 27d035f89b Add Groovy to the test gate
Change-Id: I273eeb41f9750ddb32ae1ca5933278ac8af5c4b7
2020-11-05 12:44:12 +01:00
Chris MacNaughton 66ad67103c Batch update to land Ubuntu Groovy support into the charms
Cherry-Pick from 09752a1527

Change-Id: I19962a89fd54de38d66203c210b4cd9236bf9a19
2020-10-12 11:21:10 +02:00
Alex Kavanagh 1adefd359b Sync libraries & common files prior to freeze
* charm-helpers sync for classic charms
* charms.ceph sync for ceph charms
* rebuild for reactive charms
* sync tox.ini files as needed
* sync requirements.txt files to sync to standard

Required additional fix:

* Also sync section-ceph-bluestore-compression template

Change-Id: I621c3a0e4e3594808b4c6ec298ed79aada44bae0
2020-09-28 18:48:15 +01:00
Alex Kavanagh f001f5c3d7 Ensure that assess-status hook doesn't error due to vault
The assess-status hook can error out if the vault unit is offline whilst
it is verifying the relation.  This patchset ensures that it simply logs
the error and puts up a warning saying it can't verify the relation.
The state will 'fix itself' when vault comes back online.

Change-Id: I9cb50be5d9d317c48ec3e3ae3ea8fed0687832dd
2020-09-11 17:11:24 +01:00
Frode Nordahl b49468fc10
Add BlueStore Compression support
Sync in updates from charm-helpers and charms.ceph.

Depends-On: I153c22efb952fc38c5e3d36eed5d85c953e695f7
Depends-On: Ibec4e3221387199adbc1a920e130975d7b25343c
Change-Id: I028440002cdd36be13aaee4a0f50c6a0bca7abda
2020-08-26 16:30:24 +02:00
Frode Nordahl 0ca99c2fc3
Unpin flake8, fix lint
Change-Id: I7f47c1dac0761101980ebba3f9aab8732cb0d1ce
2020-08-26 16:29:47 +02:00
Alex Kavanagh e350ff6144 Release sync for 20.08
- Classic charms: sync charm-helpers.
- Classic ceph based charms:  also sync charms.ceph
- Reactive charms: trigger a rebuild
- sync tox.ini
- sync requirements.txt and test-requirements.txt

Change-Id: If07335447789d1521e1cd745bffff90e4900c7c1
2020-07-27 20:49:54 +01:00
Zuul 300b1bb029 Merge "Warning description for autotune config." 2020-07-17 16:18:03 +00:00
Corey Bryant 189e0c2b98 Sync charm-helpers for Victoria/Groovy updates
This sync picks up the release and version details for Victoria/Groovy.

Change-Id: I459b37cb22ac00d8d4fd9983d9a995b475a0207d
2020-07-13 18:59:17 +00:00
Liam Young ad656e515d Provides unit_name to secrets provider
Pass the unit name to the secrets provider via relation data. The
unit name is not available in CMRs so needs to be passes this way.

Change-Id: I9fa162bbf45144d0827c669fc9b37d7b336366cd
2020-07-11 08:44:17 +00:00
Brett Milford 08d56bb040 Warning description for autotune config.
Change-Id: Ieaccc18a39d018d120ae8bd6ee62b97f30d90e41
Partial-Bug: #1798794
2020-07-10 08:15:03 +10:00
Zuul 96a63879f5 Merge "Updates for 20.08 cycle start for groovy and libs" 2020-06-08 08:18:16 +00:00
Alex Kavanagh 8b0b24d6c6 Updates for 20.08 cycle start for groovy and libs
- Adds groovy to the series in the metadata
- Classic charms: sync charm-helpers.
- Classic ceph based charms:  also sync charms.ceph
- Reactive charms: trigger a rebuild

Change-Id: I56a59d0c4e72a35b7c4ac5d989e0d005fae20946
2020-06-02 14:28:22 +01:00
James Page 21ffd9d18b Ensure bootstrapped OSD presented to ceph-mon
On charm upgrade ensure that the number of bootstrapped OSD's
is presented to the ceph-mon application.

This ensures that the ceph-mon application does not switch
into a 'waiting' state after upgrade from earlier versions
of the ceph-* charms.

Change-Id: If1425ef837a74212f002985f648ac1ecf9257201
Closes-Bug: 1861996
2020-06-01 10:41:04 +01:00
Aurelien Lourot c64f4eb36a Sync helpers for 20.05
Change-Id: Ibebef746614a9de92c4e3c9ca109f313562784fc
2020-05-18 14:39:04 +02:00
Aurelien Lourot 62a6258148 Pre-freeze 'make *-sync'
Change-Id: Ia4f7043fc7281cea841baf81daded1273c4158f3
2020-05-06 13:28:29 +02:00
Liam Young 3e795f6a62 Apply OSD settings from mons.
Apply OSD settings requested by the mons via the juju relation.
Add the OSD settings to config too. Before applying the settings
config-flags is checked to ensure there is no overlap.

Change-Id: Id69222217a1c99d0269831913abdf488791cb572
2020-05-04 08:23:00 +00:00