Skip to content
Snippets Groups Projects
Commit 7dd999fc authored by Manuel Franceschini's avatar Manuel Franceschini
Browse files

Handle ENOENT case in ssconf.GetPrimaryIPFamily


This patch adds an optional default parameter to SimpleStore._ReadFile. This
can be used to default the return value of this method in case the ssconf file
is not present.

In this particular case it is used to return AF_INET in case
ssconf_primary_ip_familiy is absent. This is the case when upgrading
from 2.2 -> 2.3. This is intended behaviour as it is suboptimal to copy
the ssconf file manually to the nodes during an upgrade using
cfgupgrade.

In the concrete case of an upgrade from 2.2 -> 2.3 cfgupgrade will just
add the primary_ip_family parameter to the cluster configuration and the
daemons will start with default family AF_INET. This is perfectly fine,
since there is no AF_INET6 2.2 clusters. After that, the admin is
required (as in an major upgrade) to run 'gnt-cluster redist-conf' which
will write ssconf_primary_ip_family on all nodes.

Signed-off-by: default avatarManuel Franceschini <livewire@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 21d0f6c7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment