Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ceph-disk : fixes and improvements for the --data-dir code path and associated tests #1032

Merged
merged 17 commits into from Jan 3, 2014
Merged

Conversation

ghost
Copy link

@ghost ghost commented Jan 1, 2014

This patch series is meant to make it possible to :

  • use ceph-disk from sources to run an OSD for test purposes
  • allow puppet-ceph to create OSDs using data directories instead of devices using ceph-disk, both for test purposes and deployment with as little changes as possible

It adds the following features and tests:

  • run ceph-osd when --mark-init=none
  • create the data directory if it does not exist
  • tests for the --data-dir code path
  • run ceph-osd when --mark-init=none

It also fixes a number of minor bugs.

@liewegas
Copy link
Member

liewegas commented Jan 2, 2014

aside from the ceph-osd/ceph-conf patch, this looks great to me. yay for ceph-disk tests! Reviewed-by:

@ghost
Copy link
Author

ghost commented Jan 3, 2014

  • 9c84c13 and 5525604 are added to allow overriding /var/lib/ceph and /etc/ceph when running from sources.
  • The /usr/bin hardcoded path is removed and backward compatibility is maintained via 641b181 which prepends /usr/bin to the PATH unless instructed otherwise with --prepend-to-path
  • The ceph-disk.sh test script has been modified to cover the corresponding changes.

Loic Dachary added 17 commits January 3, 2014 16:30
Mainly using % instead of ,

Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Loic Dachary <loic@dachary.org>
/usr/bin is hardcoded in front of some ceph programs which makes it
impossible to control where they are located via the PATH.

The hardcoded path cannot be removed altogether because it will most
likely lead to unexpected and difficult to diagnose problems for
existing installations where the PATH finds the program elsewhere.

The --prepend-to-path flag is added and defaults to /usr/bin : it prepends
to the PATH environment variable. The hardcoded path is removed
and the PATH will be used: since /usr/bin is searched first, the
legacy behavior will not change.

Signed-off-by: Loic Dachary <loic@dachary.org>
Instead of relying on a hardcoded set of if paths. Although this has the
potential of changing the location of the binary being used by ceph-disk
on an existing installation, it is currently only used for sgdisk. It
could be disruptive for someone using a modified version of sgdisk but
the odds of this happening are very low.

Signed-off-by: Loic Dachary <loic@dachary.org>
The string form of a CalledProcessError instance does not include the
output datamember. Add it to the Error exception for debug purposes.

Signed-off-by: Loic Dachary <loic@dachary.org>
CalledProcessError has no errno data member

Signed-off-by: Loic Dachary <loic@dachary.org>
Use get_conf_with_default instead of get_conf because fsid is a known
ceph configuration option. It allows overriding via CEPH_ARGS which is
convenient for testing. Only options that are not found in config_opts.h
are fetch via get_conf.

Signed-off-by: Loic Dachary <loic@dachary.org>
It is meant to be used when preparing and activating a directory that is
not to be used with init. No file is created to identify the init
system, no symbolic link is made to the directory in /var/lib/ceph
and the init scripts are not called.

Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Loic Dachary <loic@dachary.org>
Instead of failing if the OSD data directory does not exist, create
it. Only do so if the data directory is not enforced to be a device via
the use of the --data-dev flag. The directory is not recursively created.

Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Loic Dachary <loic@dachary.org>
Replace hardcoded /var/lib/ceph with the STATEDIR global variable and
implement the --statedir option to override the default value.

Signed-off-by: Loic Dachary <loic@dachary.org>
Replace hardcoded /etc/ceph with the SYSCONFDIR global variable and
implement the --sysconfdir option to override the default value.

Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Loic Dachary <loic@dachary.org>
liewegas pushed a commit that referenced this pull request Jan 3, 2014
ceph-disk : fixes and improvements for the --data-dir code path and associated tests

Reviewed-by: Sage Weil <sage@inktank.com>
@liewegas liewegas merged commit 3121078 into ceph:master Jan 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant