[ClusterLabs] [Pacemaker on raspberry pi]
pfrenard
pfrenard at gmail.com
Mon Mar 5 16:17:49 EST 2018
Hello guys,
I have discovered pacemaker since a few days and I m trying to setup a
Raspberry PI 3 cluster :)
I am running Fedora 27 - armv7l release.
pacemaker is 1.1.18
corosync is 2.4.3
1/ I can create a cluster with 2 nodes let's say pi01 and pi02 with no
issue.
Then I want to add a third node with command "pcs cluster node add pi05"
*#pcs cluster setup --name hapi --enable pi01 pi02*
Destroying cluster on nodes: pi01, pi02...
pi02: Stopping Cluster (pacemaker)...
pi01: Stopping Cluster (pacemaker)...
pi01: Successfully destroyed cluster
pi02: Successfully destroyed cluster
Sending 'pacemaker_remote authkey' to 'pi01', 'pi02'
pi01: successful distribution of the file 'pacemaker_remote authkey'
pi02: successful distribution of the file 'pacemaker_remote authkey'
Sending cluster config files to the nodes...
pi01: Succeeded
pi02: Succeeded
pi01: Cluster Enabled
pi02: Cluster Enabled
Synchronizing pcsd certificates on nodes pi01, pi02...
pi01: Success
pi02: Success
Restarting pcsd on the nodes in order to reload the certificates...
pi01: Success
pi02: Success
*#pcs cluster start --all*
pi02: Starting Cluster...
pi01: Starting Cluster...
*#pcs status*
Cluster name: hapi
WARNING: no stonith devices and stonith-enabled is not false
Stack: corosync
Current DC: pi02 (version 1.1.18-2.fc27-2b07d5c5a9) - partition with quorum
Last updated: Mon Mar 5 21:51:43 2018
Last change: Mon Mar 5 21:51:19 2018 by hacluster via crmd on pi02
2 nodes configured
0 resources configured
Online: [ pi01 pi02 ]
No resources
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled
*#pcs cluster auth pi01 pi02 pi05*
pi01: Already authorized
pi02: Already authorized
pi05: Already authorized
*#pcs cluster node add pi05 --start --enable**
*Disabling SBD service...
pi05: sbd disabled
Traceback (most recent call last):
File "/usr/sbin/pcs", line 11, in <module>
load_entry_point('pcs==0.9.160', 'console_scripts', 'pcs')()
File "/usr/lib/python3.6/site-packages/pcs/app.py", line 190, in main
cmd_map[command](argv)
File "/usr/lib/python3.6/site-packages/pcs/cluster.py", line 218, in
cluster_cmd
cluster_node(argv)
File "/usr/lib/python3.6/site-packages/pcs/cluster.py", line 1674, in
cluster_node
node_add(lib_env, node0, node1, modifiers)
File "/usr/lib/python3.6/site-packages/pcs/cluster.py", line 1857, in
node_add
allow_incomplete_distribution=modifiers["skip_offline_nodes"]
File
"/usr/lib/python3.6/site-packages/pcs/lib/commands/remote_node.py", line
58, in _share_authkey
node_communication_format.pcmk_authkey_file(authkey_content),
File
"/usr/lib/python3.6/site-packages/pcs/lib/node_communication_format.py",
line 47, in pcmk_authkey_file
"pacemaker_remote authkey": pcmk_authkey_format(authkey_content)
File
"/usr/lib/python3.6/site-packages/pcs/lib/node_communication_format.py",
line 29, in pcmk_authkey_format
"data": base64.b64encode(authkey_content).decode("utf-8"),
File "/usr/lib/python3.6/base64.py", line 58, in b64encode
encoded = binascii.b2a_base64(s, newline=False)
TypeError: a bytes-like object is required, not 'str'
it seems there is a TypeError
let's try with --debug
*#pcs cluster node add pi05 --start --enable --debug**
*Running: /usr/bin/ruby -I/usr/lib/pcsd/ /usr/lib/pcsd/pcsd-cli.rb
read_tokens
Environment:
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus
DISPLAY=localhost:11.0
EDITOR=vi
GEM_HOME=/usr/lib/pcsd/vendor/bundle/ruby
HISTCONTROL=ignoredups
HISTSIZE=1000
HOME=/root
HOSTNAME=pi01
LANG=en_US.UTF-8
LC_ALL=C
LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/lib
LESSOPEN=||/usr/bin/lesspipe.sh %s
LOGNAME=root
LS_COLORS=rs=0:di=38;5;33:ln=38;5;51:mh=00:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=01;05;37;41:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;40:*.tar=38;5;9:*.tgz=38;5;9:*.arc=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lha=38;5;9:*.lz4=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.tzo=38;5;9:*.t7z=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.Z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lrz=38;5;9:*.lz=38;5;9:*.lzo=38;5;9:*.xz=38;5;9:*.zst=38;5;9:*.tzst=38;5;9:*.bz2=38;5;9:*.bz=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.war=38;5;9:*.ear=38;5;9:*.sar=38;5;9:*.rar=38;5;9:*.alz=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.cab=38;5;9:*.wim=38;5;9:*.swm=38;5;9:*.dwm=38;5;9:*.esd=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.mjpg=38;5;13:*.mjpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.webm=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=38;5;45:*.au=38;5;45:*.flac=38;5;45:*.m4a=38;5;45:*.mid=38;5;45:*.midi=38;5;45:*.mka=38;5;45:*.mp3=38;5;45:*.mpc=38;5;45:*.ogg=38;5;45:*.ra=38;5;45:*.wav=38;5;45:*.oga=38;5;45:*.opus=38;5;45:*.spx=38;5;45:*.xspf=38;5;45:
MAIL=/var/spool/mail/root
MANPATH=/usr/local/share/man:/usr/share/man/fr:/usr/share/man
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/games:/etc:/root/bin
PCSD_DEBUG=true
PCSD_NETWORK_TIMEOUT=60
PWD=/root
SELINUX_LEVEL_REQUESTED=
SELINUX_ROLE_REQUESTED=
SELINUX_USE_CURRENT_RANGE=
SHELL=/bin/bash
SHLVL=1
SSH_CLIENT=172.16.1.22 53582 22
SSH_CONNECTION=172.16.1.22 53582 172.16.1.241 22
SSH_TTY=/dev/pts/1
TERM=xterm-256color
USER=root
XDG_RUNTIME_DIR=/run/user/0
XDG_SESSION_ID=8
XMODIFIERS=@im=ibus
_=/usr/sbin/pcs
--Debug Input Start--
{}
--Debug Input End--
Finished running: /usr/bin/ruby -I/usr/lib/pcsd/
/usr/lib/pcsd/pcsd-cli.rb read_tokens
Return value: 0
--Debug Stdout Start--
{
"status": "ok",
"data": {
"tokens": {
"pi01": "88982663-09d0-4f24-85c5-1659d7762d74",
"pi02": "3b545808-f841-4f67-866c-9d7051fc756e",
"pi05": "3fff97a2-4d46-4c9b-a0fd-a4f1da421c1c"
},
"ports": {
"pi01": null,
"pi02": null,
"pi05": null
}
},
"log": [
"I, [2018-03-05T21:59:49.346463 #26209] INFO -- : PCSD Debugging
enabled\n",
"D, [2018-03-05T21:59:49.346923 #26209] DEBUG -- : Did not detect
RHEL 6\n",
"D, [2018-03-05T21:59:49.347100 #26209] DEBUG -- : Detected systemd
is in use\n",
"I, [2018-03-05T21:59:49.347329 #26209] INFO -- : Running:
/usr/sbin/corosync-cmapctl totem.cluster_name\n",
"I, [2018-03-05T21:59:49.347560 #26209] INFO -- : CIB USER:
hacluster, groups: \n",
"D, [2018-03-05T21:59:49.402903 #26209] DEBUG -- :
[\"totem.cluster_name (str) = hapi\\n\"]\n",
"D, [2018-03-05T21:59:49.403292 #26209] DEBUG -- : []\n",
"D, [2018-03-05T21:59:49.403574 #26209] DEBUG -- : Duration:
0.055257672s\n",
"I, [2018-03-05T21:59:49.403964 #26209] INFO -- : Return Value: 0\n"
]
}
--Debug Stdout End--
--Debug Stderr Start--
--Debug Stderr End--
Sending HTTP Request to: https://pi05:2224/remote/check_auth
Data: None
Response Code: 200
--Debug Response Start--
{"success":true,"node_list":["pi01","pi02","pi05"]}
--Debug Response End--
Communication debug info for calling: https://pi05:2224/remote/check_auth
--Debug Communication Output Start--
* Trying 172.16.1.245...
* TCP_NODELAY set
* Connected to pi05 (172.16.1.245) port 2224 (#0)
* ALPN, offering http/1.1
* Cipher selection: PROFILE=SYSTEM
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=US; ST=MN; L=Minneapolis; O=pcsd; OU=pcsd;
CN=pi3-05.intranet.net
* start date: Mar 5 10:59:13 2018 GMT
* expire date: Mar 2 10:59:13 2028 GMT
* issuer: C=US; ST=MN; L=Minneapolis; O=pcsd; OU=pcsd;
CN=pi3-05.intranet.net
* SSL certificate verify result: self signed certificate (18),
continuing anyway.
> GET /remote/check_auth HTTP/1.1
Host: pi05:2224
User-Agent: PycURL/7.43.0 libcurl/7.55.1 OpenSSL/1.1.0g zlib/1.2.11
libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.3) libssh2/1.8.0 nghttp2/1.25.0
Accept: */*
Cookie: token=3fff97a2-4d46-4c9b-a0fd-a4f1da421c1c
< HTTP/1.1 200 OK
< Content-Type: text/html;charset=utf-8
< Content-Length: 51
< X-Xss-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< Server: WEBrick/1.3.1 (Ruby/2.4.3/2017-12-14) OpenSSL/1.1.0g
< Date: Mon, 05 Mar 2018 20:59:49 GMT
< Connection: Keep-Alive
<
<< {"success":true,"node_list":["pi01","pi02","pi05"]}
* Connection #0 to host pi05 left intact
--Debug Communication Output End--
Running: /usr/sbin/corosync -v
Environment:
[... same environment ...]
Finished running: /usr/sbin/corosync -v
Return value: 0
--Debug Stdout Start--
Corosync Cluster Engine, version '2.4.3'
Copyright (c) 2006-2009 Red Hat, Inc.
--Debug Stdout End--
--Debug Stderr Start--
--Debug Stderr End--
Running: /usr/bin/ruby -I/usr/lib/pcsd/ /usr/lib/pcsd/pcsd-cli.rb
read_tokens
Environment:
[... same environment ...]
--Debug Input Start--
{}
--Debug Input End--
Finished running: /usr/bin/ruby -I/usr/lib/pcsd/
/usr/lib/pcsd/pcsd-cli.rb read_tokens
Return value: 0
--Debug Stdout Start--
{
"status": "ok",
"data": {
"tokens": {
"pi01": "88982663-09d0-4f24-85c5-1659d7762d74",
"pi02": "3b545808-f841-4f67-866c-9d7051fc756e",
"pi05": "3fff97a2-4d46-4c9b-a0fd-a4f1da421c1c"
},
"ports": {
"pi01": null,
"pi02": null,
"pi05": null
}
},
"log": [
"I, [2018-03-05T21:59:53.331360 #26220] INFO -- : PCSD Debugging
enabled\n",
"D, [2018-03-05T21:59:53.331705 #26220] DEBUG -- : Did not detect
RHEL 6\n",
"D, [2018-03-05T21:59:53.331877 #26220] DEBUG -- : Detected systemd
is in use\n",
"I, [2018-03-05T21:59:53.332108 #26220] INFO -- : Running:
/usr/sbin/corosync-cmapctl totem.cluster_name\n",
"I, [2018-03-05T21:59:53.332303 #26220] INFO -- : CIB USER:
hacluster, groups: \n",
"D, [2018-03-05T21:59:53.382540 #26220] DEBUG -- :
[\"totem.cluster_name (str) = hapi\\n\"]\n",
"D, [2018-03-05T21:59:53.382928 #26220] DEBUG -- : []\n",
"D, [2018-03-05T21:59:53.383150 #26220] DEBUG -- : Duration:
0.050119528s\n",
"I, [2018-03-05T21:59:53.383601 #26220] INFO -- : Return Value: 0\n"
]
}
--Debug Stdout End--
--Debug Stderr Start--
--Debug Stderr End--
Sending HTTP Request to: https://pi05:2224/remote/node_available
Finished calling: https://pi05:2224/remote/node_available
Response Code: 200
--Debug Response Start--
{"node_available":true}
--Debug Response End--
Communication debug info for calling:
https://pi05:2224/remote/node_available
--Debug Communication Info Start--
* Trying 172.16.1.245...
* TCP_NODELAY set
* Connected to pi05 (172.16.1.245) port 2224 (#0)
* ALPN, offering http/1.1
* Cipher selection: PROFILE=SYSTEM
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=US; ST=MN; L=Minneapolis; O=pcsd; OU=pcsd;
CN=pi3-05.intranet.net
* start date: Mar 5 10:59:13 2018 GMT
* expire date: Mar 2 10:59:13 2028 GMT
* issuer: C=US; ST=MN; L=Minneapolis; O=pcsd; OU=pcsd;
CN=pi3-05.intranet.net
* SSL certificate verify result: self signed certificate (18),
continuing anyway.
> GET /remote/node_available HTTP/1.1
Host: pi05:2224
User-Agent: PycURL/7.43.0 libcurl/7.55.1 OpenSSL/1.1.0g zlib/1.2.11
libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.3) libssh2/1.8.0 nghttp2/1.25.0
Accept: */*
Cookie: token=3fff97a2-4d46-4c9b-a0fd-a4f1da421c1c
< HTTP/1.1 200 OK
< Content-Type: text/html;charset=utf-8
< Content-Length: 23
< X-Xss-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< Server: WEBrick/1.3.1 (Ruby/2.4.3/2017-12-14) OpenSSL/1.1.0g
< Date: Mon, 05 Mar 2018 20:59:53 GMT
< Connection: Keep-Alive
<
<< {"node_available":true}
* Connection #0 to host pi05 left intact
--Debug Communication Info End--
Running: /bin/systemctl is-enabled sbd.service
Environment:
[... same environment ...]
Finished running: /bin/systemctl is-enabled sbd.service
Return value: 1
--Debug Stdout Start--
--Debug Stdout End--
--Debug Stderr Start--
Failed to get unit file state for sbd.service: No such file or directory
--Debug Stderr End--
Disabling SBD service...
Sending HTTP Request to: https://pi05:2224/remote/sbd_disable
Finished calling: https://pi05:2224/remote/sbd_disable
Response Code: 200
--Debug Response Start--
SBD disabled
--Debug Response End--
Communication debug info for calling: https://pi05:2224/remote/sbd_disable
--Debug Communication Info Start--
* Trying 172.16.1.245...
* TCP_NODELAY set
* Connected to pi05 (172.16.1.245) port 2224 (#0)
* ALPN, offering http/1.1
* Cipher selection: PROFILE=SYSTEM
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=US; ST=MN; L=Minneapolis; O=pcsd; OU=pcsd;
CN=pi3-05.intranet.net
* start date: Mar 5 10:59:13 2018 GMT
* expire date: Mar 2 10:59:13 2028 GMT
* issuer: C=US; ST=MN; L=Minneapolis; O=pcsd; OU=pcsd;
CN=pi3-05.intranet.net
* SSL certificate verify result: self signed certificate (18),
continuing anyway.
> GET /remote/sbd_disable HTTP/1.1
Host: pi05:2224
User-Agent: PycURL/7.43.0 libcurl/7.55.1 OpenSSL/1.1.0g zlib/1.2.11
libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.3) libssh2/1.8.0 nghttp2/1.25.0
Accept: */*
Cookie: token=3fff97a2-4d46-4c9b-a0fd-a4f1da421c1c
< HTTP/1.1 200 OK
< Content-Type: text/html;charset=utf-8
< Content-Length: 12
< X-Xss-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< Server: WEBrick/1.3.1 (Ruby/2.4.3/2017-12-14) OpenSSL/1.1.0g
< Date: Mon, 05 Mar 2018 20:59:56 GMT
< Connection: Keep-Alive
<
<< SBD disabled
* Connection #0 to host pi05 left intact
--Debug Communication Info End--
pi05: sbd disabled
Traceback (most recent call last):
File "/usr/sbin/pcs", line 11, in <module>
load_entry_point('pcs==0.9.160', 'console_scripts', 'pcs')()
File "/usr/lib/python3.6/site-packages/pcs/app.py", line 190, in main
cmd_map[command](argv)
File "/usr/lib/python3.6/site-packages/pcs/cluster.py", line 218, in
cluster_cmd
cluster_node(argv)
File "/usr/lib/python3.6/site-packages/pcs/cluster.py", line 1674, in
cluster_node
node_add(lib_env, node0, node1, modifiers)
File "/usr/lib/python3.6/site-packages/pcs/cluster.py", line 1857, in
node_add
allow_incomplete_distribution=modifiers["skip_offline_nodes"]
File
"/usr/lib/python3.6/site-packages/pcs/lib/commands/remote_node.py", line
58, in _share_authkey
node_communication_format.pcmk_authkey_file(authkey_content),
File
"/usr/lib/python3.6/site-packages/pcs/lib/node_communication_format.py",
line 47, in pcmk_authkey_file
"pacemaker_remote authkey": pcmk_authkey_format(authkey_content)
File
"/usr/lib/python3.6/site-packages/pcs/lib/node_communication_format.py",
line 29, in pcmk_authkey_format
"data": base64.b64encode(authkey_content).decode("utf-8"),
File "/usr/lib/python3.6/base64.py", line 58, in b64encode
encoded = binascii.b2a_base64(s, newline=False)
TypeError: a bytes-like object is required, not 'str'
2/ do you know if there is any binaries or packages for DRBD for armv7l
architecture, as there is nothing for it with ELRepo.
3/ is there a way to configure a NFS export as a resource ?
what is the best: NFS or iSCSI+lvm or DRBD ?
4/ any chance to test pacemaker 2.0 and all the documentation associated
to it ? :)
thanks a lot guys
Fox
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clusterlabs.org/pipermail/users/attachments/20180305/9dccf155/attachment-0001.html>
More information about the Users
mailing list