Skip to content

Move boot iso configuration into boot_iso object #1705

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jseely
Copy link
Contributor

@jseely jseely commented Mar 11, 2025

Change description

  • Migrates deprecated iso_* configurations into boot_iso configuration object
  • Adds feature flag iso_download_pve which causes the proxmox instance to download the ISO (and triggers reuse of the image if it's already been downloaded)
    • Tested with flatcar image creation
    • Ubuntu image creation failed so I left it as false by default

Additional context

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 11, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mboersma for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 11, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @jseely. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 11, 2025
@drew-viles
Copy link
Contributor

Since this (in theory) should work, we should probably consider setting the "iso_download_pve": false, to a user var as well as you have with the other vars so that people can override it if they so wish.

Other than that, all looks good to me!

@drew-viles
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 18, 2025
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 16, 2025
@drew-viles
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 23, 2025
@drew-viles
Copy link
Contributor

drew-viles commented Jun 23, 2025

@jseely Sorry for the delay on this, We're very short on maintainers at the moment. We'll get to this soon :-) I'm just testing now.

@jseely
Copy link
Contributor Author

jseely commented Jun 23, 2025

No worries, appreciate your service! 😉

@drew-viles
Copy link
Contributor

drew-viles commented Jun 23, 2025

I'm having a heck of a time trying to get this to build. But also when running on main too. Being extremely tired + not being a proxmox user probably isn't helping :-D

So every time I try and run a build I'm getting

1 error(s) occurred:

* one of iso_file, iso_url, or a combination of cd_files and cd_content must be
specified for boot_iso

I'm passing in the right params from what I can tell for Ubuntu builds - for example

{
        "kubernetes_rpm_version": "1.33.2",
        "kubernetes_semver": "v1.33.2",
        "kubernetes_series": "v1.33",
        "kubernetes_deb_version": "1.33.2-1.1",
        "iso_url": "https://releases.ubuntu.com/noble/ubuntu-24.04.2-live-server-amd64.iso",
        "iso_checksum": "d6dab0c3a657988501b4bd76f1297c053df710e06e0c3aece60dead24f270b4d",
        "iso_checksum_type": "sha256",
        "iso_storage_pool": "local",
        "storage_pool": "local-zfs"
}

You said you'd managed to get this to build on flatcar but had issues with the iso_download_pve parameter, did you manage to get a Ubuntu one to build too with that set to false?

I can get it to build if I manually hardcode the values in the packer.json file so it does, in theory, work. But I'm unable to get it working with any user vars.

Were you?

@drew-viles
Copy link
Contributor

You know what. Ignore me. I had a rouge ISO_FILE env var still set. Tiredness it was :-D - build is going now - all being well I'll lgtm it and assign it

@drew-viles
Copy link
Contributor

OK so builds are working, however the problem I'm seeing is that I'm having to manually remove either iso_file OR iso_url from the packer.json.tmpl depending on which one I'm using. It seems if they are both supplied, the plugin is none too happy!

This seems to be expected behaviour
https://github.com/hashicorp/packer-plugin-proxmox/blob/8d7f07ffa3e85d730a0726a17e38ddc9687fa211/builder/proxmox/common/config.go#L251-L255

https://github.com/hashicorp/packer-plugin-proxmox/blob/8d7f07ffa3e85d730a0726a17e38ddc9687fa211/builder/proxmox/common/config.go#L680-L698

Problem is, because we're using JSON I'm a little stuck on how to proceed with this.
There are probably "dirty" ways we could achieve it but I don't want to head down that route.

I'll have a think but in the meantime if yourself or anyone else can point out either something I'm missing (again, none proxmox expert here) or another way of achiving this, I'm open to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants