Commit Graph

54 Commits

Author SHA1 Message Date
James Page 536c22a6a2 Retire project
Leave README around for those that follow.

Change-Id: I34f8092296c70cd1b51de7c48d7ee589f410d55d
2018-09-14 11:53:08 -06:00
James Page 0a298a732d migration: Superceed use of 'ceph mon rm'
Use the remove command (instead of rm) which is supported in
Ceph firefly or later (which covers all current deployment targets).

This resolves an issue with the ceph -> ceph-mon/ceph-osd migration
process for Luminous based deployments.

Change-Id: I127930e7c4b80465796b8270a9966b08f7c03037
Closes-Bug: 1729370
2017-11-02 09:13:57 +00:00
Zuul 8500fd6134 Merge "Add support for ceph-mon bootstrap" 2017-10-18 08:46:42 +00:00
James Page 71390fe0cf Add support for ceph-mon bootstrap
Add new relation to support bootstrapping a new deployment
of the ceph-mon charm from an existing ceph charm deployment,
supporting migration away from the deprecated ceph charm.

Each member of the existing ceph application will present
the required fsid and monitor-secret values, as well as its
public address so that the related ceph-mon units can
correctly seed from the exisitng MON cluster.

Provide stop hook implementation, which will leaves OSD
services running but will remove the ceph.conf provided
directly from this charm, falling back to ceph.conf provided
by other charms installed on the same machine. MON and MGR
services will be shutdown and disabled.

Closes-Bug: 1665159

Change-Id: I9bd1d7630a8eff53c65cb0f07d17e095fc7f32a9
Depends-On: Iac34d1bee4b51b55dfb3d14d315aae8526a0893c
2017-10-09 06:48:00 -04:00
James Page 596d8a9625 Generalize upgrade paths, use charms.ceph
Bring ceph charm inline with ceph-mon and ceph-osd charms,
supporting all upgrades paths for trusty and xenial deployments.

Change-Id: I8284e1f9b583b34cb68babec69407edc14c04930
Closes-Bug: 1662863
2017-09-18 12:55:28 +01:00
Jenkins 44c063580d Merge "change assert(Not)Equals to assert(Not)Equal" 2017-09-12 22:16:39 +00:00
Chris MacNaughton 3bf1bf7bfa Rename config variable to match expectation
Change-Id: Id3ae36d7da884a499092a6edd49614b706770534
Closes-Bug: #1716682
2017-09-12 17:06:29 +02:00
zhangyangyang 4ece0aa15c change assert(Not)Equals to assert(Not)Equal
According to http://docs.python.org/2/library/unittest.html
assert(Not)Equals is a deprecated alias of assert(Not)Equal.

Change-Id: I7094ffdd57f878632a935aef95a355cb98b0f9a1
Closes-Bug: #1329757
2017-09-12 09:03:37 +08:00
Dmitrii Shcherbakov f962fadc21 use a non-legacy bluestore option on Luminous+
the 'experimental' option is no longer needed as of Luminous release
https://github.com/ceph/ceph/blob/luminous/src/common/legacy_config_opts.h#L79

Change-Id: I9bbc0cc74833259b6ac1b0f951dceadebe0a267b
2017-08-30 16:53:41 +03:00
Chris MacNaughton d259b894b2 remove trusty requirement to allow xenial upgrades
Closes-Bug: #1709962
Closes-Bug: #1710645
Change-Id: I8274e40f36ac8c916b15efb6bb3d6f3b5d3af386
2017-08-21 16:43:21 +02:00
Edward Hope-Morley f0042a9a7f Sync charms.ceph to get code cleanup changes
Also had to fix some imports due to changes
implemented as part of the cleanup.

Change-Id: I64de0ad077eaaf8ca6ac0c575c4ae7f19bccf8ee
2017-08-14 14:54:35 +01:00
James Page e2fc2e3bd9 Add bluestore support for OSD's
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: I67323e26a4698de4e08c8c755db232399f7fed02
Depends-On: I36f7aa9d7b96ec5c9eaa7a3a970593f9ca14cb34
2017-07-07 09:59:42 +01:00
Billy Olsen a631169edd Skip osd-devices not absolute paths
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: I5b52096da0b6f100ae9835c339905585425b27ae
Closes-Bug: 1652175
2017-04-05 17:40:01 -07:00
Chris MacNaughton d3cf8bb3ab Only check for upgrades if bootstrapped
Only check for upgrade requests if the local unit is installed
and bootstrapped, avoiding attempts to upgrade on initial
execution of config-changed for trusty UCA pockets.

Note that the upgrade process relies on a running ceph cluster.

