summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDengke Du <dengke.du@windriver.com>2018-10-24 14:34:51 +0800
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-10-25 06:31:52 -0400
commitf33c8698fd5fda6c687a2604c2405721fc096cae (patch)
tree182b7d57ffa0823610a0fbf0ccd58eb7fd0a935d
parent87526423d572b435002f54c6e9e28e4591c53447 (diff)
downloadmeta-virtualization-f33c8698fd5fda6c687a2604c2405721fc096cae.tar.gz
ceph: upgrade to 13.2.2
1. upgrade to 13.2.2 2. install systemd service files 3. add pybind support testing steps: # ceph -h outputs: -------------------------------------------------------------------------- General usage: ============== usage: ceph [-h] [-c CEPHCONF] [-i INPUT_FILE] [-o OUTPUT_FILE] [--id CLIENT_ID] [--name CLIENT_NAME] [--cluster CLUSTER] [--admin-daemon ADMIN_SOCKET] [-s] [-w] [--watch-debug] [--watch-info] [--watch-sec] [--watch-warn] [--watch-error] [--watch-channel {cluster,audit,*}] [--version] [--verbose] [--concise] [-f {json,json-pretty,xml,xml-pretty,plain}] [--connect-timeout CLUSTER_TIMEOUT] [--block] [--period PERIOD] Ceph administration tool optional arguments: -h, --help request mon help -c CEPHCONF, --conf CEPHCONF ...... -------------------------------------------------------------------------- Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch129
-rw-r--r--recipes-extended/ceph/ceph/0001-ceph-disable-pybind.patch28
-rw-r--r--recipes-extended/ceph/ceph/ceph.conf70
-rw-r--r--recipes-extended/ceph/ceph_13.2.2.bb (renamed from recipes-extended/ceph/ceph_13.2.1.bb)45
4 files changed, 235 insertions, 37 deletions
diff --git a/recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch b/recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch
new file mode 100644
index 00000000..f9c53406
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch
@@ -0,0 +1,129 @@
1From 00d44940c2e83bf73101a05d2aa8f88c2e2fca58 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Tue, 23 Oct 2018 15:34:53 +0800
4Subject: [PATCH] ceph: add pybind support in OE
5
61. add sysroot to CFLAGS when cross compiling pybind
72. change the pybind's INSTALL path to OE's INSTALL path
83. delete the check for header files, because the check method using
9 host compiler.
10
11Signed-off-by: Dengke Du <dengke.du@windriver.com>
12Upstream-Status: Inappropriate [oe specific]
13---
14 cmake/modules/Distutils.cmake | 12 +++---------
15 src/pybind/cephfs/setup.py | 8 --------
16 src/pybind/rados/setup.py | 8 --------
17 src/pybind/rbd/setup.py | 8 --------
18 src/pybind/rgw/setup.py | 8 --------
19 5 files changed, 3 insertions(+), 41 deletions(-)
20
21diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake
22index d6e9f38..3091d97 100644
23--- a/cmake/modules/Distutils.cmake
24+++ b/cmake/modules/Distutils.cmake
25@@ -47,7 +47,7 @@ function(distutils_add_cython_module name src)
26 LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
27 CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}
28 CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
29- CFLAGS=\"-iquote${CMAKE_SOURCE_DIR}/src/include -w\"
30+ CFLAGS=\"-iquote${CMAKE_SOURCE_DIR}/src/include -w --sysroot=${CMAKE_SYSROOT}\"
31 ${PYTHON${PYTHON_VERSION}_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py
32 build --verbose --build-base ${CYTHON_MODULE_DIR}
33 --build-platlib ${CYTHON_MODULE_DIR}/lib.${PYTHON${PYTHON_VERSION}_VERSION_MAJOR}
34@@ -69,14 +69,8 @@ function(distutils_install_cython_module name)
35 set(ENV{CEPH_LIBDIR} \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\")
36
37 set(options --prefix=${CMAKE_INSTALL_PREFIX})
38- if(DEFINED ENV{DESTDIR})
39- if(EXISTS /etc/debian_version)
40- list(APPEND options --install-layout=deb)
41- endif()
42- list(APPEND options --root=\$ENV{DESTDIR})
43- else()
44- list(APPEND options --root=/)
45- endif()
46+ list(APPEND options --root=${CMAKE_DESTDIR})
47+ list(APPEND options --install-lib=${PYTHON_SITEPACKAGES_DIR})
48 execute_process(
49 COMMAND
50 ${PYTHON${PYTHON_VERSION}_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py
51diff --git a/src/pybind/cephfs/setup.py b/src/pybind/cephfs/setup.py
52index 6533f41..1ee4a59 100755
53--- a/src/pybind/cephfs/setup.py
54+++ b/src/pybind/cephfs/setup.py
55@@ -121,14 +121,6 @@ def check_sanity():
56 finally:
57 shutil.rmtree(tmp_dir)
58
59-
60-if 'BUILD_DOC' in os.environ.keys():
61- pass
62-elif check_sanity():
63- pass
64-else:
65- sys.exit(1)
66-
67 cmdclass = {}
68 try:
69 from Cython.Build import cythonize
70diff --git a/src/pybind/rados/setup.py b/src/pybind/rados/setup.py
71index ef7c307..5204017 100755
72--- a/src/pybind/rados/setup.py
73+++ b/src/pybind/rados/setup.py
74@@ -117,14 +117,6 @@ def check_sanity():
75 finally:
76 shutil.rmtree(tmp_dir)
77
78-
79-if 'BUILD_DOC' in os.environ.keys():
80- pass
81-elif check_sanity():
82- pass
83-else:
84- sys.exit(1)
85-
86 cmdclass = {}
87 try:
88 from Cython.Build import cythonize
89diff --git a/src/pybind/rbd/setup.py b/src/pybind/rbd/setup.py
90index bcf96f2..d4cbbeb 100755
91--- a/src/pybind/rbd/setup.py
92+++ b/src/pybind/rbd/setup.py
93@@ -120,14 +120,6 @@ def check_sanity():
94 finally:
95 shutil.rmtree(tmp_dir)
96
97-
98-if 'BUILD_DOC' in os.environ.keys():
99- pass
100-elif check_sanity():
101- pass
102-else:
103- sys.exit(1)
104-
105 cmdclass = {}
106 try:
107 from Cython.Build import cythonize
108diff --git a/src/pybind/rgw/setup.py b/src/pybind/rgw/setup.py
109index f14f30c..ee7570b 100755
110--- a/src/pybind/rgw/setup.py
111+++ b/src/pybind/rgw/setup.py
112@@ -120,14 +120,6 @@ def check_sanity():
113 finally:
114 shutil.rmtree(tmp_dir)
115
116-
117-if 'BUILD_DOC' in os.environ.keys():
118- pass
119-elif check_sanity():
120- pass
121-else:
122- sys.exit(1)
123-
124 cmdclass = {}
125 try:
126 from Cython.Build import cythonize
127--
1282.7.4
129
diff --git a/recipes-extended/ceph/ceph/0001-ceph-disable-pybind.patch b/recipes-extended/ceph/ceph/0001-ceph-disable-pybind.patch
deleted file mode 100644
index bfba5b07..00000000
--- a/recipes-extended/ceph/ceph/0001-ceph-disable-pybind.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From 05bdb2bb6026c3a2e536c7143b39a763ffc1225f Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Thu, 27 Sep 2018 09:09:40 +0800
4Subject: [PATCH] ceph: disable pybind
5
6New ceph version have bad support for corss compile,
7so disable pybind temporarily.
8
9Signed-off-by: Dengke Du <dengke.du@windriver.com>
10---
11 src/CMakeLists.txt | 1 -
12 1 file changed, 1 deletion(-)
13
14diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
15index 374cbc7..44845f8 100644
16--- a/src/CMakeLists.txt
17+++ b/src/CMakeLists.txt
18@@ -777,7 +777,6 @@ if(NOT CEPH_BUILD_VIRTUALENV)
19 set(CEPH_BUILD_VIRTUALENV /tmp)
20 endif()
21
22-add_subdirectory(pybind)
23 add_subdirectory(ceph-disk)
24 add_subdirectory(ceph-volume)
25 add_subdirectory(ceph-detect-init)
26--
272.7.4
28
diff --git a/recipes-extended/ceph/ceph/ceph.conf b/recipes-extended/ceph/ceph/ceph.conf
new file mode 100644
index 00000000..fd9de6ce
--- /dev/null
+++ b/recipes-extended/ceph/ceph/ceph.conf
@@ -0,0 +1,70 @@
1[global]
2 # Unique ID for the cluster. Run uuidgen to get this string.
3 fsid = %CLUSTER_UUID%
4 # Initial monitor
5 mon initial members = node1
6 # IP address of the initial monitor, i.e. 128.224.149.xx
7 mon host = %PUBLIC_IP%
8 # Public network where the monitor is connected to, i.e, 128.224.0.0/16
9 public network = %PUBLIC_DOMAIN%
10 # For version 0.55 and beyond, you must explicitly enable
11 # or disable authentication with "auth" entries in [global].
12 auth cluster required = cephx
13 auth service required = cephx
14 auth client required = cephx
15 osd journal size = 1024
16
17 # Uncomment the following line if you are mounting with ext4
18 # filestore xattr use omap = true
19
20 # Number of replicas of objects. Write an object 2 times.
21 # Cluster cannot reach an active + clean state until there's enough OSDs
22 # to handle the number of copies of an object. In this case, it requires
23 # at least 2 OSDs
24 osd pool default size = 2
25
26 # Allow writing one copy in a degraded state.
27 osd pool default min size = 1
28
29 # Ensure you have a realistic number of placement groups. We recommend
30 # approximately 100 per OSD. E.g., total number of OSDs multiplied by 100
31 # divided by the number of replicas (i.e., osd pool default size). So for
32 # 10 OSDs and osd pool default size = 2, we'd recommend approximately
33 # (100 * 10) / 2 = 500.
34 osd pool default pg num = 500
35 osd pool default pgp num = 500
36 osd crush chooseleaf type = 1
37
38[osd]
39 osd mkfs type = xfs
40 osd mkfs options xfs = "-f"
41 osd mount options xfs = "rw,noatime,inode64,logbufs=8,logbsize=256k"
42
43# All port numbers below are not hard-coded, but expected by ceph, so please
44# do not change the numbers.
45[mon.node1]
46 host = node1
47 mon addr = %PUBLIC_IP%:6789
48
49[osd.0]
50 host = node1
51 public addr = %PUBLIC_IP%:6800
52 cluster addr = %PRIVATE_IP%:6800
53 devs = /dev/sda1
54
55[osd.1]
56 host = node1
57 public addr = %PUBLIC_IP%:6801
58 cluster addr = %PRIVATE_IP%:6801
59 devs = /dev/sda2
60
61[osd.2]
62 host = node1
63 public addr = %PUBLIC_IP%:6802
64 cluster addr = %PRIVATE_IP%:6802
65 devs = /dev/sda3
66
67[mds.a]
68 host = node1
69 devs = /dev/sda4
70
diff --git a/recipes-extended/ceph/ceph_13.2.1.bb b/recipes-extended/ceph/ceph_13.2.2.bb
index e89bbebc..6c6da41b 100644
--- a/recipes-extended/ceph/ceph_13.2.1.bb
+++ b/recipes-extended/ceph/ceph_13.2.2.bb
@@ -1,29 +1,36 @@
1SUMMARY = "User space components of the Ceph file system" 1SUMMARY = "User space components of the Ceph file system"
2LICENSE = "LGPLv2.1 & GPLv2 & Unknown & Apache-2.0 & MIT" 2LICENSE = "LGPLv2.1 & GPLv2 & Apache-2.0 & MIT"
3LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24 \ 3LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24 \
4 file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ 4 file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
5 file://COPYING;md5=92d301c8fccd296f2221a68a8dd53828 \ 5 file://COPYING;md5=92d301c8fccd296f2221a68a8dd53828 \
6" 6"
7 7inherit cmake pythonnative python-dir systemd
8# Disable python pybind support for ceph temporary, when corss compiling pybind, 8# Disable python pybind support for ceph temporary, when corss compiling pybind,
9# pybind mix cmake and python setup environment, would case a lot of errors. 9# pybind mix cmake and python setup environment, would case a lot of errors.
10 10
11SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \ 11SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \
12 file://0001-Correct-the-path-to-find-version.h-in-rocksdb.patch \ 12 file://0001-Correct-the-path-to-find-version.h-in-rocksdb.patch \
13 file://0001-ceph-disable-pybind.patch \
14 file://0001-zstd-fix-error-for-cross-compile.patch \ 13 file://0001-zstd-fix-error-for-cross-compile.patch \
14 file://0001-ceph-add-pybind-support-in-OE.patch \
15 file://ceph.conf \
15" 16"
16SRC_URI[md5sum] = "4b0ee225e153fbb2515fa3f8a3666d17" 17SRC_URI[md5sum] = "ce118be451dcb6b89e9e0a45057827dd"
17SRC_URI[sha256sum] = "32086294d2007fdf64f85fcd919de2f092eeaa897bd8dc7c01e005e14516903c" 18SRC_URI[sha256sum] = "f3a61db4c90e00c38a2dac7239b956ec367ef56f601e07335ed3011f931d8840"
18 19
19DEPENDS = "boost bzip2 curl expat gperf-native \ 20DEPENDS = "boost bzip2 curl expat gperf-native \
20 keyutils libaio libibverbs lz4 \ 21 keyutils libaio libibverbs lz4 \
21 nspr nss \ 22 nspr nss \
22 oath openldap openssl \ 23 oath openldap openssl \
23 python rocksdb snappy udev \ 24 python python-cython-native rocksdb snappy udev \
24 valgrind xfsprogs zlib \ 25 valgrind xfsprogs zlib \
25" 26"
26inherit cmake pythonnative python-dir 27SYSTEMD_SERVICE_${PN} = "ceph-radosgw@.service \
28 ceph-mon@.service \
29 ceph-mds@.service \
30 ceph-disk@.service \
31 ceph-osd@.service \
32 ceph.target \
33"
27OECMAKE_GENERATOR = "Unix Makefiles" 34OECMAKE_GENERATOR = "Unix Makefiles"
28 35
29EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \ 36EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \
@@ -41,23 +48,43 @@ EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \
41 48
42do_configure_prepend () { 49do_configure_prepend () {
43 echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake 50 echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake
51 echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake
52 echo "set( PYTHON_SITEPACKAGES_DIR \"${PYTHON_SITEPACKAGES_DIR}\" )" >> ${WORKDIR}/toolchain.cmake
44} 53}
45 54
46do_install_append () { 55do_install_append () {
47 sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph 56 sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph
57 install -d ${D}${sysconfdir}/ceph
58 install -m 644 ${WORKDIR}/ceph.conf ${D}${sysconfdir}/ceph/
59 install -d ${D}${systemd_unitdir}/system
60 mv ${D}${libexecdir}/systemd/system/ceph-radosgw@.service ${D}${systemd_unitdir}/system/ceph-radosgw@.service
61 mv ${D}${libexecdir}/systemd/system/ceph-mon@.service ${D}${systemd_unitdir}/system/ceph-mon@.service
62 mv ${D}${libexecdir}/systemd/system/ceph-mds@.service ${D}${systemd_unitdir}/system/ceph-mds@.service
63 mv ${D}${libexecdir}/systemd/system/ceph-disk@.service ${D}${systemd_unitdir}/system/ceph-disk@.service
64 mv ${D}${libexecdir}/systemd/system/ceph-osd@.service ${D}${systemd_unitdir}/system/ceph-osd@.service
65 mv ${D}${libexecdir}/systemd/system/ceph.target ${D}${systemd_unitdir}/system/ceph.target
48} 66}
49 67
50FILES_${PN} += "\ 68FILES_${PN} += "\
51 ${libdir}/rados-classes/*.so.* \ 69 ${libdir}/rados-classes/*.so.* \
52" 70"
53
54FILES_${PN}-dev += "\ 71FILES_${PN}-dev += "\
55 ${libdir}/ceph/compressor/*.so \ 72 ${libdir}/ceph/compressor/*.so \
56 ${libdir}/rados-classes/*.so \ 73 ${libdir}/rados-classes/*.so \
57 ${libdir}/ceph/*.so \ 74 ${libdir}/ceph/*.so \
58" 75"
59 76FILES_${PN}-python = "\
77 ${PYTHON_SITEPACKAGES_DIR}/* \
78"
60RDEPENDS_${PN} += "\ 79RDEPENDS_${PN} += "\
61 python \ 80 python \
81 python-misc \
82 python-modules \
83 python-prettytable \
84 ${PN}-python \
62" 85"
63COMPATIBLE_HOST = "(x86_64).*" 86COMPATIBLE_HOST = "(x86_64).*"
87PACKAGES += " \
88 ${PN}-python \
89"
90INSANE_SKIP_${PN}-python += "ldflags"