Missing openSUSE-leap support

Bug #1843284 reported by Lee Trager
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Triaged
Wishlist
Unassigned

Bug Description

I tried to deploy an openSUSE image[1] and Curtin failed with the message below. This seems to be because /etc/os-release shows the ID as 'opensuse-leap'. Curtin should add support for opensuse-leap or alternatively process ID_LIKE when ID isn't found.

finish: cmd-install/stage-curthooks/builtin/cmd-curthooks: FAIL: curtin command curthooks
Traceback (most recent call last):
  File "/curtin/curtin/commands/main.py", line 202, in main
    ret = args.func(args)
  File "/curtin/curtin/commands/curthooks.py", line 1442, in curthooks
    builtin_curthooks(cfg, target, state)
  File "/curtin/curtin/commands/curthooks.py", line 1259, in builtin_curthooks
    distro_info = distro.get_distroinfo(target=target)
  File "/curtin/curtin/distro.py", line 117, in get_distroinfo
    variant = name_to_distro(variant_name)
  File "/curtin/curtin/distro.py", line 56, in name_to_distro
    return DISTROS[DISTROS.index(distname)]
ValueError: tuple.index(x): x not in tuple
tuple.index(x): x not in tuple
curtin: Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'curthooks']
Exit code: 3
Reason: -
Stdout: start: cmd-install/stage-curthooks/builtin/cmd-curthooks: curtin command curthooks
        Running curtin builtin curthooks
        finish: cmd-install/stage-curthooks/builtin/cmd-curthooks: FAIL: curtin command curthooks
        Traceback (most recent call last):
          File "/curtin/curtin/commands/main.py", line 202, in main
            ret = args.func(args)
          File "/curtin/curtin/commands/curthooks.py", line 1442, in curthooks
            builtin_curthooks(cfg, target, state)
          File "/curtin/curtin/commands/curthooks.py", line 1259, in builtin_curthooks
            distro_info = distro.get_distroinfo(target=target)
          File "/curtin/curtin/distro.py", line 117, in get_distroinfo
            variant = name_to_distro(variant_name)
          File "/curtin/curtin/distro.py", line 56, in name_to_distro
            return DISTROS[DISTROS.index(distname)]
        ValueError: tuple.index(x): x not in tuple
        tuple.index(x): x not in tuple

[1] https://download.opensuse.org/repositories/Cloud:/Images:/Leap_15.1/images/

Revision history for this message
Lee Trager (ltrager) wrote :
Revision history for this message
Lee Trager (ltrager) wrote :
Revision history for this message
Lee Trager (ltrager) wrote :

Please ignore the previous os-release upload, it was from Ubuntu instead of openSUSE.

Revision history for this message
Ryan Harper (raharper) wrote :

We'll likely pick up what cloud-init does to handle the variant (opensuse-leap) and use a common distro value (suse).

https://git.launchpad.net/cloud-init/tree/cloudinit/util.py#n599
https://git.launchpad.net/cloud-init/tree/cloudinit/util.py#n665

Revision history for this message
Ryan Harper (raharper) wrote :

After fixing the os-release lookup, the distro class needs a zypper implementation too.

Changed in curtin:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Lee Trager (ltrager) wrote :

I filed LP:1843440 for the missing packaging support.

Revision history for this message
Ryan Harper (raharper) wrote :

That's slightly different, the mapping is which distro packages provide a particular function for networking (do they have a package for vlans and bridges and bonds) or are they built-in to the base os (Centos did not have extra packages, but Ubuntu does).

After the mapping is complete, if any additional packages need to be installed in the target image, then we'll need curtin to run zypper, and currently there's no install_packack implementation for SuSE distro. So, we'll need one more bug unless we roll the fix into the mapping bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.