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

Support Flatcar #302

Closed
mcbenjemaa opened this issue Oct 14, 2024 · 14 comments · Fixed by #308
Closed

Support Flatcar #302

mcbenjemaa opened this issue Oct 14, 2024 · 14 comments · Fixed by #308
Assignees
Labels
enhancement New feature or request kind/feature
Milestone

Comments

@mcbenjemaa
Copy link
Member

Describe the solution you'd like
[A clear and concise description of what you want to happen.]

To support Flatcar, we must ensure that Proxmox can load the ignition data into the VM.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

we have a way of injecting an ISO into the VM; while providing ignition data.

Environment:

  • Cluster-api-provider-proxmox version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):
@tormath1
Copy link

tormath1 commented Oct 21, 2024

Hi, thanks for working on this. I am a Flatcar maintainer and I am involved on Cluster API topics too. For Flatcar support to work, we first need to get Ignition Proxmox support. You can track this here: flatcar/scripts#1783 (cross-ref: flatcar/Flatcar#1040)

@mcbenjemaa
Copy link
Member Author

@tormath1 yes, I know that,
However, I'm also trying to do some hacks by injecting an ISO as config-2 with the OpenStack provider.
don't know if that works though.

@tormath1
Copy link

What are your hacks? For what is worth, Flatcar + CAPO works fine at the moment. Feel free to join the Flatcar Matrix channel or #flatcar channel on Kubernetes Slack to discuss about this more interactively (https://github.com/flatcar/flatcar?tab=readme-ov-file#chat)

@wikkyk wikkyk added this to the v0.7.0 milestone Oct 23, 2024
@mcbenjemaa
Copy link
Member Author

networkd config should be adjusted so it can support our current features:

Ref: https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html

@tormath1
Copy link

Flatcar images are now available on Proxmox: https://www.flatcar.org/releases#release-4152.0.0

@vxav
Copy link

vxav commented Feb 13, 2025

Hi @mcbenjemaa and thanks for the flatcar PR!

I tried it and I see the iso gets mounted to the node VM.
I'm using CAPMOX 0.6.2 and a Flatcar image built with image-builder.

However it doesn't appear to be in the guest OS of the node VM. Ignition gets no data and /etc/hostname and /etc/proxmox-env (which I assume are the metadata) don't exist.

In the guest I see the device and I can mount it but it simply confirms the iso is attached to the VM.
The contents of the files look ok too.

builder@localhost ~ $ lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINTS
***
sr0      11:0    1   70K  0 rom

builder@localhost ~ $ sudo mount /dev/sr0 /mnt
mount: /mnt: WARNING: source write-protected, mounted read-only.

builder@localhost ~ $ sudo ls /mnt
meta-data  network-config  user-data

Any idea what could be missing here?

@mcbenjemaa
Copy link
Member Author

@vxav
Are you using the correct cluster template?
And did you enabled bootstrap format ignition?

@vxav
Copy link

vxav commented Feb 13, 2025

Yep I used the Flatcar flavor which sets the correct flags (format ignition included). The template looks right.

@mcbenjemaa
Copy link
Member Author

Please check the journalctl if there is anything wrong with ignition,
and also check if the afterburn runs successfully!

@vxav
Copy link

vxav commented Feb 13, 2025

Well ignition doesn't any source of metadata (log).

Do you have a proxmox flatcar image pushed somewhere? (S3 or else). I'd think my image is right but I don't really know what else it could be here.
I'm not familiar with afterburn so not sure where to look here but I noticed that /run/ignition.env is set to qemu.

localhost /home/builder # cat /run/ignition.env
OEM_ID=qemu
PLATFORM_ID=qemu

Shouldn't it be proxmoxve?

@mcbenjemaa
Copy link
Member Author

Exactly, you should set OEM_ID proxmoxve

@vxav
Copy link

vxav commented Feb 13, 2025

I used the new proxmox-flatcar image-builder flavor with make build-proxmox-flatcar.
Did you get the correct ID when you used it? Or did you build your images differently?

@vxav
Copy link

vxav commented Feb 13, 2025

I think I see what I missed here https://github.com/kubernetes-sigs/image-builder/blob/main/images/capi/packer/proxmox/README.md#flatcar-for-proxmox

## flatcar version
export FLATCAR_VERSION=4152.1.0
export FLATCAR_CHANNEL=beta

export OEM_ID=proxmoxve # make sure to choose OEM_ID=proxmoxve

I'll open a PR to update the proxmox doc as this is hidden in the sub folders so it's easy to miss

@mcbenjemaa
Copy link
Member Author

When you follow that.
You are good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kind/feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants