Andrew Schoen [Wed, 22 Feb 2017 19:43:59 +0000 (13:43 -0600)]
tests: when using pytest mark decorators ensure all fixtures are defined
Decorating a test method directly with a pytest mark seems to break if
the test function does not explicitly define all pytest fixtures it
expects to recieve.
Sébastien Han [Tue, 21 Feb 2017 18:39:47 +0000 (13:39 -0500)]
ci: do not generate random hostname for ansible2.2-docker_dedicated_journal
This fixes the error: Call to virDomainCreateWithFlags failed: internal
error: Monitor path
/var/lib/libvirt/qemu/domain-docker-cluster-dedicated-journal_osd0_1487692576_dbfc21d851071d3e2cd2/monitor.sock
too big for destination
Sébastien Han [Tue, 7 Feb 2017 21:00:53 +0000 (22:00 +0100)]
docker: osd, do not use priviledged container anymore
Oh yeah! This patch adds more fine grained control on how we run the
activation osd container. We now use --device to give a read, write and
mknodaccess to a specific device to be consumed by Ceph. We also use
SYS_ADMIN cap to allow mount operations, ceph-disk needs to temporary
mount the osd data directory during the activation sequence.
This patch also enables the support of dedicated journal devices when
deploying ceph-docker with ceph-ansible.
Depends on https://github.com/ceph/ceph-docker/pull/478
Andrew Schoen [Tue, 21 Feb 2017 18:35:00 +0000 (12:35 -0600)]
ceph-common: remove infernalis comment on radosgw_civetweb_port
As of Infernalis, the Ceph daemons run as an unprivileged "ceph" UID,
and this is by design.
Commit f19b765 altered the default
civetweb port from 80 to 8080 with a comment in the commit log about
"until this gets solved"
Remove the comment about permissions on Infernalis, because this is
always going to be the case on the Ceph versions we support, and it
is just confusing.
If users want to expose civetweb to s3 clients using privileged TCP
ports, they can redirect traffic with iptables, or use a reverse proxy
application like HAproxy.
Andrew Schoen [Fri, 17 Feb 2017 20:27:15 +0000 (14:27 -0600)]
ceph-common: use yum_repository when adding the ceph_stable repo
This gives us more flexibility than installing the ceph-release package
as we can easily use different mirrors. Also, I noticed an issue when
upgrading from jewel -> kraken as the ceph-release package for those
releases both have the same version number and yum doesn't know to
update anything.
Ken Dreyer [Tue, 21 Feb 2017 16:49:40 +0000 (09:49 -0700)]
group_vars: rm Infernalis comment
As of Infernalis, the Ceph daemons run as an unprivileged "ceph" UID,
and this is by design.
Commit f19b765f7995dab4aca46e1885320dc440485ead altered the default
civetweb port from 80 to 8080 with a comment in the commit log about
"until this gets solved"
Remove the comment about permissions on Infernalis, because this is
always going to be the case on the Ceph versions we support, and it
is just confusing.
If users want to expose civetweb to s3 clients using privileged TCP
ports, they can redirect traffic with iptables, or use a reverse proxy
application like HAproxy.
Sébastien Han [Mon, 20 Feb 2017 22:07:53 +0000 (17:07 -0500)]
common: fix "disable transparent hugepage"
To configure kernel the task is using "command" module which is not
respect operator ">". So this task just print to "stdout": "never >
/sys/kernel/mm/transparent_hugepage/enabled"
Sébastien Han [Thu, 9 Feb 2017 14:16:39 +0000 (15:16 +0100)]
docker: use a better method to pull images
We changed the way we declare image.
Prior to this patch we must have a "user/image:tag"
format, which is incompatible with non docker-hub registry where you
usually don't have a "user". On the docker hub a "user" is also
identified as a namespace, so for Ceph the user was "ceph".
Variables have been simplified with only:
* ceph_docker_image
* ceph_docker_image_tag
1. For docker hub images: ceph_docker_name: "ceph/daemon" will give
you the 'daemon' image of the 'ceph' user.
2. For non docker hub images: ceph_docker_name: "daemon" will simply
give you the "daemon" image.
Infrastructure playbooks have been modified as well.
The file group_vars/all.docker.yml.sample has been removed as well.
It is hard to maintain since we have to generate it manually. If
you want to configure specific variables for a specific daemon simply
edit group_vars/$DAEMON.yml
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1420207 Signed-off-by: Sébastien Han <seb@redhat.com>
Andrew Schoen [Tue, 7 Feb 2017 20:38:02 +0000 (14:38 -0600)]
purge-cluster: remove all include tasks
Including variables from role defaults or files in a group_vars
directory relative to the playbook is a bad practice. We don't want to
do this because including these defaults at the task level overrides
values that would be set in a group_vars directory relative to the
inventory file, which is the correct usage if you wish to override
those default values.
Guits [Wed, 8 Feb 2017 09:45:09 +0000 (10:45 +0100)]
ceph-mon: Fix bug #1242
We shouldn't test directly the value of
`ceph_conf_overrides.global.osd_pool_default_pg_num` because this can
cause the playbook to fail if the key `global` is not present in
`ceph_conf_overrides`. Therefore we have to use the facts that have been
defined earlier.
Andrew Schoen [Thu, 2 Feb 2017 18:39:06 +0000 (12:39 -0600)]
tests: if no osds are created do not error in conftest.py
If no OSDs were created the command would fail and because we were using
check_output it would throw an exception and mark all OSD tests as ERROR.
This keeps tests from running that might tell us why the OSDS were not created.
Kyle Squizzato [Wed, 1 Feb 2017 18:29:45 +0000 (13:29 -0500)]
README: Don't use underscores for opts in ceph_conf_overrides
Adding underscores in the ceph_conf_overrides variable can result in incorrect
config options appearing. A note has been added to clarify that using
underscores here can cause this behavior and recommending not to do it.
Sébastien Han [Mon, 30 Jan 2017 10:05:01 +0000 (11:05 +0100)]
common: create ceph initial directories
Some users purge their environments and leave it in a non-optimal state.
e.g: packages are still installed but /etc/ceph and /var/lib/ceph don't
exist anymore. This will result in multiple failures across the play,
sometimes hard to detect. Populating these directories "just in case"
should help us solving these problems.
Closes: #1253 Signed-off-by: Sébastien Han <seb@redhat.com>
Sébastien Han [Fri, 27 Jan 2017 14:40:41 +0000 (15:40 +0100)]
purge: do not stop ceph.target on each daemon
Doing this cause some all the daemons to go down at the same time. In a
scenario where we colocate a monitor and an osd, this osds will take
some time to go down which will make the 'umount' task fail.
Sébastien Han [Fri, 27 Jan 2017 12:45:16 +0000 (13:45 +0100)]
purge: do not fail on purge ceph files
On systems running docker there is an issue with lxfs that results in
the find command returning 1 but actually did the job.
e.g: on a system with docker runnning find /var will give us the
following error:
Sébastien Han [Fri, 27 Jan 2017 10:33:37 +0000 (11:33 +0100)]
purge: fix ubuntu purge when not using systemd
We now rely on the cli tool ceph-detect-init which will tell us the init
system in used on the distribution. We do this instead of the previous
lookup for systemd unit files to call the right task depending on the
init system.