Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with OS version name when building SeedImage #118

Closed
juadk opened this issue May 25, 2023 · 5 comments
Closed

Issue with OS version name when building SeedImage #118

juadk opened this issue May 25, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@juadk
Copy link
Collaborator

juadk commented May 25, 2023

With the default embedded channel registry.opensuse.org/isv/rancher/elemental/dev/teal53/15.4/rancher/elemental-teal-channel/5.3:latest , I see two OS version with the same name when I want to build ISO:

image

and both point to registry.opensuse.org/isv/rancher/elemental/dev/teal53/15.4/rancher/elemental-teal-iso/5.3:latest as baseImage.

David is aware and asked me to open that issue.

@juadk juadk added the bug Something isn't working label May 25, 2023
@aalves08
Copy link
Member

Hi @juadk .

That list of available ISO's now comes from the OS versions type iso:

https://github.com/rancher/elemental-ui/blob/main/pkg/elemental/components/BuildIso.vue#L51-L58
which comes from
https://github.com/rancher/elemental-ui/blob/main/pkg/elemental/components/BuildIso.vue#L31-L33

the code get's all the information from the OS versions (label and value), for which if you have a duplicated label, it means that you are importing stuff from the OS version channels that duplicate these. Can you confirm that's the scenario?

@juadk
Copy link
Collaborator Author

juadk commented May 25, 2023

yes, let me try to explain it better, ok for the double name but:
image
latest-dev points to:

    upgradeImage: >-
      registry.opensuse.org/isv/rancher/elemental/dev/teal53/15.4/rancher/elemental-teal/5.3:latest

and v1.1.4 points to:
upgradeImage: register.suse.com/rancher/elemental-teal/5.3:1.1.4

But when I create SeedImage with both of them, I see the same baseImage inside:

    baseImage: >-
    registry.opensuse.org/isv/rancher/elemental/dev/teal53/15.4/rancher/elemental-teal-iso/5.3:latest

If I'm not mistaken, v1.1.4 should point to the stable iso and not the dev one, @davidcassany could you confirm please?

@davidcassany
Copy link
Contributor

The contents of the channel are:

[
  {
    "metadata": {
      "name": "latest-dev"
    },
    "spec": {
      "version": "latest-dev",
      "type": "container",
      "metadata": {
        "upgradeImage": "%%IMG_REPO%%/rancher/elemental-teal/5.3:latest",
        "displayName": "Elemental Teal OS"
      }
    }
  },
  {
    "metadata": {
      "name": "latest-dev-iso"
    },
    "spec": {
      "version": "latest-dev",
      "type": "iso",
      "metadata": {
        "uri": "%%IMG_REPO%%/rancher/elemental-teal-iso/5.3:latest",
        "displayName": "Elemental Teal ISO x86_64"
      }
    }
  },
  {
    "metadata": {
      "name": "v1.1.4"
    },
    "spec": {
      "version": "v1.1.4",
      "type": "container",
      "metadata": {
        "upgradeImage": "register.suse.com/rancher/elemental-teal/5.3:1.1.4",
        "displayName": "Elemental Teal OS"
      }
    }
  },
  {
    "metadata": {
      "name": "v1.1.4-iso"
    },
    "spec": {
      "version": "v1.1.4",
      "type": "iso",
      "metadata": {
        "uri": "https://updates.suse.com/SUSE/Updates/ElementalTeal/5.3/x86_64/update/iso/elemental-teal.x86_64-1.1.4-Build3.2.30.iso",
        "displayName": "Elemental Teal ISO x86_64"
      }
    }
  }
]

So four managedOSVersions two of them being contianers and two being ISOs. The list in the OS versions seams to be fine, the list of the ISOs however seams to be wrong. I'd expect to see in the list the following items:

Elemental Teal ISO x86_64 v1.1.4 (points to .../update/iso/elemental-teal.x86_64-1.1.4-Build3.2.30.iso) and Elemental Teal ISO x86_64 latest-dev (points to .../rancher/elemental-teal-iso/5.3:latest).

So according to @juadk analysis it looks like there is something odd with the ISOs list, like if one overwrites the other. @aalves08 does the channel you get match the above list?

@aalves08
Copy link
Member

I believe, for same labels, it just get's the endpoint of the first option, even though you selected the second, because they are not unique.
With the memoization of the seedImage that I am currently working on (PR here) duplicate labels is going to become a problem.

@juadk
Copy link
Collaborator Author

juadk commented Jun 8, 2023

I was able to build ISO from dev and from stable in the UI!
image
side note: I manually edited the display name for the dev version

I booted one of my NUC with stable ISO and I got:

IMAGE_REPO="registry.suse.com/rancher/elemental-teal/5.3"
IMAGE_TAG="1.1.4-3.2.30"
IMAGE="registry.suse.com/rancher/elemental-teal/5.3:1.1.4-3.2.30"

And another NUC with dev ISO:

IMAGE_REPO="registry.opensuse.org/isv/rancher/elemental/dev/teal53/15.4/rancher/elemental-teal/5.3"
IMAGE_TAG="1.1.5-200.1"
IMAGE="registry.opensuse.org/isv/rancher/elemental/dev/teal53/15.4/rancher/elemental-teal/5.3:1.1.5-200.1"

The last thing is to use a different display name but that one is in the backend. So I would say all good from UI point of view.

PS: I will have to update our automation to use it instead of building dev ISO with SeedImage directly.

@juadk juadk closed this as completed Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants