If no valid local address is found in corosync.conf then corosync
exits with: "parse error in config: No multicast port specified"
This is because of the config change for knet that always populates
the interfaces. The old error of "no interfaces found" was only
slightly better anyway IMHO.
This patch adds an explicit check that local_node_pos has been
set in icmap and uses that to determine if a valid local address
has been found.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
char parse_error[512];
const char *error_reason = local_error_reason;
int i,j;
+ uint32_t u32;
int num_configured = 0;
unsigned int interface_max = INTERFACE_MAX;
goto parse_error;
}
+ /* Check we found a local node address */
+ if (icmap_get_uint32("nodelist.local_node_pos", &u32) != CS_OK) {
+ error_reason = "No valid address found for local host";
+ goto parse_error;
+ }
+
for (i = 0; i < INTERFACE_MAX; i++) {
/*
* Some error checking of parsed data to make sure its valid