GithubHelp home page GithubHelp logo

linbit / drbd-utils Goto Github PK

View Code? Open in Web Editor NEW
76.0 19.0 46.0 6.64 MB

DRBD userspace utilities (for 9.x, 8.4, 8.3)

License: GNU General Public License v2.0

Makefile 1.32% Shell 7.69% M4 1.13% Perl 0.44% C++ 41.54% C 47.80% Dockerfile 0.08%
drbd linux

drbd-utils's Introduction

DRBD Utils

This repository contains the user space utilities for DRBD.

DRBD, developed by LINBIT, is a software that allows RAID 1 functionality over TCP/IP and RDMA for GNU/Linux. DRBD is a block device which is designed to build high availability clusters and software defined storage by providing a virtual shared device which keeps disks in nodes synchronised using TCP/IP or RDMA. This simulates RAID 1 but avoids the use of uncommon hardware (shared SCSI buses or Fibre Channel).

Using DRBD

Please read the user-guide provided at docs.linbit.com.

Support

For further products and professional support, please contact us.

Contributing

Development is coordinated via mailing lists. Currently, we do not intend to use github issue tracking/github PRs.

Releases

Releases generated by git tags on github are snapshots of the git repository at the given time. You most likely do not want to use these. They might lack things such as generated man pages, the configure script, and other generated files. If you want to build from a tarball, use the ones provided by us.

drbd-utils's People

Contributors

andreas-gruenbacher avatar apoikos avatar brhellman avatar bubble75 avatar chrboe avatar cvubrugier avatar damenly avatar dvance avatar joelcolledge avatar johannesthoma avatar kraj avatar lge avatar micha137 avatar nick-wang avatar osamu-sayama-sti avatar osayama avatar philipp-reisner avatar phmarek avatar raltnoeder avatar rasto avatar rck avatar royger avatar rp- avatar saml64 avatar savar avatar simon3z avatar thesamesam avatar tux2bsd avatar wanzenbug avatar ycongal-smile avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drbd-utils's Issues

Build drbd-utils without sudo privilege

Dear DRBD comminity,

I am planning to use drbd in my project and I want to compile and build it from drbd-utils repository. I use Ubuntu 20.04 as an environment. While processing make install command, it creates symbolic links and directories into root directory which is also defined as destination directory in Makefile. Is there any way to change destination directory (DESTDIR)? I want to use it without any sudo privilege.

caglar@caglar-VirtualBox:~/Documents/drbd-utils-9.22.0$ make install
make[1]: Entering directory '/home/caglar/Documents/drbd-utils-9.22.0/user/shared'
make[1]: Leaving directory '/home/caglar/Documents/drbd-utils-9.22.0/user/shared'
make[1]: Entering directory '/home/caglar/Documents/drbd-utils-9.22.0/user/v9'
install -d //home/caglar/Documents/drbd-utils/sbin
install -d //home/caglar/Documents/drbd-utils/var/lib/drbd
install -d //home/caglar/Documents/drbd-utils/var/run/drbd
install -d //home/caglar/Documents/drbd-utils/var/lock
if getent group haclient > /dev/null 2> /dev/null ; then	\
	install -g haclient -m 4750 drbdsetup //home/caglar/Documents/drbd-utils/sbin ;	\
	install -g haclient -m 4750 drbdmeta //home/caglar/Documents/drbd-utils/sbin ;	\
	install -m 755 drbdadm //home/caglar/Documents/drbd-utils/sbin ;		\
else								\
	install -m 755 drbdsetup //home/caglar/Documents/drbd-utils/sbin ;		\
	install -m 755 drbdmeta //home/caglar/Documents/drbd-utils/sbin ;		\
	install -m 755 drbdadm //home/caglar/Documents/drbd-utils/sbin ;		\
fi
if test -d //sbin && \
 ! test //sbin -ef //home/caglar/Documents/drbd-utils/sbin ; then		\
	ln -sf /home/caglar/Documents/drbd-utils/sbin/drbdsetup //sbin ;		\
	ln -sf /home/caglar/Documents/drbd-utils/sbin/drbdmeta //sbin ;		\
	ln -sf /home/caglar/Documents/drbd-utils/sbin/drbdadm //sbin ;		\
fi
ln: failed to create symbolic link '//sbin/drbdsetup': Permission denied
ln: failed to create symbolic link '//sbin/drbdmeta': Permission denied
ln: failed to create symbolic link '//sbin/drbdadm': Permission denied
Makefile:144: recipe for target 'install' failed
make[1]: *** [install] Error 1
make[1]: Leaving directory '/home/caglar/Documents/drbd-utils-9.22.0/user/v9'
Makefile:155: recipe for target 'install-tools' failed
make: *** [install-tools] Error 2

9.25.0: build errors

In file included from DrbdMonConsts.cpp:1:
./DrbdMonConsts.h:9:10: error: use of enum ‘run_action_type’ without previous declaration
    9 |     enum run_action_type : uint8_t
      |          ^~~~~~~~~~~~~~~
./DrbdMonConsts.h:9:28: error: ‘uint8_t’ was not declared in this scope
    9 |     enum run_action_type : uint8_t
      |                            ^~~~~~~
./DrbdMonConsts.h:5:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
    4 | #include <string>
  +++ |+#include <cstdint>
    5 |
./DrbdMonConsts.h:10:5: error: default member initializer for unnamed bit-field
   10 |     {
      |     ^
make[1]: *** [<builtin>: DrbdMonConsts.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/e/packages/drbd-utils/src/drbd-utils-9.25.0/user/drbdmon'
make: *** [Makefile:90: tools] Error 2

Build worked fine for 9.24.0.

gcc (GCC) 13.2.1 20230801
Do you need additional information?

crm-unfence-peer.9.sh "cannot parse input" when trying to unfence resource

DRBDADM_BUILDTAG=GIT-hash:\ 9f2aa37\ build\ by\ [email protected],\ 2021-11-14\ 18:45:36
DRBDADM_API_VERSION=2
DRBD_KERNEL_VERSION_CODE=0x090104
DRBD_KERNEL_VERSION=9.1.4
DRBDADM_VERSION_CODE=0x091300
DRBDADM_VERSION=9.19.0

when a resource location constraint has been placed for a resource on a node, if at some point drbd try to unfence the resource, it cannot , and drbd resource cannot be promoted anymore on the node ,

error seems to be the call to sudo cibadmin --modify --allow-create -o constraints -X "" (called from create_or_modify_constraint)
(note the empty data "" at the end). Indeed the new_constraint value in the bash script does not seem to be ever set,

RPM build is broken

Hi,

This commit c3ac818 removed the RPM targets in the Makefile.

As such, the instructions in the docs to run make rpm are no longer valid for the latest versions. How should RPMs be built?

Thanks,

DRBD selinux policy doesn't work when attempting to create the metadata storage

With Selinux enabled on my systems I load the drbd-selinux rpm. But when i attempt to create the metadata file using drbdadm create-md it runs into selinux permission denies for accessing the disk where the metadata storage is written to. This issue also happens when you try to delete the metadata storage. I am unsure if this is an oversight in the selinux policy or if there is something else that I am missing with the drbd-utils.

9.2.6 : make test : failure

Hello,

I have been exploring building out the drbd stack (kernal,reactor and utils) on debian bookworm.

I have had no issues, except with the drbd-utils -- specifically with make test

Testing file events2-all-create-change.test
#13	cat events2-all-create-change.msgs | drbdsetup_events2_instrumented; echo $?
#14	cat events2-all-create-change.msgs | drbdsetup_events2_instrumented --diff; echo $?
#15	cat events2-all-create-change.msgs | drbdsetup_events2_instrumented --statistics; echo $?
#16	cat events2-all-create-change.msgs | drbdsetup_events2_instrumented --full; echo $?
#17	cat events2-all-create-change.msgs | drbdsetup_events2_instrumented --color | cat -v; echo $?
#18	cat events2-all-create-change.msgs | drbdsetup_events2_instrumented --timestamps | sed 's/....-..-..T..:..:.........+..:../TIME/'; echo $?
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[FAILED #18, line 76] cat events2-all-create-change.msgs | drbdsetup_events2_instrumented --timestamps | sed 's/....-..-..T..:..:.........+..:../TIME/'; echo $?
@@ -1,14 +1,14 @@

I have tried a few different configure params to see if anything helps, but nothing seems to avoid this error.

Anyone have any ideas, what is casuing the failed test, or even better how to correct the issue?

Version 9.2.6 (current release), also fails on 9.2.5 (havent checked any other releases)
Debian Bookworm

9.19.1: Build missing v8 header

I'm trying to build 9.19.1, however it's failing on not finding a header in the v8 directory:

drbd-utils-9.19.1 $ ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfd
ir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/drbd-utils-9.19.1 --htmldir=/usr/share/doc/drbd-utils-                                                                                                     
9.19.1/html --libdir=/usr/lib64 --localstatedir=/var --with-bashcompletion --with-distro=gentoo --with-prebuiltman --without-rgmanager --without-pacemaker --with-udev --without-xen                                
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc                                                                                                                                                     
checking whether the C compiler works... yes                                                                                                                                                                        
checking for C compiler default output file name... a.out                                                                                                                                                           
checking for suffix of executables...                                                                     
checking whether we are cross compiling... no                                                                                                                                                                       
checking for suffix of object files... o                                                                  
checking whether the compiler supports GNU C... yes                                                       
checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes                                                                                                                                                          
checking for x86_64-pc-linux-gnu-gcc option to enable C11 features... none needed                                                                                                                                   
checking for getentropy... yes                                                                                                                                                                                      
checking for gethostbyname_r... yes                                                                                                                                                                                 
checking for __free_fn_t... yes                                                                           
checking for x86_64-pc-linux-gnu-pkg-config... /usr/bin/x86_64-pc-linux-gnu-pkg-config                                                                                                                              
checking pkg-config is at least version 0.9.0... yes                                                      
configure: Could not detect systemd unit directory                                                        
Using systemd unit directory:                                                                             
Using udev rules directory: /lib/udev                                                                                                                                                                               
checking for x86_64-pc-linux-gnu-gcc... (cached) x86_64-pc-linux-gnu-gcc                                                                                                                                            
checking whether the compiler supports GNU C... (cached) yes                                              
checking whether x86_64-pc-linux-gnu-gcc accepts -g... (cached) yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... (cached) yes                                                                                                                                                 
checking for x86_64-pc-linux-gnu-gcc option to enable C11 features... (cached) none needed                                                                                                                          
checking whether ln -s works... yes                                                                                                     
checking for sed... /bin/sed                                                                                                            
checking for grep... /bin/grep                                                                                                                                                                                      
checking for flex... /usr/bin/flex                                                                                                      
checking for rpmbuild... no                                 
checking for xsltproc... /usr/bin/xsltproc                                                                                              
checking for clitest... no                                    
checking for tar... /bin/tar                                                                                                            
checking for git... /usr/bin/git                                                                                                                                                                                    
checking for po4a-translate... /usr/bin/po4a-translate                                                                                                                                                              
checking for po4a-gettextize... /usr/bin/po4a-gettextize                                                                                                                                                            
checking for dpkg-buildpackage... /usr/bin/dpkg-buildpackage                                                                                                                                                        
checking for udevadm... /bin/udevadm                                                                                                                                                                                
checking for udevinfo... false                                                                                                                                                                                      
checking for x86_64-pc-linux-gnu-g++... x86_64-pc-linux-gnu-g++                                                                         
checking whether the compiler supports GNU C++... yes                                                                                   
checking whether x86_64-pc-linux-gnu-g++ accepts -g... yes                                                                              
checking for x86_64-pc-linux-gnu-g++ option to enable C++11 features... none needed                                                                                                                                 
checking whether x86_64-pc-linux-gnu-g++ supports C++11 features by default... yes                                                                                                                                  
checking for clock_gettime, timer_create, timer_settime, timer_delete in -lrt... yes                                                                                                                                
configure: WARNING: No rpmbuild found, building RPM packages is disabled.                                                                                                                                           
configure: WARNING: Cannot run tests without clitest, disabling test target.                                                                                                                                        
checking for stdio.h... yes                                                                                                             
checking for stdlib.h... yes                                                                                                                                                                                        
checking for string.h... yes                                                                                                            
checking for inttypes.h... yes                                                                                                                                                                                      
checking for stdint.h... yes                                        
checking for strings.h... yes                                                                                                                                                                                       
checking for sys/stat.h... yes                                                                                                          
checking for sys/types.h... yes                                                                                                                                                                                     
checking for unistd.h... yes                             
checking for linux/genetlink.h... yes                                                                                                   
checking for /etc/redhat-release... no                                                                                                  
checking for /etc/debian_version... no                          
checking for /etc/SuSE-release... no                                                                                                                                                                                
configure: WARNING: Unable to determine what distribution we are running on. Distribution-specific features will be disabled.                                                                                       
configure: creating ./config.status                                                                                                     
config.status: creating Makefile                                                                                                        
config.status: creating user/shared/Makefile                                                                                            
config.status: creating user/v9/Makefile                                                                                                
config.status: creating user/v83/Makefile                                                                                                                                                                           
config.status: creating user/v84/Makefile                                                                                               
config.status: creating scripts/Makefile                                                                                                                                                                            
config.status: creating documentation/v83/Makefile                                                                                                                                                                  
config.status: creating scripts/drbd.rules                                                                                              
config.status: creating user/windrbd/Makefile       
config.status: creating user/drbdmon/Makefile                                                                                                                                                                       
config.status: creating documentation/common/Makefile_v84_com                                                                                                                                                       
config.status: creating documentation/common/Makefile_v9_com                                                                            
config.status: creating user/shared/config.h
drbd-utils-9.19.1 $ make                                                                                                                                                              
make[1]: Entering directory '/home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared'                                                                                                                                  
flex -s -odrbdmeta_scanner.c drbdmeta_scanner.fl                                                          
./drbd_buildtag.sh drbd_buildtag.h                                                                        
+ calldir=/home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared                                            
+++ dirname ./drbd_buildtag.sh                                                                                                                                                                                      
++ cd .                                                                                                                                                                                                             
++ pwd -P                                                                                                                                                                                                           
+ cd /home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared                                                                                                                                                           
+ [[ drbd_buildtag.h =~ drbd_buildtag\.h$ ]]                                                                                                                                                                        
+ drbd_buildtag_h /home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.h                                                                                                                              
+ local out=/home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.h                                                                                                                                    
+ set -e                                                                                                  
+ exec                                                                                                                                                                                                              
+ echo -e '/* automatically generated. DO NOT EDIT. */'                                                   
+ test -e ../../.git                                                                                      
+ test -e /home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.h                                                                                                                                      
+ grep GITHASH /home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.h                                                                                                                                 
+ grep GITDIFF /home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.h                                                                                                                                 
+ mv -f /home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.h.new /home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.h                                                               
+ exit 0                                                                                                  
./drbd_buildtag.sh drbd_buildtag.c                                                                                                                                                                                  
+ calldir=/home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared                                            
+++ dirname ./drbd_buildtag.sh                                                                            
++ cd .                                                                                                   
++ pwd -P                                                                                                                                                                                                           
+ cd /home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared                                                                                                                                                           
+ [[ drbd_buildtag.c =~ drbd_buildtag\.h$ ]]                                                              
+ [[ drbd_buildtag.c =~ drbd_buildtag\.c$ ]]
+ drbd_buildtag_c /home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.c                                                                                                                              
+ local out=/home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.c                                                        
+ set -e                                                                                                                                
+ exec                                                                                                                                                                                                              
+ echo -e '/* automatically generated. DO NOT EDIT. */'                                                                                 
+ echo -e '#include "drbd_buildtag.h"'                      
+ echo -e 'const char *drbd_buildtag(void)\n{'                                                                                          
+ echo -e '\treturn "GIT-hash: " GITHASH GITDIFF'             
+ '[' -z '' ']'                                                                                                                         
++ date '+%F %T'                                                                                                                                                                                                    
+ buildinfo='build by buildd@localhost, 2021-12-01 14:48:18'                                                                                                                                                      
+ echo -e '\t\t" build by buildd@localhost, 2021-12-01 14:48:18";\n}'                                                                                                                                             
+ mv -f /home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.c.new /home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.c                                                               
+ exit 0                                                                                                                                                                                                            
make[1]: Leaving directory '/home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared'                                                                                                                                   
make[1]: Entering directory '/home/buildd/tmp-drbd/drbd-utils-9.19.1/user/v9'                                                          
../shared/drbdmeta_linux.c:59:10: fatal error: drbd_strings.h: No such file or directory                                                
   59 | #include "drbd_strings.h"                                                                                                       
      |          ^~~~~~~~~~~~~~~~                                                                                                                                                                                   
compilation terminated.                                                                                                                                                                                             
../shared/shared_tool.c:33:10: fatal error: linux/drbd.h: No such file or directory                                                                                                                                 
   33 | #include "linux/drbd.h"                                                                                                                                                                                     
      |          ^~~~~~~~~~~~~~                                                                                                                                                                                     
compilation terminated.                                                                                                                 
../shared/drbdmeta.c:60:10: fatal error: drbd_strings.h: No such file or directory                                                                                                                                  
   60 | #include "drbd_strings.h"                                                                                                       
      |          ^~~~~~~~~~~~~~~~                                                                                                                                                                                   
compilation terminated.                                             
drbdsetup_events2.c:37:10: fatal error: drbd_protocol.h: No such file or directory                                                                                                                                  
   37 | #include "drbd_protocol.h"                                                                                                      
      |          ^~~~~~~~~~~~~~~~~                                                                                                                                                                                  
compilation terminated.                                  
config_flags.c:10:10: fatal error: linux/drbd.h: No such file or directory                                                              
   10 | #include "linux/drbd.h"                                                                                                         
      |          ^~~~~~~~~~~~~~                                 
compilation terminated.                                                                                                                                                                                             
drbdsetup.c:72:10: fatal error: drbd_strings.h: No such file or directory                                                                                                                                           
   72 | #include "drbd_strings.h"                                                                                                       
      |          ^~~~~~~~~~~~~~~~                                                                                                       
compilation terminated.                                                                                                                 
drbdadm_usage_cnt.c:46:10: fatal error: linux/drbd.h: No such file or directory                                                         
   46 | #include "linux/drbd.h"         /* only use DRBD_MAGIC from here! */                                                                                                                                        
      |          ^~~~~~~~~~~~~~                                                                                                         
compilation terminated.                                                                                                                                                                                             
drbdadm_main.c:53:10: fatal error: linux/drbd.h: No such file or directory                                                                                                                                          
   53 | #include "linux/drbd.h"                                                                                                         
      |          ^~~~~~~~~~~~~~                     
compilation terminated.                                                                                                                                                                                             
drbdadm_parser.c:41:10: fatal error: linux/drbd.h: No such file or directory                                                                                                                                        
   41 | #include "linux/drbd.h"                                                                                                         
      |          ^~~~~~~~~~~~~~                                                                           
compilation terminated.                                                                                   
flex -s -odrbdadm_scanner.c drbdadm_scanner.fl                                                                                                                                                                      
../shared/drbdmeta_linux.c:59:10: fatal error: drbd_strings.h: No such file or directory                                                                                                                            
   59 | #include "drbd_strings.h"                                                                         
      |          ^~~~~~~~~~~~~~~~                                                                         
compilation terminated.                                                                                   
../shared/shared_tool.c:33:10: fatal error: linux/drbd.h: No such file or directory                                                                                                                                 
   33 | #include "linux/drbd.h"                                                                                                                                                                                     
      |          ^~~~~~~~~~~~~~                                                                                                                                                                                     
compilation terminated.                                                                                                                                                                                             
../shared/drbdmeta.c:60:10: fatal error: drbd_strings.h: No such file or directory                                                                                                                                  
   60 | #include "drbd_strings.h"                                                                                                                                                                                   
      |          ^~~~~~~~~~~~~~~~                                                                                                                                                                                   
compilation terminated.                                                                                   
drbdsetup_events2.c:37:10: fatal error: drbd_protocol.h: No such file or directory                                                                                                                                  
   37 | #include "drbd_protocol.h"                                                                        
      |          ^~~~~~~~~~~~~~~~~                                                                        
compilation terminated.                                                                                                                                                                                             
config_flags.c:10:10: fatal error: linux/drbd.h: No such file or directory                                                                                                                                          
   10 | #include "linux/drbd.h"                                                                                                                                                                                     
      |          ^~~~~~~~~~~~~~                                                                                                                                                                                     
compilation terminated.                                                                                   
drbdsetup.c:72:10: fatal error: drbd_strings.h: No such file or directory                                                                                                                                           
   72 | #include "drbd_strings.h"                                                                         
      |          ^~~~~~~~~~~~~~~~                                                                         
compilation terminated.                                                                                   
drbdadm_usage_cnt.c:46:10: fatal error: linux/drbd.h: No such file or directory                                                                                                                                     
   46 | #include "linux/drbd.h"         /* only use DRBD_MAGIC from here! */                                                                                                                                        
      |          ^~~~~~~~~~~~~~                                                                           
compilation terminated.
drbdadm_main.c:53:10: fatal error: linux/drbd.h: No such file or directory                                                                                                                                          
   53 | #include "linux/drbd.h"                                     
      |          ^~~~~~~~~~~~~~                                                                                                                                                                                     
compilation terminated.                                                                                                                 
drbdadm_parser.c:41:10: fatal error: linux/drbd.h: No such file or directory                                                                                                                                        
   41 | #include "linux/drbd.h"                             
      |          ^~~~~~~~~~~~~~                                                                                                         
compilation terminated.                                                                                                                 
flex -s -odrbdadm_scanner.c drbdadm_scanner.fl                  
../shared/drbdmeta_linux.c:59:10: fatal error: drbd_strings.h: No such file or directory                                                                                                                            
   59 | #include "drbd_strings.h"                                                                                                                                                                                   
      |          ^~~~~~~~~~~~~~~~                                                                                                       
compilation terminated.                                                                                                                 
../shared/shared_tool.c:33:10: fatal error: linux/drbd.h: No such file or directory                                                     
   33 | #include "linux/drbd.h"                                                                                                         
      |          ^~~~~~~~~~~~~~                                                                                                                                                                                     
compilation terminated.                                                                                                                 
../shared/drbdmeta.c:60:10: fatal error: drbd_strings.h: No such file or directory                                                                                                                                  
   60 | #include "drbd_strings.h"                                                                                                                                                                                   
      |          ^~~~~~~~~~~~~~~~                                                                                                       
compilation terminated.                             
drbdsetup_events2.c:37:10: fatal error: drbd_protocol.h: No such file or directory                                                                                                                                  
   37 | #include "drbd_protocol.h"                                                                                                                                                                                  
      |          ^~~~~~~~~~~~~~~~~                                                                                                      
compilation terminated.                                                                                                                                                                                             
config_flags.c:10:10: fatal error: linux/drbd.h: No such file or directory                                                                                                                                          
   10 | #include "linux/drbd.h"                                                                                                                                                                                     
      |          ^~~~~~~~~~~~~~                                                                                                                                                                                     
compilation terminated.                                                                                   
drbdsetup.c:72:10: fatal error: drbd_strings.h: No such file or directory                                                                                                                                           
   72 | #include "drbd_strings.h"                                                                         
      |          ^~~~~~~~~~~~~~~~                                                                                                                                                                                   
compilation terminated.                                                                                                                                                                                             
drbdadm_usage_cnt.c:46:10: fatal error: linux/drbd.h: No such file or directory                                                                                                                                     
   46 | #include "linux/drbd.h"         /* only use DRBD_MAGIC from here! */                                                                                                                                        
      |          ^~~~~~~~~~~~~~                                                                                                                                                                                     
compilation terminated.                                                                                                                                                                                             
drbdadm_main.c:53:10: fatal error: linux/drbd.h: No such file or directory                                                                                                                                          
   53 | #include "linux/drbd.h"                                                                                                                                                                                     
      |          ^~~~~~~~~~~~~~                                                                                                                                                                                     
compilation terminated.                                                                                   
drbdadm_parser.c:41:10: fatal error: linux/drbd.h: No such file or directory                                                                                                                                        
   41 | #include "linux/drbd.h"                                                                                                                                                                                     
      |          ^~~~~~~~~~~~~~                                                                                                                                                                                     
compilation terminated.                                                                                                                                                                                             
x86_64-pc-linux-gnu-gcc -g -O2 -Wall -I../../drbd-headers -I.. -I. -I../shared    -c -o drbdadm_scanner.o drbdadm_scanner.c                                                                                         
x86_64-pc-linux-gnu-gcc -g -O2 -Wall -I../../drbd-headers -I.. -I. -I../shared    -c -o drbdadm_parser.o drbdadm_parser.c                                                                                           
drbdadm_parser.c:41:10: fatal error: linux/drbd.h: No such file or directory                                                                                                                                        
   41 | #include "linux/drbd.h"                                                                                                                                                                                     
      |          ^~~~~~~~~~~~~~                                                                                                                                                                                     
compilation terminated.                                                                                   
make[1]: *** [<builtin>: drbdadm_parser.o] Error 1                                                                                                                                                                  
make[1]: Leaving directory '/home/buildd/tmp-drbd/drbd-utils-9.19.1/user/v9'                                                                                                                                       
make: *** [Makefile:90: tools] Error 2
 $ find . -name drbd_strings.h
./user/v84/drbd_strings.h
$ find . -name drbd.h
./user/v83/linux/drbd.h
./user/v84/linux/drbd.h

I can't find a reference to drbd_protocol.h.

snapshot-resync-target-lvm.sh cannot create a thin snapshot

In snapshot-resync-target-lvm.sh, the snapshot is created like so:

lvcreate -s -n $SNAP_NAME -L ${SNAP_SIZE}k $LVC_OPTIONS $VG_NAME/$LV_NAME

Because of the -L option, the resulting snapshot will be a "thick" snapshot, even if the volume in question
is a thin volume. Is there some reason that it is done this way with no option for creating a thin
snapshot by omitting this argument?

Perhaps I'm missing something important, but it seems to me that there should be an option
to this script to omit the -L argument so that a thin snapshot could be used instead.

Regards,
Andy

DRBD disk fails to mount in case of lost connection

dear DRBD community,

i have been struggling in the past days when debugging a simple scenario whereby i have 2 DRBD nodes connected in simple master-slave (single primary) mode, with protocol C.

The two nodes use heartbeat together with DRBD.

Failovers and disk mounting and replication works fine in all "controlled failover" scenarios, meaning when either heartbeat is stopped on one of the two machines or one node is rebboted / killed.

The problem is when one of the machines suddenly loses the connection (ethernet cable is unplagged), in which scenario Heartbeat starts corretly on the other node, which is promoted as Primary/Unknown but then when Heartbeat tries to mount the drbd disk using this command: mount -t jfs /dev/drbd0 /my_folder it fails with this strange error:


ResourceManager(default)[22908]:        2022/05/20_17:16:01 debug: Starting /etc/ha.d/resource.d/Filesystem /dev/drbd0 /my_folder jfs noatime start
2022/05/20_17:16:01 INFO: Running start for /dev/drbd0 on /my_folder
Filesystem(Filesystem_/dev/drbd0)[23231]:       2022/05/20_17:16:01 INFO: Running start for /dev/drbd0 on /my_folder
mount: wrong fs type, bad option, bad superblock on /dev/drbd0,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
2022/05/20_17:16:01 ERROR: Couldn't mount filesystem /dev/drbd0 on /my_folder
Filesystem(Filesystem_/dev/drbd0)[23231]:       2022/05/20_17:16:01 ERROR: Couldn't mount filesystem /dev/drbd0 on /my_folder

Again, i have correctly partitioned and formatted disks/filesystems, and the DRBD + HA setup works fine in all other cases.

Is this a knownllimitation of DRBD or is there any other configuration i could test?

P.S. i am using drbd8-utils on a debian8, 32bits machine. Both nodes are identical (same image + hardware).

make doc fails due to external entity docbook.xml

I am experiencing issues when building the docs for drbd-utils-9.21.0.

The problems originate from commands like

/usr/bin/xsltproc \
--xinclude --stringparam variablelist.term.break.after 1 \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl [email protected]

which gives issues like

warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/other.xsl"
compilation error: file http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl line 33 element include
xsl:include : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/other.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/block.xsl"
compilation error: file http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl line 35 element include
xsl:include : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/block.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/inline.xsl"
compilation error: file http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl line 36 element include
xsl:include : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/inline.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/synop.xsl"
compilation error: file http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl line 37 element include
xsl:include : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/synop.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/lists.xsl"
compilation error: file http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl line 38 element include
xsl:include : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/lists.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/endnotes.xsl"
compilation error: file http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl line 39 element include
xsl:include : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/endnotes.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/table.xsl"
compilation error: file http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl line 40 element include
xsl:include : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/table.xsl
make[1]: *** [[email protected]] Error 5
make[1]: Leaving directory `<...>/drbd-utils-9.21.0/documentation/v9'
make: *** [doc] Error 2

I saw this happening at various stages for the MANPAGES files in documentation/v9/Makefile, i.e.

MANPAGES   = drbdsetup.8 drbd.conf.5 drbd.8 drbdadm.8 drbdmeta.8
MANPAGES += ocf_linbit_drbd.7
MANPAGES += ocf_linbit_drbd-attr.7
ifeq ($(WITH_DRBDMON), yes)
MANPAGES += drbdmon.8
endif

Similarily,

cannot parse http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
make[1]: *** [[email protected]] Error 4

due to the ADOC_MANPAGES files,

ADOC_MANPAGES :=
ADOC_MANPAGES += [email protected]
ADOC_MANPAGES += [email protected]
ADOC_MANPAGES += [email protected]
ADOC_MANPAGES += [email protected]
ADOC_MANPAGES += [email protected]
ADOC_MANPAGES += drbd.service.adoc
ADOC_MANPAGES += [email protected]
ADOC_MANPAGES += [email protected]
ADOC_MANPAGES += [email protected]

It sometimes advanced to the next MANPAGES file when just running make doc but then failed with the same issues.
My guess is that http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl drops connection after to many tries from the same IP.

A workaround I found working is to manually install docbook-style-xsl and change STYLESHEET_PREFIX in documentation/common/Makefile_v9_com pointing to the local installation

#STYLESHEET_PREFIX ?= http://docbook.sourceforge.net/release/xsl/current
STYLESHEET_PREFIX ?= /usr/share/sgml/docbook/xsl-stylesheets-1.78.1

Weirdly, the sheer presence of docbook-style-xsl seem to render the build to succeed.

Anyways I thought you might want to know about this issue or it is of help for somebody else.

user/drbdmon/Makefile.in: --pedantic-errors should be -pedantic-errors

In user/drbdmon/Makefile.in: CXXFLAGS=-std=c++11 -I. -I../shared -Icppdsaext/src -Wall -Werror --pedantic-errors -fPIC -O2 \

But according to "man gcc | fgrep pedantic-errors":
-fsyntax-only -fmax-errors=n -Wpedantic -pedantic-errors -w
-pedantic-errors
error by -pedantic-errors.
(one dash).

GCC admits the "--pedantic-errors" form, some other compilers not.
Please, change this option to "-pedantic-errors".

Please add "drbdsetup wait-disconnect*" commands as well

drbdsetup has very nice wait-connect and wait-sync commands; it would be great if there would be more of them, to more easily trigger actions in shell scripts. For example, drbdsetup wait-disconnect-resource would be nice.

Thanks a lot!

Questions and discussions about load-balance-paths

From the introduction of load-balance-Paths, I think it realizes the fault tolerance and load balancing of drbd network.
Below is my configuration file:

/etc/drbd.d/drbd1.res:
resource drbd1 {
connection {
path {
host ha-155 address 192.168.122.65:7789;
host ha-156 address 192.168.122.66:7789;
}
path {
host ha-155 address 192.168.122.155:7789;
host ha-156 address 192.168.122.156:7789;
}
}
on ha-155 {
device /dev/drbd1;
disk /dev/sdb;
meta-disk internal;
node-id 1;
}
on ha-156 {
device /dev/drbd1;
disk /dev/sdb;
meta-disk internal;
node-id 2;
}
}
/etc/drbd.d/global_common.conf
net {
load-balance-paths yes;
}

After two network paths are created, run the "drbdsetup events2 --now" command to find that the two paths are connected.

After the second network is disconnected, run the "drbdsetup events2 --now" command to find that the two paths are still connected.

After the first network is disconnected, "run the drbdsetup events2 --now" command to find that both paths are disconnected.

According to my understanding, disconnect one of the networks and keep the other one connected, but the result is not so.

What's my problem? Do you have any suggestions?

Any support for a cpu mask string larger than 32 bytes?

The existing 32-byte CPU mask string effectively limits the user to being able to specify cpus 0-111. Systems are getting large enough that they can now have more than 112 CPUs.

Are there any plans to increase the allowable size of the CPU mask string to something larger?

DRBD uses openssl or gnutls?

Hi,
I have doubt is DRBD FIPS compliant?
As DRBD uses openSSL to generate certificate but for tcp encyption consumes tlshd user land library which is dependent on GNU-TLS. Can anyone confirm what is the actual thing.

Regards,
Shrey
[email protected]

device drbd01234 -> /dev/drbd1234 - shouldn't warn/error about '0' in device name?

DRBD does not error if one uses eg. device drbd01234 but it does "convert" it to drbd1234. It was discovered on SLES while using yast2-drbd.

  • OS: SLES 15 SP4
  • DRBD:
     modinfo drbd | grep ^ver
     version:        9.0.30-1
     vermagic:       5.14.21-150400.24.46-default SMP preempt mod_unload modversions
    
grep -RH '' /etc/drbd.{conf,d/*.{conf,res}}
/etc/drbd.conf:# YaST2 created seperated configuration file
/etc/drbd.conf:include "/etc/drbd.d/global_common.conf";
/etc/drbd.conf:include "/etc/drbd.d/test01234.res";
/etc/drbd.d/global_common.conf:global {
/etc/drbd.d/global_common.conf:   usage-count   yes;
/etc/drbd.d/global_common.conf:   udev-always-use-vnr;
/etc/drbd.d/global_common.conf:   minor-count   5;
/etc/drbd.d/global_common.conf:   dialog-refresh        1;
/etc/drbd.d/global_common.conf:}
/etc/drbd.d/global_common.conf:common {
/etc/drbd.d/global_common.conf:   disk {
/etc/drbd.d/global_common.conf:   }
/etc/drbd.d/global_common.conf:   net {
/etc/drbd.d/global_common.conf:   }
/etc/drbd.d/global_common.conf:   startup {
/etc/drbd.d/global_common.conf:   }
/etc/drbd.d/global_common.conf:   options {
/etc/drbd.d/global_common.conf:      quorum     off;
/etc/drbd.d/global_common.conf:   }
/etc/drbd.d/global_common.conf:   handlers {
/etc/drbd.d/global_common.conf:   }
/etc/drbd.d/global_common.conf:}
/etc/drbd.d/test01234.res:resource test01234 {
/etc/drbd.d/test01234.res:   disk {
/etc/drbd.d/test01234.res:      on-io-error     pass_on;
/etc/drbd.d/test01234.res:   }
/etc/drbd.d/test01234.res:   net {
/etc/drbd.d/test01234.res:      protocol        C;
/etc/drbd.d/test01234.res:   }
/etc/drbd.d/test01234.res:   connection-mesh {
/etc/drbd.d/test01234.res:      hosts   jb154sapqe01 jb154sapqe02;
/etc/drbd.d/test01234.res:   }
/etc/drbd.d/test01234.res:   on jb154sapqe01 {
/etc/drbd.d/test01234.res:      address 192.168.0.57:7791;
/etc/drbd.d/test01234.res:      device  drbd01234;
/etc/drbd.d/test01234.res:      disk    /dev/disk/by-id/scsi-SQEMU_QEMU_HARDDISK_jb154sapqe01drbd01;
/etc/drbd.d/test01234.res:      meta-disk       internal;
/etc/drbd.d/test01234.res:      node-id 0;
/etc/drbd.d/test01234.res:   }
/etc/drbd.d/test01234.res:   on jb154sapqe02 {
/etc/drbd.d/test01234.res:      address 192.168.0.61:7791;
/etc/drbd.d/test01234.res:      device  drbd01234;
/etc/drbd.d/test01234.res:      disk    /dev/disk/by-id/scsi-SQEMU_QEMU_HARDDISK_jb154sapqe02drbd01;
/etc/drbd.d/test01234.res:      meta-disk       internal;
/etc/drbd.d/test01234.res:      node-id 1;
/etc/drbd.d/test01234.res:   }
/etc/drbd.d/test01234.res:}
udevadm info -n /dev/drbd1234
P: /devices/virtual/block/drbd1234
N: drbd1234
L: 0
S: drbd/by-disk/disk/by-id/scsi-SQEMU_QEMU_HARDDISK_jb154sapqe01drbd01
S: drbd/by-res/test01234/0
E: DEVPATH=/devices/virtual/block/drbd1234
E: DEVNAME=/dev/drbd1234
E: DEVTYPE=disk
E: MAJOR=147
E: MINOR=1234
E: SUBSYSTEM=block
E: USEC_INITIALIZED=102824765779
E: DEVICE=drbd01234
E: SYMLINK=drbd/by-res/test01234/0
E: SYMLINK_BY_RES=drbd/by-res/test01234/0
E: SYMLINK_BY_DISK=drbd/by-disk/disk/by-id/scsi-SQEMU_QEMU_HARDDISK_jb154sapqe01drbd01
E: DEVLINKS=/dev/drbd/by-disk/disk/by-id/scsi-SQEMU_QEMU_HARDDISK_jb154sapqe01drbd01 /dev/drbd/by-res/test01234/0
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:

9.19.1: drbd_buildtag.sh relies on .git

The drbd_buildtag.sh script relies on .git existing:

$ git version
git version 2.32.0
$ cd user/shared/
$ ./drbd_buildtag.sh drbd_buildtag.h
+ calldir=/home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared
+++ dirname ./drbd_buildtag.sh
++ cd .
++ pwd -P
+ cd /home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared
+ [[ drbd_buildtag.h =~ drbd_buildtag\.h$ ]]
+ drbd_buildtag_h /home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.h
+ local out=/home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.h
+ set -e
+ exec
+ echo -e '/* automatically generated. DO NOT EDIT. */'
+ test -e ../../.git
+ test -e /home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.h
+ echo '/home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.h not found.'
/home/buildd/tmp-drbd/drbd-utils-9.19.1/user/shared/drbd_buildtag.h not found.
+ test -e ../../.git
+ 'Install git and try again.'
./drbd_buildtag.sh: line 20: Install git and try again.: command not found
+ echo 'Your DRBD source tree is broken. Unpack again.'
Your DRBD source tree is broken. Unpack again.
+ exit 1

However the tarball that ships at https://github.com/LINBIT/drbd-utils/releases/tag/v9.19.1 on GitHub does not come with a .git.

Build fails with -flto

Log excerpt:

x86_64-pc-linux-gnu-gcc -march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-clash-protection -Wformat -Werror=format-security -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wall -I../../drbd-headers -I.. -I. -I../shared   -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0  -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -o drbdadm drbdadm_scanner.o drbdadm_parser.o drbdadm_postparse.o drbdadm_main.o drbdadm_adjust.o drbdadm_dump.o drbdtool_common.o drbdadm_usage_cnt.o drbd_buildtag.o registry.o config_flags.o libnla.o drbd_nla.o shared_tool.o shared_main.o shared_parser.o libgenl.o drbdadm_linux.o drbdtool_common_linux.o path_linux.o shared_linux.o
../shared/shared_main.c:60:22: error: type of ‘ifreq_list’ does not match original declaration [-Werror=lto-type-mismatch]
   60 | extern struct ifreq *ifreq_list;
      |                      ^
drbdadm_main.c:150:15: note: ‘ifreq_list’ was previously declared here
  150 | struct ifreq *ifreq_list = NULL;
      |               ^
drbdadm_main.c:150:15: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
lto1: some warnings being treated as errors
lto-wrapper: fatal error: x86_64-pc-linux-gnu-gcc returned 1 exit status
compilation terminated.
/usr/libexec/gcc/x86_64-pc-linux-gnu/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:111: drbdadm] Error 1

Full build log:
drbd-utils-9.25.0:20231231-225010.log

Downstream bug report: https://bugs.gentoo.org/863728

snapshot-resync-target-lvm.sh not compatible with 9.x

The snapshot-resync-target-lvm.sh script is not compatible with drbd9x.
First the snippet

                OUT_OF_SYNC=$(sed -ne "/^ *$DRBD_MINOR:/ "'{
                                n;
                                s/^.* oos:\([0-9]*\).*$/\1/;
                                s/^$/0/; # default if not found
                                p;
                                q; }' < /proc/drbd) # unit KiB

will always return zero (default if not found)

Second, if you have more than one volume configured for the same resource it will also fail:

Dec 21 21:44:38 pcs03 snapshot-resync-target-lvm.sh[22355]: Cannot determine lower level device of resource exports/0 1, sorry.
Dec 21 21:44:47 pcs03 unsnapshot-resync-target-lvm.sh[22373]: invoked for exports/0 1 (drbd0 1)
Dec 21 21:44:47 pcs03 unsnapshot-resync-target-lvm.sh[22373]: 0 1 is not a valid number
Dec 21 21:44:47 pcs03 unsnapshot-resync-target-lvm.sh[22373]: 0 1 is not a valid number
Dec 21 21:44:47 pcs03 unsnapshot-resync-target-lvm.sh[22373]: Cannot determine lower level device of resource exports/0 1, sorry.

build error!

make[2]: Leaving directory '/root/drbd-utils-9.19.1-rc.1/user/v9'
asciidoctor -I. -rasciidoctor-extensions.rb -amansource=drbd-utils -amanmanual='DRBD Manual' -amanversion= -aorgname='LINBIT HA Solutions GmbH https://linbit.com' -d manpage -b docbook5 [email protected]
asciidoctor -I. -rasciidoctor-extensions.rb -amansource=drbd-utils -amanmanual='DRBD Manual' -amanversion= -aorgname='LINBIT HA Solutions GmbH https://linbit.com' -d manpage -b docbook5 [email protected]
asciidoctor -I. -rasciidoctor-extensions.rb -amansource=drbd-utils -amanmanual='DRBD Manual' -amanversion= -aorgname='LINBIT HA Solutions GmbH https://linbit.com' -d manpage -b docbook5 drbd.service.adoc
asciidoctor -I. -rasciidoctor-extensions.rb -amansource=drbd-utils -amanmanual='DRBD Manual' -amanversion= -aorgname='LINBIT HA Solutions GmbH https://linbit.com' -d manpage -b docbook5 [email protected]
asciidoctor -I. -rasciidoctor-extensions.rb -amansource=drbd-utils -amanmanual='DRBD Manual' -amanversion= -aorgname='LINBIT HA Solutions GmbH https://linbit.com' -d manpage -b docbook5 [email protected]
asciidoctor: FAILED: 'asciidoctor-extensions.rb' could not be loaded
Use --trace to show backtrace
asciidoctor: FAILED: 'asciidoctor-extensions.rb' could not be loaded
Use --trace to show backtrace
asciidoctor: FAILED: 'asciidoctor-extensions.rb' could not be loaded
Use --trace to show backtrace
make[1]: *** [../../documentation/common/Makefile_v9_com_post:61: [email protected]] Error 1
make[1]: *** Waiting for unfinished jobs....
asciidoctor: FAILED: 'asciidoctor-extensions.rb' could not be loaded
Use --trace to show backtrace
asciidoctor: FAILED: 'asciidoctor-extensions.rb' could not be loadedmake[1]: *** [../../documentation/common/Makefile_v9_com_post:61: [email protected]] Error 1

Use --trace to show backtrace
make[1]: *** [../../documentation/common/Makefile_v9_com_post:61: [email protected]] Error 1
make[1]: *** [../../documentation/common/Makefile_v9_com_post:61: [email protected]] Error 1
make[1]: *** [../../documentation/common/Makefile_v9_com_post:61: [email protected]] Error 1
asciidoctor: FAILED: 'asciidoctor-extensions.rb' could not be loaded
Use --trace to show backtrace
make[1]: *** [../../documentation/common/Makefile_v9_com_post:61: drbd.service.xml] Error 1
asciidoctor: FAILED: 'asciidoctor-extensions.rb' could not be loaded
Use --trace to show backtrace
make[1]: *** [../../documentation/common/Makefile_v9_com_post:61: [email protected]] Error 1
asciidoctor: FAILED: 'asciidoctor-extensions.rb' could not be loaded
Use --trace to show backtrace
make[1]: *** [../../documentation/common/Makefile_v9_com_post:61: [email protected]] Error 1
make[1]: Leaving directory '/root/drbd-utils-9.19.1-rc.1/documentation/v9'
make: *** [Makefile:94: doc] Error 2
[root@compute1 drbd-utils-9.19.1-rc.1]#

udev links break with newer systemd versions

DRBD's udev rules don't work with newer systemd versions when the machine's hostname changes during boot, as it does in many VMs and cloud hosts. Starting with systemd version 242, the new ProtectHostname sandbox setting is enabled by default in the systemd-udevd service, applying to any scripts run within udev rules (see systemd-udevd unit file and changelog). This is impacting DRBD's udev links:

IMPORT{program}="@sbindir@/drbdadm sh-udev minor-%m"

When the udev rule executes, drbdadm sees the host's original (invalid) hostname, compares it to the hostname in the resource config, and fails:

(udev-worker)[93198]: drbd0: Starting '/usr/local/sbin/drbdadm sh-udev minor-0'
(udev-worker)[93198]: drbd0: '/usr/local/sbin/drbdadm sh-udev minor-0'(out) ''minor-0' not defined in your config (for this host).'
(udev-worker)[93198]: drbd0: Process '/usr/local/sbin/drbdadm sh-udev minor-0' failed with exit code 1.

And the /dev/drbd/by-disk and /dev/drbd/by-res symlinks never get created.

I'm not sure what the right solution to this is. As far as I can tell, there is no way to scope these sandbox rules to individual udev rules or scripts. Disabling ProtectHostname on systemd-udevd via a systemd override solves this problem. Restarting the systemd-udevd service also solves this problem, as the hostname in the UTS namespace is refreshed. Neither of those seem like tenable solutions to me.

Misspelling

There are some spelling mistakes in line 120 of the code

re_init_daemon()
{
	resources_with_existing_attributes=$( list_existing_attributes )
	resources_known_to_drbdadm=$( drbadm sh-resources )
	resources_seen_in_initial_dump=''
	status_delay=''
	exec 0< <(exec drbdsetup events2 --timestamps 9>&- )
}

The correct spelling is as follow:
resources_known_to_drbdadm=$( drbdadm sh-resources )

Conduct unbecoming from a member of the LINBIT organization

I provided a bug fix to a small bug. A bug nonetheless.

That bugfix was closed by LINBIT's member way of winning an exchange. Had he been polite from the outset there would have been no exchange.

The member promised to uplift the provided bugfix and implement it at a later date as his own, speaking volumes about his character (it does not matter if the license permits it). Linbit's member said "will apply my proposed patch". About my code, which I provided to fix the bug.

That all occurred here: #36

In spite of his conduct I have persisted and pushed another tidier single commit bug fix: #38

A historical report of the bug affecting other people:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030118

What did I think would happen? Something more normal, with a civil interaction resulting in a fixed bug.

Split-brain notification script not working

Hello,
notify-split-brain.sh is not sending email when SB occurs. There is missing environment variable $DRBD_PEER

From syslog:

notify-split-brain.sh[16322]: Environment variable $DRBD_PEER not found (this is normally passed in by drbdadm)

crm-unfence-peer.9.sh error in _check_peer_node_reachable()

The function _check_peer_node_reachable does not work with pacemaker-2.1.0-8.

Line 1082:

                if [[ $crmd = "online" ]] ; then
                        local out
                        if out=$( crmadmin -t $(( cibtimeout * 200 )) -S $DRBD_PEER ) \
                        && [[ $out = *"(ok)" ]]; then
                                peer_state="reachable"
                                return
                        fi
                fi

The script uses crmadmin to find out the reachable node. But it expects (ok) in the stdout if it is.

Old stdout of crmadmin was:
Status of crmd@testclust7-02: S_NOT_DC (ok)
Now, with new pacemaker version the output is:
Controller on testclust7-02 in state S_NOT_DC: ok

The () need to be removed to make the script work again.

Error: Agent 'ocf:linbit:drbd' is not installed or does not provide valid metadata: Element content failed to validate content, line 117, use --force to override

Description of problem:

Configuring DRBD on Pacemaker cluster I got this error:

[root@node1 setup]# pcs resource create drbd ocf:linbit:drbd drbd_resource=resource0 promotable promoted-max=1 promoted-node-max=1 clone-max=3 clone-node-max=1 notify=true
Error: Agent 'ocf:linbit:drbd' is not installed or does not provide valid metadata: Element content failed to validate content, line 117, use --force to override
Error: Errors have occurred, therefore pcs is unable to continue

Version-Release number of selected component (if applicable):

[root@node1 ~]# cat /etc/os-release
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"

[root@node1 ~]# rpm -q pcs
pcs-0.10.12-1.el8.x86_64

[root@node1 ~]# rpm -q drbd
drbd90-utils-9.19.1-1.el8.elrepo.x86_64

How reproducible:

[root@node1 ~]# pcs resource create drbd ocf:linbit:drbd drbd_resource=resource0 promotable promoted-max=1 promoted-node-max=1 clone-max=3 clone-node-max=1 notify=true

Steps to Reproduce:

  1. Install new CentOS Stream 8 server
  2. Install and configure drbd
  3. Install pacemaker
  4. Try to configure drbd resource

Actual results:

Error: Agent 'ocf:linbit:drbd' is not installed or does not provide valid metadata: Element content failed to validate content, line 117, use --force to override
Error: Errors have occurred, therefore pcs is unable to continue

Expected results:

Cluster resource created.

Additional info:

Downgrading to pcs-0.10.11-1.el8 the issue is not present.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.