Skip to navigationSkip to main contentSkip to footerScaleway Docs HomepageAsk our AI
Ask our AI

Fix loss of network access after upgrading a Debian-based OS image on a Private Network

Problem

When upgrading a Debian-based OS image to the latest version, you may experience a loss of network connectivity if your Instance is connected to a Private Network.

Typically, this may happen when Ubuntu is upgraded from either Ubuntu 22.04 Jammy Jellyfish or Ubuntu 24.04 Noble Numbat to Ubuntu 26.04 Resolute Raccoon.

Cause

This issue is caused by a change of behavior of Netplan, which is no longer able to read the file generated by /usr/bin/scw-vpc-ifup.

Note

This guide only applies to Instances that have had their OS upgraded from the initial pre-26.04 OS version present on the Instance image. New Ubuntu 26.04 Resolute Raccoon Instances are not affected. For example, if you start an Instance on 24.04 and upgrade the OS to 26.04, you will encounter this issue. However, if you start an Instance directly with the 26.04 image, the issue will not occur.

Solution

Update scaleway-ecosystem package before OS upgrade

Before upgrading the OS of the Instance to the latest version, make sure that the scaleway-ecosystem package is at least at version 0.0.17-1 or later to avoid this situation.

Use rescue mode when network connectivity is lost

If you have not been able to update the scaleway-ecosystem package prior to upgrading the OS, you may find yourself unable to connect to the Instance. To remediate this situation, apply the following steps.

When your Instance has lost network connectivity, rescue mode allows you to boot your Instance into a temporary operating system, running from the RAM of the Instance. Rescue mode is often used to diagnose and resolve issues such as faulty kernel configurations, networking issues, firewall configurations, and more.

  1. Switch the Instance boot-type to rescue and reboot your Instance into rescue mode using the CLI. Replace <Instance_ID> with the unique ID of your Instance, e.g., 0500ebd2-d70d-49af-a969-3ac09b6f7fff.

    scw instance server stop <Instance_ID>
    # Wait for the instance to be stopped.
    scw instance server update <Instance_ID> boot-type=rescue
    scw instance server start <Instance_ID>
  2. Once the Instance is rebooted, log in to your Instance using SSH and set up the environment to be able to chroot into it:

    cat /proc/partitions
    major minor #blocks name
    
    7        0      65480 loop0
    7        1      89120 loop1
    7        2      39760 loop2
    252      0   19531250 vda
    252      1   19417569 vda1
    252     14       4096 vda14
    252     15     108544 vda15
    8        0    9765625 sda
    8        1    3240943 sda1
    8       14       4096 sda14
    8       15     108544 sda15

    Then mount the partitions and get into the chroot:

    mount /dev/vda1 /mnt
    chroot /mnt
  3. Modify the usr/bin/scw-vpc-ifup.netplan file to apply the fix: add the umask 022 command after the EoF marker. After the modification, the file should look like this:

    #!/bin/bash
    
    iface=$(basename ${1})
    
    mkdir -p /run/netplan
    
    umask 077
    rm -f /etc/netplan/60-$iface-vpc.yaml
    cat > /run/netplan/60-$iface-vpc.yaml << EoF
    network:
      version: 2
      ethernets:
        $iface:
          dhcp4: true
          dhcp4-overrides:
            route-metric: 50
    EoF
    umask 022
    netplan apply
  4. Get out of the chroot and remove the mounts:

    umount /mnt
  5. Stop the Instance, switch back the Instance boot_type to local, and reboot the Instance. Replace <Instance_ID> with the unique ID of your Instance, e.g., 0500ebd2-d70d-49af-a969-3ac09b6f7fff.

    scw instance server stop <Instance_ID>
    # Wait for the instance to be stopped
    scw instance server update <Instance_ID> boot-type=local
    scw instance server start <Instance_ID>

    Once rebooted, your Instance will be reachable again.

  6. Install the definitive correction.

    The modified file is part of the scaleway-ecosystem package. A new package has been released with the correction so the newest package should be installed to ensure that a definitive fix is in place.

    apt get update
    apt -y install scaleway-ecosystem
Still need help?

Create a support ticket
No Results