Skip to contentSkip to conversation

ceph 0.44+ and leveldb

DISCUSSION Laszlo Boszormenyi 3 participants 5 messages Apr 6, 2012 – Apr 11, 2012

lore
Share & tools
lore
#0 lore raw

Hi Ceph developers,

It seems you included leveldb in the source of Ceph. It has two serious problems.
First, security. Now leveldb can't be updated to a newer version, only with Ceph. Worst, security teams may not notice leveldb is embedded into Ceph; meaning the latter would remain unfixed and vulnerable. Second, as it doesn't contain fixes for various architectures that a separately packaged leveldb has, it can make Ceph fail to build on several architectures where leveldb is built otherwise.

See the Debian build list for example:
https://buildd.debian.org/status/package.php?p=ceph+leveldb&suite=sid

Also, leveldb doesn't work on all architectures. Making Ceph less
portable, which means less users can reach it.
See the build failures for ia64, mips, powerpc and s390[x]:
-- cut --
from ./db/builder.cc:7:
./port/atomic_pointer.h:133:2: error: #error Please implement AtomicPointer for this platform. make[5]: *** [builder.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [all] Error 2
make[5]: Leaving directory `/build/buildd-ceph_0.44.1-1-ia64-2UAFHZ/ceph-0.44.1/src/leveldb' -- cut --

Please re-evaluate the usage of leveldb.

Regards,
Laszlo/GCS

#1 lore raw

Hi Laszlo,

Quoted 7 lines · Laszlo Boszormenyi

Hi Ceph developers,

It seems you included leveldb in the source of Ceph. It has two serious problems.
First, security. Now leveldb can't be updated to a newer version, only with Ceph. Worst, security teams may not notice leveldb is embedded into Ceph; meaning the latter would remain unfixed and vulnerable.

The problem here is that libleveldb-dev is only packaged for wheezy and precise, and we'd like to build packages for squeeze and oneiric, and make the build experience easy for non-debian/ubuntu users. (I didn't check whether it was in rpm-based distros.)

I think the ideal situation would be for the debs to build against the debian package, and allow others an easy way to get the correct source (by bundling it in the ceph source tarball, or via a simple build script that does the equivalent of git submodule update --init).

Do you have a clear picture of how that would work?

Quoted 7 lines

Second, as it doesn't contain fixes for various architectures that a separately packaged leveldb has, it can make Ceph fail to build on several architectures where leveldb is built otherwise.

See the Debian build list for example:
https://buildd.debian.org/status/package.php?p=ceph+leveldb&suite=sid

Quoted 11 lines

Also, leveldb doesn't work on all architectures. Making Ceph less
portable, which means less users can reach it.
See the build failures for ia64, mips, powerpc and s390[x]:
-- cut --
from ./db/builder.cc:7:
./port/atomic_pointer.h:133:2: error: #error Please implement AtomicPointer for this platform. make[5]: *** [builder.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [all] Error 2
make[5]: Leaving directory `/build/buildd-ceph_0.44.1-1-ia64-2UAFHZ/ceph-0.44.1/src/leveldb' -- cut --

So the leveldb deb has all those fixes? That would make things easy for us.

sage

#2 lore raw
Quoted 4 lines · Sage Weil

The problem here is that libleveldb-dev is only packaged for wheezy and precise, and we'd like to build packages for squeeze and oneiric, and make the build experience easy for non-debian/ubuntu users. (I didn't check whether it was in rpm-based distros.)

It's not in Fedora (and probably not in RHEL/CentOS/ScientificLinux, etc). However, Fedora's policy is that bundled libraries aren't allowed, so we (as in Fedora) really should be packaging leveldb separately ourselves.

Quoted 6 lines

I think the ideal situation would be for the debs to build against the debian package, and allow others an easy way to get the correct source (by bundling it in the ceph source tarball, or via a simple build script that does the equivalent of git submodule update --init).

Do you have a clear picture of how that would work?

One common way would be to have a flag for ./configure, something like --use-system-leveldb, that would disable building the bundled leveldb.

I'm afraid I know next to nothing about autotools, so I'm not sure how exactly it's done, but I don't think it's particularly complex for someone who does know how to use autotools.

Jonathan

#3 lore raw

Hi Laszlo, Jonathan,

configure will now accept a --with-system-leveldb flag that will use the installed libleveldb. For Debian, we just need to update debian/rules and add libsnappy-dev and libleveldb-dev to the build depends.

I didn't this in ceph.git because I'm building packages for various older distros and don't want to backport those packages right now. Laszlo, can you carry that diff on your side when you submit upstream?

Jonathan, I'm not doing anything to the .spec file yet either, since presumably leveldb needs to be packaged first.

The change is in the next and master branches, so it'll be there for v0.45 (which I plan to release tomorrow).

sage

Quoted 27 lines · Jonathan Dieter
Quoted 4 lines · Sage Weil

The problem here is that libleveldb-dev is only packaged for wheezy and precise, and we'd like to build packages for squeeze and oneiric, and make the build experience easy for non-debian/ubuntu users. (I didn't check whether it was in rpm-based distros.)

It's not in Fedora (and probably not in RHEL/CentOS/ScientificLinux, etc). However, Fedora's policy is that bundled libraries aren't allowed, so we (as in Fedora) really should be packaging leveldb separately ourselves.

Quoted 6 lines

I think the ideal situation would be for the debs to build against the debian package, and allow others an easy way to get the correct source (by bundling it in the ceph source tarball, or via a simple build script that does the equivalent of git submodule update --init).

Do you have a clear picture of how that would work?

One common way would be to have a flag for ./configure, something like --use-system-leveldb, that would disable building the bundled leveldb.

I'm afraid I know next to nothing about autotools, so I'm not sure how exactly it's done, but I don't think it's particularly complex for someone who does know how to use autotools.

Jonathan

#4 lore raw
Quoted 11 lines · Sage Weil

Hi Laszlo, Jonathan,

configure will now accept a --with-system-leveldb flag that will use the installed libleveldb. For Debian, we just need to update debian/rules and add libsnappy-dev and libleveldb-dev to the build depends.

Jonathan, I'm not doing anything to the .spec file yet either, since presumably leveldb needs to be packaged first.

The change is in the next and master branches, so it'll be there for v0.45 (which I plan to release tomorrow).

Thanks much! I'll see what it will take to get leveldb into Fedora.

Jonathan