piraeusdatastore / piraeus

High Available Datastore for Kubernetes
https://piraeus.io/
Apache License 2.0
441 stars 50 forks source link

Fail to compile drbd module #30

Closed bratao closed 4 years ago

bratao commented 4 years ago

This is an Ubuntu 18.04 installation. During the init execution, the compilation fails

Linux 4.15.0-99-generic x86_64

* Enable dm_thin_pool

Module                  Size  Used by

dm_thin_pool           69632  0

* Compile and load drbd module by image "quay.io/piraeusdatastore/drbd9-bionic:v9.0.22"

:Need a git checkout to regenerate drbd/.drbd_git_revision

:make[1]: Entering directory '/tmp/pkg/drbd-9.0.22-1/drbd'



K    Calling toplevel makefile of kernel source tree, which I believe is in

.    KDIR=/lib/modules/4.15.0-99-generic/build



Vmake -C /lib/modules/4.15.0-99-generic/build   M=/tmp/pkg/drbd-9.0.22-1/drbd  modules

Farch/x86/Makefile:157: CONFIG_X86_X32 enabled but no binutils support

"  COMPAT  before_4_13_kernel_read

$  COMPAT  alloc_workqueue_takes_fmt

'  COMPAT  blkdev_issue_zeroout_discard

$  COMPAT  drbd_release_returns_void

  COMPAT  genl_policy_in_ops

#  COMPAT  have_SHASH_DESC_ON_STACK

!  COMPAT  have_WB_congested_enum

#  COMPAT  have_allow_kernel_signal

,  COMPAT  have_atomic_dec_if_positive_linux

   COMPAT  have_atomic_in_flight

%  COMPAT  have_bd_unlink_disk_holder

   COMPAT  have_bd_claim_by_disk

  COMPAT  have_bio_bi_bdev

  COMPAT  have_bio_bi_error

  COMPAT  have_bio_bi_opf

  COMPAT  have_bio_bi_status

  COMPAT  have_bio_clone_fast

  COMPAT  have_bio_flush

  COMPAT  have_bio_free

  COMPAT  have_bio_rw

  COMPAT  have_bio_op_shift

   COMPAT  have_bio_set_op_attrs

  COMPAT  have_bioset_init

"  COMPAT  have_blk_queue_flag_set

!  COMPAT  have_bioset_need_bvecs

!  COMPAT  have_blk_queue_plugged

!  COMPAT  have_blk_check_plugged

"  COMPAT  have_blkdev_get_by_path

'  COMPAT  have_bioset_create_front_pad

%  COMPAT  have_blk_queue_split_q_bio

%  COMPAT  have_blk_queue_write_cache

,  COMPAT  have_blk_queue_split_q_bio_bioset

4  COMPAT  have_generic_start_io_acct_q_rw_sect_part

  COMPAT  have_d_inode

$  COMPAT  have_blk_queue_merge_bvec

2  COMPAT  have_generic_start_io_acct_rw_sect_part

(  COMPAT  have_genl_family_parallel_ops

  COMPAT  have_ib_cq_init_attr

  COMPAT  have_file_inode

%  COMPAT  have_blk_qc_t_make_request

  COMPAT  have_prandom_u32

  COMPAT  have_nla_put_64bit

  COMPAT  have_idr_alloc

!  COMPAT  have_max_send_recv_sge

(  COMPAT  have_pointer_backing_dev_info

$  COMPAT  have_nla_parse_deprecated

  COMPAT  have_ib_get_dma_mr

  COMPAT  have_idr_is_empty

  COMPAT  have_req_nounmap

%  COMPAT  have_nla_nest_start_noflag

$  COMPAT  have_ratelimit_state_init

"  COMPAT  have_proc_create_single

  COMPAT  have_req_write_same

!  COMPAT  have_netlink_cb_portid

#  COMPAT  have_ktime_to_timespec64

  COMPAT  have_shash_desc_zero

%  COMPAT  have_security_netlink_recv

  COMPAT  have_refcount_inc

  COMPAT  have_kvfree

$  COMPAT  have_rb_augment_functions

  COMPAT  have_inode_lock

  COMPAT  have_signed_nla_put

#  COMPAT  have_req_op_write_zeroes

!  COMPAT  have_req_op_write_same

  COMPAT  have_req_noidle

  COMPAT  have_req_prio

  COMPAT  have_req_op_write

  COMPAT  have_req_hardbarrier

  COMPAT  have_simple_positive

  COMPAT  have_req_write

   COMPAT  have_struct_bvec_iter

  COMPAT  have_timer_setup

4  COMPAT  hlist_for_each_entry_has_three_parameters

#  COMPAT  ib_alloc_pd_has_2_params

  COMPAT  ib_device_has_ops

  COMPAT  have_time64_to_tm

'  COMPAT  have_struct_kernel_param_ops

!  COMPAT  have_void_make_request

'  COMPAT  ib_query_device_has_3_params

   COMPAT  kmap_atomic_page_only

$  COMPAT  ib_post_send_const_params

/  COMPAT  queue_limits_has_discard_zeroes_data

&  COMPAT  need_make_request_recursion

$  COMPAT  rdma_create_id_has_net_ns

/  COMPAT  sock_create_kern_has_five_parameters

$  COMPAT  sock_ops_returns_addr_len

7  CHK     /tmp/pkg/drbd-9.0.22-1/drbd/compat.4.15.18.h

7  UPD     /tmp/pkg/drbd-9.0.22-1/drbd/compat.4.15.18.h

/  CHK     /tmp/pkg/drbd-9.0.22-1/drbd/compat.h

/  UPD     /tmp/pkg/drbd-9.0.22-1/drbd/compat.h

M./drbd-kernel-compat/gen_compat_patch.sh: line 12: spatch: command not found

K./drbd-kernel-compat/gen_compat_patch.sh: line 45: hash: spatch: not found

>  INFO: no suitable spatch found; trying spatch-as-a-service;

(  be patient, may take up to 10 minutes

@  if it is in the server side cache it might only take a second

,  SPAAS    0b6a78a7dfa6879aa5fa45d03a5e4869

P  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

N                                 Dload  Upload   Total   Spent    Left  Speed

�
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 17660    0 13011    0  4649  78379  28006 --:--:-- --:--:-- --:--:--  103k

E  You can create a new .tgz including this pre-computed compat patch

�  by calling "make unpatch ; echo drbd-9.0.22-1/drbd/drbd-kernel-compat/cocci_cache/0b6a78a7dfa6879aa5fa45d03a5e4869/compat.patch >>.filelist ; make tgz"

  PATCH

patching file ./drbd_int.h

patching file drbd_bitmap.c

#patching file drbd_transport_tcp.c

patching file drbd_nla.c

patching file drbd_main.c

patching file drbd_debugfs.c

patching file drbd_nl.c

patching file drbd_req.c

patching file drbd_receiver.c

3patching file drbd-headers/linux/genl_magic_func.h

6  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_dax_pmem.o

5  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_debugfs.o

4  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_bitmap.o

2  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_proc.o

4  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_sender.o

6  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_receiver.o

1  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_req.o

4  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_actlog.o

2  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_main.o

2  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/lru_cache.o

5  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_strings.o

0  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_nl.o

6  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_interval.o

3  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_state.o

I  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd-kernel-compat/drbd_wrappers.o

1  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_nla.o

;  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_transport_tcp.o

3  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/kref_debug.o

7  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_transport.o

8  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_kref_debug.o

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

7  GEN     /tmp/pkg/drbd-9.0.22-1/drbd/drbd_buildtag.c

6  CC [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd_buildtag.o

Mobjdump: symbol lookup error: objdump: undefined symbol: cplus_mangle_opname

-  LD [M]  /tmp/pkg/drbd-9.0.22-1/drbd/drbd.o

7ld: symbol lookup error: ld: undefined symbol: xmemdup

Zscripts/Makefile.build:578: recipe for target '/tmp/pkg/drbd-9.0.22-1/drbd/drbd.o' failed

<make[3]: *** [/tmp/pkg/drbd-9.0.22-1/drbd/drbd.o] Error 127

;make[2]: *** [_module_/tmp/pkg/drbd-9.0.22-1/drbd] Error 2

NMakefile:1577: recipe for target '_module_/tmp/pkg/drbd-9.0.22-1/drbd' failed

0Makefile:125: recipe for target 'kbuild' failed

make[1]: *** [kbuild] Error 2

9make[1]: Leaving directory '/tmp/pkg/drbd-9.0.22-1/drbd'

make: *** [module] Error 2

0Makefile:125: recipe for target 'module' failed

make -C drbd install

:make[1]: Entering directory '/tmp/pkg/drbd-9.0.22-1/drbd'

FNo .drbd_kernelrelease found. Do you need to 'make' the module first?

make[1]: *** [install] Error 1

1Makefile:205: recipe for target 'install' failed

9make[1]: Leaving directory '/tmp/pkg/drbd-9.0.22-1/drbd'

1Makefile:129: recipe for target 'install' failed

make: *** [install] Error 2

amodprobe: FATAL: Module drbd_transport_tcp not found in directory /lib/modules/4.15.0-99-generic



#Could not load DRBD kernel modules

* Install local linstor cli

'/init/bin/linstor.sh' -> '/opt/piraeus/client/linstor'

'/etc/resolv.conf' -> '/opt/piraeus/client/resolv.conf'

'/usr/local/bin/linstor' -> '/opt/piraeus/client/linstor'
bratao commented 4 years ago

I reverted to the previous kernel (Linux 4.15.0-96-generic x86_64) and everything went good! https://ixnfo.com/en/how-to-roll-back-kernel-ubuntu.html

alexzhc commented 4 years ago

@bratao actually on ubuntu, you can install drbd by PPA https://launchpad.net/~linbit/+archive/ubuntu/linbit-drbd9-stack. Piraeus can skip drbd compiling when env DRBD_IMG_TAG: none