32 Commits

Author SHA1 Message Date
Ian Wienand
ada886dd43 Don't mix declaration and set of locals
Ia0957b47187c3dcadd46154b17022c4213781112 proposes to have bashate
find instances of setting a local value.  The issue is that "local"
always returns 0, thus hiding any failure in the commands running to
set the variable.

This is an automated replacement of such instances

Depends-On: I676c805e8f0401f75cc5367eee83b3d880cdef81
Change-Id: I9c8912a8fd596535589b207d7fc553b9d951d3fe
2015-10-07 17:03:32 +11:00
Nicolas Simonds
e97cb825d2 update cinder's key permission to allow nova snapshots
Preparing the field for this patch:

https://review.openstack.org/205282

The client.cinder key needs to have write permission to the glance pool
in order to complete the snapshot process.

Change-Id: I98f16167db864ffd14e8c3dd5dec81fc16245448
2015-07-31 16:44:29 -07:00
Jenkins
af68087be3 Merge "line wrapping for longer ceph commands" 2015-07-31 13:14:37 +00:00
Sean Dague
dd07c484e4 line wrapping for longer ceph commands
Some of the ceph commands had gotten quite long, so reviewing them in
gerrit is a bit problematic. Do some line wrapping just to bring these
back to a bit more managable state.

Change-Id: Ice5122702f2466d059dd275b038d5ff983bcda44
2015-07-29 14:10:00 -04:00
Jenkins
43ef53c2a2 Merge "update cinder's key permission to allow nova snapshots" 2015-07-27 19:22:13 +00:00
Sébastien Han
64ab8d1228 Re-enable direct URL
This parameter is needed in order to test the copy on write cloning
functionnality.

Change-Id: Ie8179a68827acba2dd8614ea9c6cecf2ddb20e29
Signed-off-by: Sébastien Han <seb@redhat.com>
2015-07-27 15:12:51 +02:00
Sébastien Han
089f044cbe update cinder's key permission to allow nova snapshots
Preparing the field for this patch:
https://review.openstack.org/#/c/205282/2

The client.cinder key needs to have write permission to the glance pool
in order to complete the snapshot process.

Change-Id: I90c6aa056b99944aa558783f3f81d06f918f3e26
Signed-off-by: Sébastien Han <seb@redhat.com>
2015-07-27 15:12:05 +02:00
Jenkins
229b95c477 Merge "Don't uninstall ceph packages at cleanup" 2015-07-09 03:33:39 +00:00
Matt Riedemann
e446fc3f59 Set ATTACH_ENCRYPTED_VOLUME_AVAILABLE=False if testing with Ceph
The encrypted Cinder volume tests in Tempest don't actually work
properly for a Ceph backend in cinder since the volume encryption
support is not in Nova for RBD volume types.

This is needed for Cinder change
I03f8cae05cc117e14f7482115de685fc9f3fa54a which tells Nova that the rbd
volume connection is on an encrypted volume type.

Related-Bug: #1463525

Change-Id: I8548d41095513b9e669f773e3f35353e9228ead9
2015-07-08 12:10:15 -07:00
Eric Harney
9ef663a70f Don't uninstall ceph packages at cleanup
We stop the services, which should be sufficient.
Uninstalling the packages means that doing repeated
runs with devstack takes longer than necessary.

Change-Id: I5626e42ce83710690a3523439bb2c9c9af560cd9
2015-07-07 09:40:08 -04:00
Jenkins
018c50c2e2 Merge "ceph: remove deprecated glance_store options" 2015-07-03 05:25:40 +00:00
Louis Taylor
21afa42da6 ceph: remove deprecated glance_store options
glance_store has now been fully migrated, so we can stop setting these
options in the config files.

Change-Id: I3c6c2eea0171227b1ed362e74bcc5b10770721be
2015-06-10 12:55:10 +00:00
Kashyap Chamarthy
a53ae68889 Remove Fedora 20 as supported distribution
Fedora 20 will reach end of life on 23-JUN-2015[1]; remove it as
supported distribution. Add Fedora 22 where applicable.

    - stack.sh: Remove Fedora 20 from list of supported distributions.
    - files/rpms/general: Remove 'f20' from NOPRIME.
    - lib/ceph: Remove 'f20' from the check_os_support_ceph()
      function.
    - doc/source/index.rst: s/Fedora 20/Fedora 21/

[1] https://lists.fedoraproject.org/pipermail/devel-announce/2015-May/001586.html

Change-Id: I8f2e1ddc24c071754b1cceb5bed5bdafdc9d9f79
2015-06-05 12:53:27 +02:00
Attila Fazekas
c550f21589 Enable F22 without the FORCE flag
F22 has a stable release and working with devstack.

The change also removes the version flags regarding to the
mariadb-devel.

NOTE: You may see yum deprecation warnings, unless
you set the YUM variable to dnf.

Change-Id: I05140765bffc16faef5a29dfaba291c290bfae02
2015-05-28 15:43:06 +02:00
Accela Zhao
99de7cc178 Fix wrong sudo ceph -c command in lib/ceph
The `sudo -c ${CEPH_CONF_FILE} ceph ...` in lib/ceph misplaced
`ceph`. The correct syntax is `sudo ceph -c ${CEPH_CONF_FILE} ...`,
see lib/ceph:308.

While installing ./stack.sh with ceph enabled, the above malformed
command raises a `usage: sudo -h | -K | -k | -V ...` error and stops
the installation.

This patch fixes `sudo -c ${CEPH_CONF_FILE} ceph ...` by moving
`ceph` to the right place.

Change-Id: I3da943d5a353d99b09787f804b79c1d006a09d96
Closes-bug: #1453055
2015-05-09 01:17:55 +08:00
Matthew Booth
0fdf34959e Don't cleanup ceph config when REMOTE_CEPH=True
If REMOTE_CEPH=True then we didn't write the contents of /etc/ceph, so
we shouldn't delete them.

Change-Id: I6291c6562a2864de775b1acb4be0be35b866f30d
2015-03-03 16:37:35 +00:00
Matthew Booth
e3ceaedbd7 Fix defaulting of REMOTE_CEPH
A typo in lib/ceph was causing REMOTE_CEPH to be defaulted whenever
lib/ceph was sourced, regardless of its existing value. The
`trueorfalse` function takes a variable name as its second argument,
not a value.

Change-Id: Iec846e0b892eaa63a0a2a59aa045bc56d5606af1
2015-03-03 16:13:31 +00:00
Eric Harney
a27b74cdf7 Ceph: wait for services to shutdown during cleanup
It can take ceph-osd and ceph-mon a few seconds to complete when
they are killed.  This races against the umount command in cleaup
and can often result in $CEPH_DATA_DIR failing to unmount since
it is still in use.

Wait for these processes to stop to ensure the mount point is
umounted successfully.

Change-Id: I1a635e75a68be6b14fbee52ff981b5f5a3a8eb0e
2015-01-27 09:59:59 +01:00
Jenkins
5734d08174 Merge "Ability to use a remote Ceph cluster" 2015-01-13 18:16:02 +00:00
Sébastien Han
4eb04a5f9e Ability to use a remote Ceph cluster
Sometimes we want to run some benchmarks on virtual machines that will be
backed by a Ceph cluster. The first idea that comes in our mind is to
use devstack to quickly get an OpenStack up and running but what about
the configuration of Devstack with this remote cluster?

Thanks to this commit it's now possible to use an already existing Ceph
cluster. In this case Devstack just needs two things:

* the location of the Ceph config file (by default devstack will look
for /etc/ceph/ceph.conf
* the admin key of the remote ceph cluster (by default devstack will
look for /etc/ceph/ceph.client.admin.keyring)

Devstack will then create the necessary pools, users, keys and will
connect the OpenStack environment as usual. During the unstack phase
every pools, users and keys will be deleted on the remote cluster while
local files and ceph-common package will be removed from the current
Devstack host.

To enable this mode simply add REMOTE_CEPH=True to your localrc file.

Change-Id: I1a4b6fd676d50b6a41a09e7beba9b11f8d1478f7
Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2015-01-13 09:49:58 +01:00
Jenkins
d09a1db5a4 Merge "add shebang lines to all lib files" 2014-12-10 20:32:15 +00:00
Sean Dague
e263c82e48 add shebang lines to all lib files
With gerrit 2.8, and the new change screen, this will trigger syntax
highlighting in gerrit. Thus making reviewing code a lot nicer.

Change-Id: Id238748417ffab53e02d59413dba66f61e724383
2014-12-10 11:28:05 -05:00
Jenkins
b8491cd8b9 Merge "Fix the variable substitution" 2014-12-09 17:21:46 +00:00
Eric Harney
b01fb940c9 Ceph: undefine secret from nova.conf when deleting secret
At teardown time we delete the libvirt secret but leave
nova.conf referencing the stale UUID.  Remove it to make
debugging and repeated runs less error-prone.

Additionally, only try to delete secret if it Cinder is
enabled (causing it to be defined when deploying devstack).

Change-Id: Id5e1290b8dcfd79238f02e31084ab12c3d6aed5f
2014-11-25 08:33:32 -05:00
Sébastien Han
849d0b8ebb Fix the variable substitution
Prior to that commit if ceph_version was equal to 0.80.5, the variable
substitution ${ceph_version%.*} was returning 0.80 and not 0. Using
${ceph_version%%.*} returns the desired value.
Also refactoring the version output to get a X.X format since only
major and minor are important.

Change-Id: Iab50f3c4b24a01a68acda417eae0501f00038f54
Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2014-11-18 13:04:12 -08:00
Sébastien Han
90f77fb015 Fix DevStack Ceph on the Giant release
As of the Ceph Giant release, pools 'data' and 'metadata' (used for
CephFS) were removed. Thus applying the pool change command fails on
Giant since those pools don't exist anymore. Now we are checking for
every release prior to Giant and apply proper commands accordingly.

Change-Id: Ia12042899c0e6809f5b98c2e0de177bb61c8a790
Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2014-11-08 15:59:04 +01:00
Jenkins
26167569d6 Merge "Add the ability to activate Nova ceph without Cinder" 2014-10-28 03:16:18 +00:00
Sébastien Han
fa16ae92cd Add the ability to activate Nova ceph without Cinder
Prior to this patch, if we wanted to boot a VM in Ceph using
libvirt_image_type we must had Cinder enabled. This patch allows you to
use libvirt_image_type without having Cinder enabled.

Change-Id: Ia61e6effc5a4ccba69f4fa48f6e9984f15bb8979
Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2014-10-09 19:25:23 +02:00
Eric Harney
9a706107d6 Set Glance default_store to rbd in [glance_store]
Glance is moving from [DEFAULT] to [glance_store] for this option.
Since lib/glance sets both, let's also set it in both places for now.

Failing to do this causes g-api to fail to start with error:
"Store for scheme swift not found"

Change-Id: I9e33ababf7c51f5c750f90b8b366b9892bb4c8cd
2014-10-08 11:10:31 -04:00
Sébastien Han
7c9abcad0d Add RBD as a known store
Adding RBD as a known store in the glance-api.conf file allows us to use
Ceph as a backend for Glance.

Closes-Bug: 1369578

Change-Id: I02cbafa68ca3293cedc9fef7535e79930cc4ee5c
Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2014-09-15 23:42:42 +02:00
Ivan Kolodyazhny
18b9dcc669 Increase CEPH_LOOPBACK_DISK_SIZE_DEFAULT to 4GB
CEPH_LOOPBACK_DISK_SIZE_DEFAULT should be more than 2GB
to make volume snapshot feature works. 2GB is not enough
because min Cinder volume size is 1GB and no snapshot
could be created.

This also fixes related Tempest tests and experimental
check-tempest-dsvm-full-ceph gate job.

Change-Id: Ifa41d0d1764d68ea02dcb32a5fc62f7f6282904d
2014-09-09 22:57:49 +03:00
Sébastien Han
36f2f024db Implement Ceph backend for Glance / Cinder / Nova
The new lib installs a full Ceph cluster. It can be managed
by the service init scripts. Ceph can also be installed in
standalone without any other components.
This implementation adds the auto-configuration for
the following services with Ceph:

* Glance
* Cinder
* Cinder backup
* Nova

To enable Ceph simply add: ENABLED_SERVICES+=,ceph to your localrc.
If you want to play with the Ceph replication, you can use the
CEPH_REPLICAS option and set a replica. This replica will be used for
every pools (Glance, Cinder, Cinder backup and Nova). The size of the
loopback disk used for Ceph can also be managed thanks to the
CEPH_LOOPBACK_DISK_SIZE option.

Going further pools, users and PGs are configurable as well. The
convention is <SERVICE_NAME_IN_CAPITAL>_CEPH_<OPTION> where services are
GLANCE, CINDER, NOVA, CINDER_BAK. Let's take the example of Cinder:

* CINDER_CEPH_POOL
* CINDER_CEPH_USER
* CINDER_CEPH_POOL_PG
* CINDER_CEPH_POOL_PGP

** Only works on Ubuntu Trusty, Fedora 19/20 or later **

Change-Id: Ifec850ba8e1e5263234ef428669150c76cfdb6ad
Implements: blueprint implement-ceph-backend
Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2014-07-23 16:13:45 +02:00