diff options
| author | Hongzhi.Song <hongzhi.song@windriver.com> | 2019-09-10 20:26:11 -0700 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-09-14 23:51:10 -0400 |
| commit | 85f7376fa4f142117be9fd829994e79d5c418a6f (patch) | |
| tree | 60cccd1f41e173bf8cee80822ba29a8d7749eecd | |
| parent | 624c5a0621f4a293ef1d420b6fd10db3760aff98 (diff) | |
| download | meta-virtualization-85f7376fa4f142117be9fd829994e79d5c418a6f.tar.gz | |
ceph: fix ceph-crash failed with /var/lib/ceph/crash/posted not found
root@intelx86-64: journalctl -xe
ceph-crash[854]: ERROR:_main_:directory /var/lib/ceph/crash/posted does
not exist; please create
Create the directory for both of systemd and sysvinit
Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | recipes-extended/ceph/ceph_14.2.3.bb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/recipes-extended/ceph/ceph_14.2.3.bb b/recipes-extended/ceph/ceph_14.2.3.bb index 722efe39..25a8ea27 100644 --- a/recipes-extended/ceph/ceph_14.2.3.bb +++ b/recipes-extended/ceph/ceph_14.2.3.bb | |||
| @@ -81,12 +81,36 @@ do_install_append () { | |||
| 81 | rm ${D}${systemd_unitdir}/system/ceph-fuse.target ${D}${systemd_unitdir}/system/ceph-fuse@.service | 81 | rm ${D}${systemd_unitdir}/system/ceph-fuse.target ${D}${systemd_unitdir}/system/ceph-fuse@.service |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | do_install_append_class-target () { | ||
| 85 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 86 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
| 87 | echo "d /var/lib/ceph/crash/posted 0755 root root - -" > ${D}${sysconfdir}/tmpfiles.d/ceph-placeholder.conf | ||
| 88 | fi | ||
| 89 | |||
| 90 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
| 91 | install -d ${D}${sysconfdir}/default/volatiles | ||
| 92 | echo "d root root 0755 /var/lib/ceph/crash/posted none" > ${D}${sysconfdir}/default/volatiles/99_ceph-placeholder | ||
| 93 | fi | ||
| 94 | } | ||
| 95 | |||
| 96 | pkg_postinst_${PN}() { | ||
| 97 | if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then | ||
| 98 | ${sysconfdir}/init.d/populate-volatile.sh update | ||
| 99 | fi | ||
| 100 | } | ||
| 101 | |||
| 84 | FILES_${PN} += "\ | 102 | FILES_${PN} += "\ |
| 85 | ${libdir}/rados-classes/*.so.* \ | 103 | ${libdir}/rados-classes/*.so.* \ |
| 86 | ${libdir}/ceph/compressor/*.so \ | 104 | ${libdir}/ceph/compressor/*.so \ |
| 87 | ${libdir}/rados-classes/*.so \ | 105 | ${libdir}/rados-classes/*.so \ |
| 88 | ${libdir}/ceph/*.so \ | 106 | ${libdir}/ceph/*.so \ |
| 89 | " | 107 | " |
| 108 | |||
| 109 | FILES_${PN} += " \ | ||
| 110 | /etc/tmpfiles.d/ceph-placeholder.conf \ | ||
| 111 | /etc/default/volatiles/99_ceph-placeholder \ | ||
| 112 | " | ||
| 113 | |||
| 90 | FILES_${PN}-python = "\ | 114 | FILES_${PN}-python = "\ |
| 91 | ${PYTHON_SITEPACKAGES_DIR}/* \ | 115 | ${PYTHON_SITEPACKAGES_DIR}/* \ |
| 92 | " | 116 | " |