Change-Id: Ia3efe2f8cfdac4317809681e7d169725c6bd9ef2
Closes-Bug: 1662943
2017-02-17 12:30:53 +00:00
Chris MacNaughton 024fe9215f remove upgrade_keys
This function is no longer necessary as we do
not need to ensure that the remote units can
create their own pools

Change-Id: I7e46b97ad2bb18a6e11a393a34f40e9bf51445c7
Partial-Bug: 1424771
2017-02-14 13:20:16 -06:00
Chris MacNaughton a52acb9760 Add availability_zone to the OSD configuration
Addition of configurable availability_zone allows the
administrator to deploy Ceph with two dimensions of
crush locations, one from config and one from Juju's
availability zone

Change-Id: Icd0ee2eeaea8bad2b78f2ed46176084e01601261
2016-12-09 15:25:59 -05:00
Adam Collard 5d635ae394 Install lockfile-progs when related to nagios
The nrpe ceph status script relies on lockfile-create, but
lockfile-progs (package containing lockfile-create) was missing from
the install. Install it when related to nagios, and on upgrade-charm
when related to nagios.

Change-Id: I0addf9993d486a4d305dd554237efe554d4608d4
Closes-Bug: #1629104
2016-11-29 16:12:17 +00:00
Chris Holcombe 57808f02ab Multiple Rolling Upgrades
The rolling upgrade code sets keys in the ceph mon
cluster to discover whether it can upgrade itself. This
patch addresses an issue where the upgrade code was not
taking into account multiple upgrades to newer ceph versions
in a row.

Change-Id: Icae681e1817ce50039ef22a0677398fe84057bf7
2016-09-23 08:18:34 +01:00
James Page a980e1c7d6 Add support for application version
Juju 2.0 provides support for display of the version of
an application deployed by a charm in juju status.

Insert the application_version_set function into the
existing assess_status function - this gets called after
all hook executions, and periodically after that, so any
changes in package versions due to normal system updates
will also be reflected in the status output.

This review also includes a resync of charm-helpers to
pickup hookenv support for this feature.

Change-Id: I22763c26a28d397688f02845f0acb8021320a5ae
2016-09-21 09:11:37 +01:00
Jenkins 84b4b82eca Merge "Fix directory ownership as part of upgrade and restart OSD's" 2016-08-12 15:25:41 +00:00
Chris MacNaughton 811bc04e7c Clean up dependency chain
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: I8773a26266a2a13f92083e89db957a6454df9bb3
2016-08-11 11:00:53 -04:00
James Page 001d890d42 Fix directory ownership as part of upgrade and restart OSD's
This change ensures that when ceph is upgraded from an
older version that uses root to a newer version that
uses ceph as the process owner that all directories
are chowned.

As the ceph charm can also host OSD processes, ensure that
any ceph-osd daemons are stopped and started during the
upgrade process.

Change-Id: Ief3fd6352b440b7740965746cd0d1d846c647f84
Closes-Bug: 1600338
2016-08-11 10:32:34 +01:00
Chris MacNaughton 1f140c73ed Migrate to shared lib
This change moves our ceph.py and ceph_broker.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: I8942d2f3411acec197fd6b854c1d9e50457502a5
2016-08-01 17:00:23 -04:00
Chris Holcombe becf5ef80f Use osd-upgrade user for pause/resume
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: I95bedcdea622fbf2fd799e63932cedd0d577568a
2016-07-19 10:46:33 +01:00
James Page 473439ab65 Re-license charm as Apache-2.0
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: I5e5db16b6f04ee8282275e9fa63a8d864c5b51ec
2016-06-28 11:48:06 +01:00
Edward Hope-Morley af7ac0be61 Add support for user-provided ceph config
Adds a new config-flags option to the charm that
supports setting a dictionary of ceph configuration
settings that will be applied to ceph.conf.

This implementation supports config sections so that
settings can be applied to any section supported by
the ceph.conf template in the charm.

Change-Id: I5ed2530b1e06a4565029d62124b469b97e17d342
Closes-Bug: 1522375
2016-05-25 15:54:08 +01:00
Edward Hope-Morley 0c081bd27e Fix ceph-broker logging
Also ensure that ceph broker actions return their status
correctly.

Change-Id: I16a319dd72fd0b7b18a50d183a8f1e7c4f6f841d
Closes-Bug: 1572491
2016-04-20 11:17:02 +01:00
Edward Hope-Morley b8927e03fc Ensure all units provide ceph-public-addr
radosgw relation was only providing information
when executed by a leader unit. This patch ensures
that the minimum info is provided regardless.

Closes-Bug: 1570823
Change-Id: Ice044350c0c7b30ce65554b2ba5476d537588126
2016-04-15 13:30:38 +01:00
James Page f7c587f02b Add support for Juju network spaces
Juju 2.0 provides support for network spaces, allowing
charm authors to support direct binding of relations and
extra-bindings onto underlying network spaces.

Add public and cluster extra bindings to this charm to
support separation of client facing and cluster network
traffic using Juju network spaces.

Existing network configuration options will still be
preferred over any Juju provided network bindings, ensuring
that upgrades to existing deployments don't break.

Change-Id: I4df75a40f5308f701f15c45d3d7b1df1e03832ad
2016-04-09 16:54:58 +01:00
Alex Kavanagh d82e89ea20 Pause/resume for ceph charm
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 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: Ic5b5b33e59e72e13843d874a08e3d142a1befde3
2016-04-08 14:48:56 +00:00
Chris MacNaughton 97823569a5 Rolling upgrades for Ceph Monitor Cluster
This change adds functionality to allow the ceph monitor cluster to
upgrade in a serial rolled fashion.  This will use the ceph monitor
cluster itself as a locking mechanism and only allows 1 ceph monitor
at a time to upgrade.  If a monitor has been waiting on the previous
server for more than 10 minutes and hasn't seen it finish it will
assume it died during the upgrade and proceed with its own upgrade.

Limitations of this patch: As long as the monitor cluster does not
split brain this should work fine.  Also this assumes that NTP
among the ceph cluster is fairly accurate.

Change-Id: I04e227ea0713f0eaa4b4d78ad856e3f06fa7f225
2016-04-01 11:08:55 -04:00
Edward Hope-Morley 080685d831 Add hardening support
Add charmhelpers.contrib.hardening and calls to install,
config-changed, upgrade-charm and update-status hooks. Also
add new config option to allow one or more hardening
modules to be applied at runtime.

Change-Id: I230b8c11ba32395b708b9300d6b91dad728194e8
2016-03-30 11:48:16 +01:00
Chris Holcombe 961489609d Revert "Make 'blocked' status when node have no storage device"
This reverts commit fc04dd0fff.

Change-Id: I9efbf623fc9aa6096725a15e53df426739ac16ff
2016-03-16 16:55:02 +00:00
Seyeong Kim fc04dd0fff Make 'blocked' status when node have no storage device
Currently there is an msg for no storage status on
ceph node. But it doesn't make this charm state
'blocked'.

is_storage_fine function has been created to check
storage devices on ceph_hooks.py and using it on
assess_status.

Change-Id: I790fde0280060fa220ee83de2ad2319ac2c77230
Closes-Bug: lp1424510
2016-03-14 03:31:46 +00:00
Chris Holcombe 612ba454c4 Merge upstream and resolve conflicts with actions and actions.yaml 2016-02-18 17:16:55 -08:00
Bjorn Tillenius 27d5d4b8bb Lint. 2016-02-02 19:01:53 +02:00
Bjorn Tillenius 6980d3a341 Resolve symlinks in get_devices(). 2016-02-02 17:34:19 +02:00
Chris Holcombe eaa365a180 Clean up another lint error 2016-01-22 15:21:45 -08:00
Chris Holcombe 477cdc96fb Patching up the other unit tests to passing status 2016-01-22 15:04:27 -08:00
Chris Holcombe 66d6952a65 Merge upstream and resolve conflicts 2016-01-22 10:46:50 -08:00
Chris Holcombe e446a7731c Clean up lint warnings. Also added a few more mock unit tests 2016-01-21 14:19:53 -08:00
Chris Holcombe 32ff93e8d0 Adding a unit test file for ceph_ops 2016-01-21 09:38:47 -08:00
Chris Holcombe 1977cdbde1 Add actions to lint. Change actions.yaml to use enum and also change underscores to dashes. Log action_fail in addition to exiting -1. Merge v2 requests with v1 requests since this does not break backwards compatibility. Add unit tests. Modify tox.ini to include actions. . 2016-01-18 08:07:35 -08:00
Edward Hope-Morley aaa849bc64 add pool create pg_num override support 2015-11-19 18:14:14 +00:00
Edward Hope-Morley 562bde334a add pool create pg_num override support 2015-11-19 17:58:38 +00:00
James Page 770255714a Tidy imports 2015-10-06 21:16:42 +01:00
James Page 23b9fb1dae Tidy harder 2015-10-06 21:02:54 +01:00
James Page 8793787e1b Tidy lint 2015-10-06 21:02:31 +01:00
James Page 01ce08cd1a Add some unit tests to cover service status 2015-10-06 21:02:06 +01:00
Liam Young dbbd33939e Fix lint and add unit_test updates 2015-08-25 15:43:06 +01:00