Skip to content

Solution import script should exit early if trying to import the same solution from a different ISO #3108

Open
@alexandre-allard

Description

@alexandre-allard

Component: solutions, scripts

What happened:
Trying to import a Solution already present with a different archive (in the same version), we end up with a not user friendly Salt error:

2021-02-11 09:38:39,311 [salt.state       :3607][CRITICAL][27035] Rendering SLS 'metalk8s-2.6.0:metalk8s.solutions.available' failed: while constructing a mapping
  in "<unicode string>", line 6, column 1
found conflicting ID 'Mountpoint for Solution hyperdrive 0.2.2 exists'
  in "<unicode string>", line 49, column 1

What was expected:
The script bails out early with a nice and clear error message.

Steps to reproduce:

  • Import a solution ISO
  • Make a copy of it
  • Import this copy

Resolution proposal (optional):
Check the content of the archive in metalk8s_solutions.configure_archive Salt module and exit with a clear error message if there already is an archive providing the same "solution name" + "version" couple.

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity:easySomething that requires less than a day to fixkind:bugSomething isn't workingtopic:solutionsAnything related to external "Solutions" integration with the platform

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions