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

Backport: Ceph 14.2.6 #77605

Merged
merged 8 commits into from Jan 18, 2020
Merged

Backport: Ceph 14.2.6 #77605

merged 8 commits into from Jan 18, 2020

Conversation

srhb
Copy link
Contributor

@srhb srhb commented Jan 13, 2020

Motivation for this change

This backports necessary parts to get the critical 14.2.5 release into 19.09
Also backports 14.2.6 (bugfix, less important) while we're at it.

WIP while I test this

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

flokli and others added 4 commits January 13, 2020 08:30
This is required for programs using rocksdb and and typeinfo.

Otherwise, linking them fails with errors like this (that's ceph):

/nix/store/cg0k49h66nkdqx6ccwnqr0i4q0fnfznc-binutils-2.31.1/bin/ld: ../../lib/libos.a(RocksDBStore.cc.o):(.data.rel.ro._ZTIN12RocksDBStore14RocksWBHandlerE[_ZTIN12RocksDBStore14RocksWBHandlerE]+0x10): undefined reference to `typeinfo for rocksdb::WriteBatch::Handler'
/nix/store/cg0k49h66nkdqx6ccwnqr0i4q0fnfznc-binutils-2.31.1/bin/ld: ../../lib/libos.a(RocksDBStore.cc.o):(.data.rel.ro._ZTIN12RocksDBStore19MergeOperatorRouterE[_ZTIN12RocksDBStore19MergeOperatorRouterE]+0x10): undefined reference to `typeinfo for rocksdb::AssociativeMergeOperator'
/nix/store/cg0k49h66nkdqx6ccwnqr0i4q0fnfznc-binutils-2.31.1/bin/ld: ../../lib/libos.a(RocksDBStore.cc.o):(.data.rel.ro._ZTIN12RocksDBStore19MergeOperatorLinkerE[_ZTIN12RocksDBStore19MergeOperatorLinkerE]+0x10): undefined reference to `typeinfo for rocksdb::AssociativeMergeOperator'
/nix/store/cg0k49h66nkdqx6ccwnqr0i4q0fnfznc-binutils-2.31.1/bin/ld: ../../lib/libos.a(RocksDBStore.cc.o):(.data.rel.ro._ZTI17CephRocksdbLogger[_ZTI17CephRocksdbLogger]+0x10): undefined reference to `typeinfo for rocksdb::Logger'
/nix/store/cg0k49h66nkdqx6ccwnqr0i4q0fnfznc-binutils-2.31.1/bin/ld: ../../lib/libos.a(BlueRocksEnv.cc.o):(.data.rel.ro._ZTI12BlueRocksEnv[_ZTI12BlueRocksEnv]+0x10): undefined reference to `typeinfo for rocksdb::EnvWrapper'
/nix/store/cg0k49h66nkdqx6ccwnqr0i4q0fnfznc-binutils-2.31.1/bin/ld: ../../lib/libos.a(BlueRocksEnv.cc.o):(.data.rel.ro._ZTI23BlueRocksSequentialFile[_ZTI23BlueRocksSequentialFile]+0x10): undefined reference to `typeinfo for rocksdb::SequentialFile'
/nix/store/cg0k49h66nkdqx6ccwnqr0i4q0fnfznc-binutils-2.31.1/bin/ld: ../../lib/libos.a(BlueRocksEnv.cc.o):(.data.rel.ro._ZTI25BlueRocksRandomAccessFile[_ZTI25BlueRocksRandomAccessFile]+0x10): undefined reference to `typeinfo for rocksdb::RandomAccessFile'
/nix/store/cg0k49h66nkdqx6ccwnqr0i4q0fnfznc-binutils-2.31.1/bin/ld: ../../lib/libos.a(BlueRocksEnv.cc.o):(.data.rel.ro._ZTI21BlueRocksWritableFile[_ZTI21BlueRocksWritableFile]+0x10): undefined reference to `typeinfo for rocksdb::WritableFile'
/nix/store/cg0k49h66nkdqx6ccwnqr0i4q0fnfznc-binutils-2.31.1/bin/ld: ../../lib/libos.a(BlueRocksEnv.cc.o):(.data.rel.ro._ZTI17BlueRocksFileLock[_ZTI17BlueRocksFileLock]+0x10): undefined reference to `typeinfo for rocksdb::FileLock'

(cherry picked from commit 781d85c)
correct platforms. ceph currently doesn't build on aarch64-linux. So
let's not lie in meta.platforms.

ceph: fix multiple output
We currently just move $out/share/ceph/mgr to
$lib/lib/ceph, and then remove all references to $out with a find
command.

I checked $out, the only reference to $out is in
$lib/lib/ceph/libceph-common.so.0, coming from src/common/options.cc:
https://github.com/ceph/ceph/blob/master/src/common/options.cc#L5050:

>  Option("mgr_module_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
>  .set_default(CEPH_DATADIR "/mgr")
>  .add_service("mgr")
>  .set_description("Filesystem path to manager modules."),

Just removing the reference might break some behaviour - it should point
to $lib/ceph/mgr instead.

We can fix this in a much more elegant fashion by just passing a custom
CMAKE_INSTALL_DATADIR to the build system.

ceph: fix outdated Boost::python substitutions

Instead of substituting in CMakeLists.txt files, one now needs to set
MGR_PYTHON_VERSION.

ceph: clean up PYTHONPATH wrapping

Set `pythonPath` instead of exporting PYTHONPATH.

Use `toPythonPath` to construct the PYTHONPATH where we need manual
wrapping. There's no ceph-volume, only ceph-mgr.

ceph: set doCheck = false explicitly

and describe why.

ceph: patch more shebangs

ceph: use system-provided gtest and rocksdb
(cherry picked from commit 05590b3)
(cherry picked from commit c373fc3)
(cherry picked from commit fe4d213)
lejonet and others added 3 commits January 13, 2020 20:32
Rename the old ceph test to ceph-single-node and add a new test
ceph-multi-node. The ceph-single-node represents a dev cluster whereas
ceph-multi-node is closer to a prod cluster.

(cherry picked from commit 9165201)
@srhb
Copy link
Contributor Author

srhb commented Jan 13, 2020

OK, I brought the minimal amount of test cherry picks into this branch in order to get things passing. i also hand-crafted a equivalent fixup for 3 osds required by this version of Ceph, but for the perl framework.

Copy link
Contributor

@lejonet lejonet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried both the single and multi-node tests on my machine with passing results. I also deployed this branch onto my experimental ceph cluster and did basic functional tests without any problems. I don't see any problems with merging this.

@nh2 nh2 merged commit 63a3564 into NixOS:release-19.09 Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants