Page MenuHomeVyOS Platform

/etc/ha.d/haresources 4096-character line length limit
Closed, ResolvedPublic


/etc/ha.d/haresources has a 4096-character line length limit.

The line length limit is compiled in.

Lines longer than the limit get truncated which is likely to cause a syntax error for heartbeat.

Can trigger this by assigning at least 160 IP addresses to a single cluster group.

According to, lines can be continued with backslash '\' character.

In /opt/vyatta/share/perl5/Vyatta/Cluster/ at about line 357 in function haresources near comment 'this forces all ip addresses to be before all services, which may not be the desirable behavior in all cases.', replace 'join " "' with 'join "\\\n "'.

So these 3 lines:
my $ip_str = join " ", @ip_addresses;
my $serv_str = join " ", @init_services;
my $services = join " ", @($ip_str, $serv_str);
would be replaced by these 3 lines:
my $ip_str = join "\\\n ", @ip_addresses;
my $serv_str = join "\\\n ", @init_services;
my $services = join "\\\n ", @($ip_str, $serv_str);

This fix avoids the 4096-character line length limit in /etc/ha.d/haresources.

This bug is present on at least:

  • vyos-1.2.0-rolling+201810280337
  • vyos-1.2.0-rc5

and has probably been present for a long time.


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close