PDA

View Full Version : SLES 15 HA cluster ha-cluster-join csync2 can't retrieve config



kjanezic95
31-Jan-2019, 14:12
I have set up 2 SLES HA machines, and run ha-cluster-init on the first one, as stated in quick start document (https://www.suse.com/documentation/sle-ha-15/pdfdoc/art_sleha_install_quick/art_sleha_install_quick.pdf), and then I ran ha-cluster-join. Then I get error:

"Configuring csync2...ERROR: 1: cluster.join: Can't retrieve csync2 config from sles-a"

If i try to retrieve file manually it works fine:

sles-b:~ # scp root@sles-a:'/etc/csync2/csync2.cfg' /etc/csync2
csync2.cfg 100% 516 672.2KB/s 00:00


The whole output of ha-cluster-join:

sles-b:~ # ha-cluster-join
Join This Node to Cluster:
You will be asked for the IP address of an existing node, from which
configuration will be copied. If you have not already configured
passwordless ssh between nodes, you will be prompted for the root
password of the existing node.

IP address or hostname of existing node (e.g.: 192.168.1.1) []sles-a
Retrieving SSH keys - This may prompt for root@sles-a:
/root/.ssh/id_rsa already exists - overwrite (y/n)? y
One new SSH key installed
Configuring csync2...ERROR: 1: cluster.join: Can't retrieve csync2 config from sles-a

Hawk2 website works fine, node1 (sles-a for me) or virtual IP, resources can be added, stopped, started, ... tested with apache2 server. Bot devices can ssh passwordless into each other. Both devices are virtual machines, bridged to LAN. Does anyone know if this is a problem with setup script or did I do something wrong? If I take command from script (https://searchcode.com/codesearch/view/80540379/) and run it I get this error:


sles-b:~ # scp root@sles-a:'/etc/csync2/{csync2.cfg,key_hagroup}' \ /etc/csync2
error: unexpected filename: csync2.cfg

sles-b:~ # scp root@sles-a:'/etc/csync2/{csync2.cfg,key_hagroup}' /etc/csync2
error: unexpected filename: csync2.cfg



Thank you in advance to anyone willing to try to help
Kristjan

jmozdzen
05-Feb-2019, 12:39
Hi Kristjan,

> sles-b:~ # scp root@sles-a:'/etc/csync2/{csync2.cfg,key_hagroup}' /etc/csync2
> error: unexpected filename: csync2.cfg

does calling "sles-b:~ # scp root@sles-a:/etc/csync2/{csync2.cfg,key_hagroup} /etc/csync2" (without the single quotes) work manually? Maybe it's not about csync2,conf, but key_hagroup...

Regards,
J

kkoehle
11-Feb-2019, 20:47
Older versions of scp work, new versions of scp (SLES 12 SP3 and SP4) are broken.
On older versions this works:
scp hana-n5:'/etc/{hosts,resolv.conf}' .
hosts 100% 608 0.6KB/s 00:00
resolv.conf 100% 852 0.8KB/s 00:00

On newer versions, scp fails:
error: unexpected filename: hosts

The problem is the interpretation of single quotes and {}.

kjanezic95
13-Feb-2019, 15:23
Thank you for the answers. I reinstalled everything and it worked properly :)

jmozdzen
20-Feb-2019, 15:22
Hi,


Older versions of scp work, new versions of scp (SLES 12 SP3 and SP4) are broken.
On older versions this works:
scp hana-n5:'/etc/{hosts,resolv.conf}' .
hosts 100% 608 0.6KB/s 00:00
resolv.conf 100% 852 0.8KB/s 00:00

On newer versions, scp fails:
error: unexpected filename: hosts

The problem is the interpretation of single quotes and {}.

being picky here, for technical accuracy: it's not scp that resolves the parameters, but the shell (prior to forking "scp". You should see the same difference in parameter expansion when using "echo" instead of "scp") - so it's a problem with newer (or different) shells, liklely "bash" in this case.

With regards,
J