[pve-devel] [PATCH cluster v2 0/8] initial API adaption to corosync 3/kronosnet

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Jun 14 17:52:37 CEST 2019


On 6/14/19 3:03 PM, Fabian Grünbichler wrote:
> with that fixed up, joining works, but the generated corosync.conf is
> again wrong:
> 
> 
> logging {
>   debug: off
>   to_syslog: yes
> }
> 
> nodelist {
>   node {
>     name: clustertest71
>     nodeid: 1
>     quorum_votes: 1
>     ring0_addr: 192.168.21.71
>     ring1_addr: 10.0.0.71
>   }
>   node {
>     name: clustertest72
>     nodeid: 2
>     quorum_votes: 1
>     ring0_addr {
>       address: 192.168.21.72
>     }
>     ring1_addr {
>       address: 10.0.0.72
>     }
>   }
> }
> 
> quorum {
>   provider: corosync_votequorum
> }
> 
> totem {
>   cluster_name: thomastest
>   config_version: 3
>   interface {
>     linknumber: 0
>   }
>   interface {
>     linknumber: 1
>   }
>   ip_version: ipv4-6
>   link_mode: passive
>   secauth: on
>   version: 2
> }
> 
> stopped testing there for now ;)

this was a clear and stupid bug from me:

diff --git a/data/PVE/API2/ClusterConfig.pm b/data/PVE/API2/ClusterConfig.pm
index 81338ff..8f24b07 100644
--- a/data/PVE/API2/ClusterConfig.pm
+++ b/data/PVE/API2/ClusterConfig.pm
@@ -304,7 +304,7 @@ __PACKAGE__->register_method ({
                name => $name,
            };
            for my $id (keys %$links) {
-               $nodelist->{$name}->{"ring${id}_addr"} = $links->{$id};
+               $nodelist->{$name}->{"ring${id}_addr"} = $links->{$id}->{address};
            }
            $nodelist->{$name}->{quorum_votes} = $param->{votes} if $param->{votes};
 
---

with above the config is generated correct again..





More information about the pve-devel mailing list