Remove support for creating FileStore OSDs. Also prevent upgrade
attempts to Reef if a FileStore OSD is detected
Change-Id: I9609bc0222365cb1f4059312b466a12ef4e0397f
The `ceph osd purge` command used for the remove-disk action can take
several minutes to run. Increase the timeout for this to avoid
spurious errors.
Change-Id: I3a7fafa42c4a2ecaf45ba476e0157937e468ca33
This patchset modifies the add-disk action so that it now
can optionally start a Crimson OSD daemon.
Change-Id: I59bf4e41f1f56c6bda2352b5613289ff73113342
Depends-On: If58bde4d5445ed5de420abc007db6bf8b8e43269
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
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
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
If the disk being zapped is used by lvm (if it contains the
lvm label and hasn't been pvremove'd) it's safer to simply
bail out of zapping it than attempt teardown through a force
pvremove, because the disk being zapped might be in fact in
use by some LV.
Closes-Bug: 1858519
Change-Id: I111475c5a4584a3e367c604ab51ce2ef3789ff7f
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
- if the device does not exists, the action failed with message:
'/dev/<device>: Device does not exists.'
Closes-Bug: #1885336
Change-Id: I417c0074fe64c2afceecdfb09b8673930087f65f
The new python3-ceph-common deb package (introduced in ceph octopus)
adds a new ceph directory (a parent package in python terms) in
/usr/lib/python3/dist-packages/ceph/. This results in a conflict with
charm-ceph-osd/lib/ceph/. For example, with the current import of
ceph.utils in hooks/ceph_hooks.py, Python finds no utils.py in
/usr/lib/python3/dist-packages/ceph/ and then stops searching.
Therefore, rename lib/ceph to lib/charms_ceph to avoid the conflict.
Depends-On: https://review.opendev.org/#/c/709226
Change-Id: I13ae7c048d8f1eef2ea64b13ae14b51dbfaaf3cd
When we add/zap disks it may change the overall osd
count so need to ensure this is kept up-to-date.
Change-Id: Ib55547f88316e80a8948ce808ea992c1402458f5
Closes-Bug: #1861293
The actions pause and resume actually take all osds on a unit out of the
cluster. This is incredibly misleading.
This change renames to osd-out and osd-in to better describe what the
actions actually do.
Change-Id: I76793999f5d3382563eff308a5d7c4db18d065a0
Closes-Bug: #1793507
Similar to how osdize in charms.ceph checks for already processed
devices we need to avoid checking if they are pristine or not.
Additionally, mapped LUKS devices need to be filtered from being zapped
as they may hold valuable data. They are only used as underlying devices
for device mapper and dmcrypt to provide a decrypted block device
abstration so if they really need to be zapped a mapping needs to be
removed first.
This change also pulls charms.ceph modifications.
Change-Id: I96b3d40b3f9e56681be142377e454b15f9e22be3
Co-Authored-By: Dmitrii Shcherbakov <dmitrii.shcherbakov@canonical.com>
Co-Authored-By: Chris Procter <chris.procter@canonical.com>
Closes-Bug: 1781453
Recent changes to support vault for key management require that
the 'osd-encrypt-keymanager' is passed to all osdize calls so
that the correct key management approach is taken.
Ensure that the add-disk action does the same, otherwise keys
will always be stored in the ceph mon KV store, rather than
in Vault.
Closes-Bug: 1780920
Change-Id: I8c722d38d68f13dc00c7444a50d67ce37fbd6a29
Add `non-pristine` key to `list-disks` action.
No longer attempt to do initializtion of `osd-journal` devices.
Make py27 test noop
Flip pep8 test to py3
Partial-Bug: #1698154
Change-Id: I0ca574fa7f0683b4e8a693b9f62fbf6b39689789
Depends-On: I90a866aa138d18e4242783c42d4c7c587f696d7d
This action includes configuration for disk(s) to
zap, as well as an additional required flag for
the administrator to acknowledge pending data loss
Change-Id: I3106e2f10cf132a628aad025f73161b04215598e
Related-Bug: #1698154
Do not reformat devices. A subsequent change will be necessary
to account for conditions where a reformat is still desired,
such as a set of blocking states and user-driven actions.
Partial-bug: #1698154
Depends-On: I90a866aa138d18e4242783c42d4c7c587f696d7d
Change-Id: I3a41ab38e7a1679cf4f5380a7cc56556da3aaf2b
At present this action does not work. While looking to repair the
functionality I found a number of issues with the current
implementation.
For now I suggest we remove this functionality, and at some point we may
consider replacing it with a `remove-disk` action.
Sync in relevant changes from charms.ceph
Depends-On: Id61b87927c43d807aacc93cf05ec8f88d91b7a39
Change-Id: Ic71d304ff65a05ab7249f4dd07adc45429a323e9
* Synced version of charm-helpers
* Synced version of charms.ceph to bring in Py3 compatible library
methods.
Change-Id: I5ac45740f48a71d9cb0c5943472fc8590a723514
The blacklist actions allow for adding and removing devices
to a unit-local list of devices to be skipped during osd
initialization. This list will be used to override the
application level, and thereby deployment wide, 'osd-devices'
configuration option on a individual unit basis.
The pre-existing list-disk action is extended to return
list of blacklisted devices under the 'blacklist' key.
Change-Id: I28a3c5d6076fb496dead3fe3387d9bbbbe9ec083
Closes-Bug: #1730267
Essentially, we want to avoid doing:
from module import f1, f2, f2
and instead doL
import module
module.f1()
This helps with reading the code and understanding where the functions
come from.
Change-Id: I1bc06441dc5595e8a0c84a5b5c3db5d88b68a4f2
Add highly experimental support for bluestore storage format for
OSD devices; this is disabled by default and should only be enabled
in deployments where loss of data does not present a problem!
Change-Id: I21beff9ce535f1b5c16d7f6f51c35126cc7da43e
Depends-On: I36f7aa9d7b96ec5c9eaa7a3a970593f9ca14cb34
The replace_osd action fails to run because the ceph import cannot
be resolved without the lib folder existing in the system path.
Change-Id: If85a3ac7edbb22abf11cff5429e6820322ded898
Closes-Bug: #1696958
This change skips over any devices which does not start with a leading
folder separator ('/'). Allowing such entries causes an OSD to be
created out of the charm directory. This can be caused by something as
innocuous as 2 spaces between devices. The result is that the root
device is also running an OSD, which is undesirable.
Change-Id: I0b5530dc4ec4306a9efedb090e583fb4e2089749
Closes-Bug: 1652175
This action is fairly simple in that it returns
a list of unmounted disks
This also includes a git-sync to pull in charms.ceph
changes.
Change-Id: I0daa514958799cf5899375335e8e9e684df27704
Closes-Bug: 1645481
This includes a resync of charms_ceph to raise the directory one level
The charms_ceph change that we're syncing in changes the
name of the ceph.py file into the __init__.py file to remove the
second level of namespacing
Change-Id: I4eabbd313de2e9420667dc4acca177b2dbbf9581
This change moves our ceph.py into
a seperate repository that we can share between various
ceph related Juju projects, along with a Makefile
change to use a new git_sync file to partially sync
a git repository into a specified path
Change-Id: Iaf3ea38b6e5268c517d53b36105b70f23de891bb
The pause and resume actions shell out to the ceph command to run
OSD operations (in/out).
Because the default cephx key given out by the monitor cluster does
not contain the correct permissions, these commands fail.
Use the osd-upgrade user which has the correct permissions.
Closes-Bug: 1602826
Depends-On: I6af43b61149c6eeeeb5c77950701194beda2da71
Change-Id: Ie31bc9048972dbb0986ac8deb5b821a4db5d585f
All contributions to this charm where made under Canonical
copyright; switch to Apache-2.0 license as agreed so we
can move forward with official project status.
In order to make this change, this commit also drops the
inclusion of upstart configurations for very early versions
of Ceph (argonaut), as they are no longer required.
Change-Id: I9609dd79855b545a2c5adc12b7ac573c6f246d48
This changeset provides pause and resume actions to the ceph charm.
The pause action issues a 'ceph osd out <local_id>' for each of the
ceph osd ids that are on the unit. The action does not stop the
ceph osd processes.
Note that if the pause-health action is NOT used on the ceph-mon
charm then the cluster will start trying to rebalance the PGs accross
the remaining OSDs. If the cluster might reach its 'full ratio' then
this will be a breaking action. The charm does NOT check for this
eventuality.
The resume action issues a 'ceph osd in <local_id>' for each of the
local ceph osd process on the unit.
The charm 'remembers' that a pause action was issued, and if
successful, it shows a 'maintenance' workload status as a reminder.
Change-Id: I9f53c9c6c4bb737670ffcd542acec0b320cc7f6a
This patch adds an action to replace a hard drive for an particular
osd server. The user executing the action will give the OSD number
and also the device name of the replacement drive. The rest is
taken care of by the action. The action will attempt to go through
all the osd removal steps for the failed drive. It will force
unmount the drive and if that fails it will lazy unmount the drive.
This force and then lazy pattern comes from experience with dead
hard drives not behaving nicely with umount.
Change-Id: I914cd484280ac3f9b9f1fad8b35ee53e92438a0a