From ae06d68746ba1edbde219e563cdfa230defa511e Mon Sep 17 00:00:00 2001 From: "Sar Ashki, Babak" Date: Sat, 22 Feb 2020 13:42:14 -0800 Subject: [PATCH] ceph rebase stx.3.0 patches Reconfig build to enable ceph-mgr and python3 --- .../{ceph_13.2.2.bbappend => ceph_%.bbappend} | 42 +++++++++---------- ...-ceph-rebase-on-stx.3.0-and-warrior.patch} | 15 ++++--- .../ceph/files/ceph/ceph-mds_manual.sh | 2 - .../ceph/files/ceph/ceph-mgr_manual.sh | 13 ------ .../ceph/files/ceph/ceph-mon_config.sh | 28 ------------- .../ceph/files/ceph/ceph-volume_manual.sh | 8 ---- 6 files changed, 30 insertions(+), 78 deletions(-) rename recipes-extended/ceph/{ceph_13.2.2.bbappend => ceph_%.bbappend} (84%) rename recipes-extended/ceph/files/ceph/{0001-Add-hooks-for-orderly-shutdown-on-controller.patch => 0001-ceph-rebase-on-stx.3.0-and-warrior.patch} (84%) delete mode 100644 recipes-extended/ceph/files/ceph/ceph-mds_manual.sh delete mode 100644 recipes-extended/ceph/files/ceph/ceph-mgr_manual.sh delete mode 100644 recipes-extended/ceph/files/ceph/ceph-mon_config.sh delete mode 100644 recipes-extended/ceph/files/ceph/ceph-volume_manual.sh diff --git a/recipes-extended/ceph/ceph_13.2.2.bbappend b/recipes-extended/ceph/ceph_%.bbappend similarity index 84% rename from recipes-extended/ceph/ceph_13.2.2.bbappend rename to recipes-extended/ceph/ceph_%.bbappend index c3eccbf..2cfecaf 100644 --- a/recipes-extended/ceph/ceph_13.2.2.bbappend +++ b/recipes-extended/ceph/ceph_%.bbappend @@ -3,7 +3,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/patches:${THISDIR}/files:" inherit python3native python3-dir SRC_URI += "\ - file://ceph/0001-Add-hooks-for-orderly-shutdown-on-controller.patch \ + file://ceph/0001-ceph-rebase-on-stx.3.0-and-warrior.patch \ file://ceph/ceph.conf \ file://ceph/ceph-init-wrapper.sh \ file://ceph/ceph-preshutdown.sh \ @@ -15,16 +15,13 @@ SRC_URI += "\ file://ceph/ceph-radosgw.service \ file://ceph/ceph.sh \ file://ceph/mgr-restful-plugin.service \ - file://ceph/ceph-mon_config.sh \ - file://ceph/ceph-mgr_manual.sh \ - file://ceph/ceph-volume_manual.sh \ " - DEPENDS = "boost rdma-core bzip2 curl expat gperf-native \ keyutils libaio lz4 \ nspr nss oath openldap openssl \ - python python3 python3-cython-native rocksdb snappy udev \ + python3 python3-cython-native rocksdb snappy udev \ python-cython-native valgrind xfsprogs zlib \ + rabbitmq-c \ " RDEPENDS_${PN} += " rdma-core python3-core python3" @@ -37,19 +34,22 @@ EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \ -DWITH_BABELTRACE=OFF \ -DWITH_TESTS=OFF \ -DWITH_MGR=ON \ - -DWITH_MGR_DASHBOARD_FRONTEND=OFF \ -DWITH_PYTHON2=OFF \ -DWITH_PYTHON3=ON \ -DMGR_PYTHON_VERSION=3 \ + -DWITH_MGR_DASHBOARD_FRONTEND=OFF \ -DWITH_SYSTEM_BOOST=ON \ -DWITH_SYSTEM_ROCKSDB=ON \ + -DWITH_RDMA=OFF \ + -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \ " # TODO: Should be fixed in either boost package or CMake files. -do_configure_prepend() { - ln -f -s ${WORKDIR}/recipe-sysroot/usr/lib/libboost_python35.so \ - ${WORKDIR}/recipe-sysroot/usr/lib/libboost_python.so -} +#do_configure_prepend() { +# ln -f -s ${WORKDIR}/recipe-sysroot/usr/lib/libboost_python35.so \ +# ${WORKDIR}/recipe-sysroot/usr/lib/libboost_python.so +#} + do_install_append () { install -d ${D}${sysconfdir}/ceph install -m 0644 ${WORKDIR}/ceph/ceph.conf ${D}${sysconfdir}/ceph/ @@ -81,7 +81,7 @@ do_install_append () { install -m 0644 -D ${S}/COPYING ${D}${docdir}/ceph/COPYING install -m 0644 -D ${S}/etc/sysctl/90-ceph-osd.conf ${D}${libdir}/sysctl.d/90-ceph-osd.conf install -m 0644 -D ${S}/udev/50-rbd.rules ${D}${libdir}/udev/rules.d/50-rbd.rules - install -m 0644 -D ${S}/udev/60-ceph-by-parttypeuuid.rules ${D}${libdir}/udev/rules.d/60-ceph-by-parttypeuuid.rules + # install -m 0644 -D ${S}/udev/60-ceph-by-parttypeuuid.rules ${D}${libdir}/udev/rules.d/60-ceph-by-parttypeuuid.rules mkdir -p ${D}${localstatedir}/ceph #TODO: @@ -106,16 +106,16 @@ do_install_append () { install -m 0750 -D ${B}/bin/init-ceph ${D}${sysconfdir}/rc.d/init.d/ceph install -m 0750 -D ${B}/bin/init-ceph ${D}${sysconfdir}/init.d/ceph install -d -m 0750 ${D}${localstatedir}/log/radosgw - install -d -m 0750 ${D}/home/root/cluster - cp ${WORKDIR}/ceph/ceph-mon_config.sh ${D}/home/root/cluster - cp ${WORKDIR}/ceph/ceph-mgr_manual.sh ${D}/home/root/cluster - cp ${WORKDIR}/ceph/ceph-volume_manual.sh ${D}/home/root/cluster - chmod 755 ${D}/home/root/cluster/* + sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph - sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph-disk - sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph-detect-init - sed -i -e '1s:python$:python3:' ${D}${bindir}/ceph-volume - sed -i -e '1s:python$:python3:' ${D}${bindir}/ceph-volume-systemd + # sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph-disk + # sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph-detect-init + + sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph-crash + sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph-volume + sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph-volume-systemd + #sed -i -e '1s:python$:python3:' ${D}${bindir}/ceph-volume + #sed -i -e '1s:python$:python3:' ${D}${bindir}/ceph-volume-systemd sed -i -e 's:/sbin/:/bin/:' ${D}${systemd_system_unitdir}/ceph-volume@.service } diff --git a/recipes-extended/ceph/files/ceph/0001-Add-hooks-for-orderly-shutdown-on-controller.patch b/recipes-extended/ceph/files/ceph/0001-ceph-rebase-on-stx.3.0-and-warrior.patch similarity index 84% rename from recipes-extended/ceph/files/ceph/0001-Add-hooks-for-orderly-shutdown-on-controller.patch rename to recipes-extended/ceph/files/ceph/0001-ceph-rebase-on-stx.3.0-and-warrior.patch index 15bb7c3..d27ed87 100644 --- a/recipes-extended/ceph/files/ceph/0001-Add-hooks-for-orderly-shutdown-on-controller.patch +++ b/recipes-extended/ceph/files/ceph/0001-ceph-rebase-on-stx.3.0-and-warrior.patch @@ -1,3 +1,8 @@ +From 3763a20314ec2b80ec9d8525a1d3867b3c731266 Mon Sep 17 00:00:00 2001 +From: "Sar Ashki, Babak" +Date: Sat, 22 Feb 2020 04:48:04 -0800 +Subject: [PATCH] ceph rebase on stx.3.0 and warrior + From 03340eaf0004e3cc8e3f8991ea96a46757d92830 Mon Sep 17 00:00:00 2001 From: Don Penney Date: Sat, 26 Jan 2019 13:34:55 -0500 @@ -5,18 +10,16 @@ Subject: [PATCH] Add hooks for orderly shutdown on controller Hook the ceph init script to add systemd overrides to define an orderly shutdown for StarlingX controllers. - -Signed-off-by: Don Penney --- src/init-ceph.in | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/init-ceph.in b/src/init-ceph.in -index 1fdb4b3..515d818 100644 +index 1843710..a31b900 100755 --- a/src/init-ceph.in +++ b/src/init-ceph.in -@@ -861,6 +861,38 @@ for name in $what; do - fi +@@ -434,6 +434,38 @@ for name in $what; do + continue fi + . /etc/platform/platform.conf @@ -55,5 +58,5 @@ index 1fdb4b3..515d818 100644 [ -n "$lockfile" ] && [ "$?" -eq 0 ] && touch $lockfile ;; -- -1.8.3.1 +2.23.0 diff --git a/recipes-extended/ceph/files/ceph/ceph-mds_manual.sh b/recipes-extended/ceph/files/ceph/ceph-mds_manual.sh deleted file mode 100644 index e38cf66..0000000 --- a/recipes-extended/ceph/files/ceph/ceph-mds_manual.sh +++ /dev/null @@ -1,2 +0,0 @@ - -ceph-mds --cluster ceph -i starlingx-host-aio/keyring -m 10.30.0.110:6789 diff --git a/recipes-extended/ceph/files/ceph/ceph-mgr_manual.sh b/recipes-extended/ceph/files/ceph/ceph-mgr_manual.sh deleted file mode 100644 index 84fd323..0000000 --- a/recipes-extended/ceph/files/ceph/ceph-mgr_manual.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -mkdir -p /var/lib/ceph/mgr/ceph-starlingx-host-aio -chown ceph:ceph /var/lib/ceph/mgr -chown ceph:ceph /var/lib/ceph/mgr/ceph-starlingx-host-aio -ceph auth get-or-create mgr.starlingx-host-aio mon 'allow profile mgr' osd ' allow *' mds ' allow *' -#systemctl enable ceph-mgr@starlingx-host-aio -systemctl start ceph-mgr@starlingx-host-aio -sleep 4 -ceph mgr module enable status -ceph mgr module enable dashboard -ceph dashboard create-self-signed-cert -ceph dashboard set-login-credentials sysadmin sysadmin diff --git a/recipes-extended/ceph/files/ceph/ceph-mon_config.sh b/recipes-extended/ceph/files/ceph/ceph-mon_config.sh deleted file mode 100644 index cccc4f9..0000000 --- a/recipes-extended/ceph/files/ceph/ceph-mon_config.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -rm -rf /tmp/ceph.mon.keyring /etc/ceph/ceph.client.admin.keyring /tmp/monmap -rm -rf /var/lib/ceph/mon/ceph-starlingx-host-aio -mkdir -p /var/lib/ceph/mon/ceph-starlingx-host-aio -mkdir -p /var/lib/ceph/mon/ceph-starlingx-host-aio -mkdir -p /var/run/ceph -chown ceph:ceph /var/run/ceph - -ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *' - -ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring \ - --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' \ - --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *' - -ceph-authtool --create-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring \ - --gen-key -n client.bootstrap-osd --cap mon 'profile bootstrap-osd' - -ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring -ceph-authtool /tmp/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring -monmaptool --create --add starlingx-host-aio 10.30.0.109 --fsid b4fb230f-a5e7-4d72-ba62-ecc8c7dacac5 /tmp/monmap -chown -R ceph:ceph /tmp/monmap -chown -R ceph:ceph /var/lib/ceph/mon/ceph-starlingx-host-aio -chown -R ceph:ceph /tmp/ceph.mon.keyring -sudo -u ceph ceph-mon --mkfs -i starlingx-host-aio --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring -sudo -u ceph touch /var/lib/ceph/mon/ceph-starlingx-host-aio/done -systemctl enable ceph-mon@starlingx-host-aio -systemctl start ceph-mon@starlingx-host-aio diff --git a/recipes-extended/ceph/files/ceph/ceph-volume_manual.sh b/recipes-extended/ceph/files/ceph/ceph-volume_manual.sh deleted file mode 100644 index 2115879..0000000 --- a/recipes-extended/ceph/files/ceph/ceph-volume_manual.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -ceph-volume lvm create --data /dev/sda12 -OSDFSID=$(ceph-volume lvm list | sed -n -e "s/^.*osd fsid.* \([a-z0-9].*$\)/\1/pg") -ceph-volume lvm create --filestore --data /dev/sda12 --journal /dev/sda13 -systemctl enable ceph-volume@lvm-0-$OSDFSID -#ceph-volume lvm activate 0 $OSDFSID -#ceph-volume lvm activate 0 $OSDFSID