Skip to content
  • Manuel Franceschini's avatar
    Handle ENOENT case in ssconf.GetPrimaryIPFamily · 7dd999fc
    Manuel Franceschini authored
    
    
    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>
    7dd999fc