[pve-devel] [PATCH cluster] fix #2479: use correct sub in create_conf

Oguz Bektas o.bektas at proxmox.com
Fri Nov 22 16:17:41 CET 2019


On Fri, Nov 22, 2019 at 04:15:30PM +0100, Thomas Lamprecht wrote:
> On 11/22/19 4:13 PM, Oguz Bektas wrote:
> > 'pvecm create' fails since the subroutine doesn't exist in PVE::Cluster
> > but in PVE::Corosync
> > 
> 
> first, great catch! But...
> 
> > Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
> > ---
> >  data/PVE/Corosync.pm | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/data/PVE/Corosync.pm b/data/PVE/Corosync.pm
> > index 1b92ea3..7fb52e6 100644
> > --- a/data/PVE/Corosync.pm
> > +++ b/data/PVE/Corosync.pm
> > @@ -239,7 +239,7 @@ sub create_conf {
> >  
> >      my $local_ip_address = PVE::Cluster::remote_node_ip($nodename);
> >  
> > -    my $link0 = PVE::Cluster::parse_corosync_link($param{link0});
> > +    my $link0 = PVE::Corosync::parse_corosync_link($param{link0});
> 
> we're in the corosync module, so just use
> parse_corosync_link($param{link0});
> directly? :)


hahahah, yeah. i'll send v2 :)
> 
> >      $link0->{address} //= $local_ip_address;
> >  
> >      my $conf = {
> > @@ -278,7 +278,7 @@ sub create_conf {
> >      $totem->{interface}->{0}->{knet_link_priority} = $link0->{priority}
> >  	if defined($link0->{priority});
> >  
> > -    my $link1 = PVE::Cluster::parse_corosync_link($param{link1});
> > +    my $link1 = PVE::Corosync::parse_corosync_link($param{link1});
> >      if ($link1->{address}) {
> >  	$conf->{totem}->{interface}->{1} = {
> >  	    linknumber => 1,
> > 
> 




More information about the pve-devel mailing list