-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
No ip addresses are provided with enabled agent #776
Comments
I just tried some things and found out that a previous warning I also had is the reason for this. My template had the Edit: And at the moment I don't have a clue how the |
That could be related to #360, changing disk attributes while cloning might not always work as expected. Also, you many want to skip the
You can check your local
|
Hello,
I'm learning Terraform and I have exactly the same problem as described by the author. My template, with enabled qemu-agent, doesn't use iothread (default value is false). If i check the values of ipv4_addresses, ipv6_addresses or network_interface_names after the error, in TF, the list are empty. But on the Proxmox web UI the values are here. I've tried to adjust the agent timeout value but the default is 15m which is enough. ll see if I can dig into the problem. Don't hesitate to ask me if I can help to troubleshoot. |
I just rerun Terraform with the
But if I skip the disk block the disk wouldn't be cloned right?
Thats a good hint. I did a rerun without the |
Probably not. There are use cases for VMs with multiple interfaces (router, internal cluster networks, etc...), and even some use cases for one interface to have multiple addresses (high-availability using virtual ip). The provider waits for one "reasonable" ip address (i.e. better than link-local), this fixes the original issue, where link-local ipv6 address was obtained the faster than ipv4 from DHCP server. In cases where waiting for multiple interfaces/addresses is required, it should be possible to delay starting the qemu-guest-agent inside the VM until all addresses are obtained (by modifying guest agent's systemd unit dependencies).
Using fixed index like Using It might be useful to add something like (Changing behavior of existing |
I ran into this issue today, where the state refresh was timing out, and I wonder, could this be handled better? The API route being called was returning a 403 response in this case, so it would be possible for the provider to catch this case and show an error message to the user. If that's desired, I can open a separate issue to track that. |
Hi @Sorixelle! 👋🏼 Thanks for sharing your use case. That's a good suggestion, the provider can definitely handle this type of errors better. |
Marking this issue as stale due to inactivity in the past 180 days. This helps us focus on the active issues. If this issue is reproducible with the latest version of the provider, please comment. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
I was experiencing this issue. I followed the advice above: When I ran the terraform script a 2nd time, after it has created the vms, but failed to get the ip addresses, it did find the ipv4_addresses. What for me the problem was is that I enabled uefi and tpm, but I didn't have the efi_disk. After I added the efidisk, no warnings, and it did get the ipv4_addresses and everything. repo: https://github.com/Moortu/terraform-proxmox-talos-k8s |
I gave this a shot, and found that on first apply, I'd get |
I had this as well. Or are you getting any warnings in your log? |
Your setup is actually similar to mine. Downloading talos with the qemu-guest-agent extention from image factory. no uefi/secure boot. no warnings that appear related to me other than the error for the above function call I see in your setup, you actually have a 5second wait for outputs, so I'll give that a try. Edit: That didn't work. |
Any warning from the bgp provider or talos will most likely cause the problem. Even if it seems unrelated. Can you share your repo? |
https://github.com/neutralalice/talos-on-proxmox I went ahead and tried all the other things listed and still get the issue on first apply. I'm not yet at the point where nodes are joining together; this is just populating them on proxmox. With TF_LOG=WARN The only error I see other than the the element output function call error is.
Edit: @Moortu I had another chance to look at this and it ended up being strictly because the qemu guest agent had not yet started reporting out the interfaces. By upping the time delay of output to 10seconds, I would usually get the IPv4 address, but not the ipv6 address. By increasing it to 15-20s, I get all of the ipv4 and most(but not always all!) of the ipv6 address. 25seconds seems to be enough time for me to always get the ip addresses on first apply. |
that agent timeout behaved strangely for me. |
Yea, this does seem to be it with no need for a sleep timer. I had the timeout really low because I used to load the guest agent in via cloud-init, before image factory came along - so I had a really low timeout to compensate; looks like the sleep timer resource gave just enough buffer to get a qemu response. Moving on from that, I wonder if there is something in this function that can make waiting for the interface IP addresses to be more robust. As mentioned, without a sleep timer after resource creation, I only seem to be getting the an ipv4 address and a link-local ipv6, but I'm actually only interested in the global ipv6 address since the rest of my network runs ipv6 (mostly non dual-stack). |
Describe the bug
I try to clone a vm from a template with an enabled agent. I've found the issue #100 which looks like it's related to my problem.
It looks like the provider doesn't wait long enough (or something like that) because the ip is displayed in the Proxmox gui at the vm summary. Obviously the ip is not instantly available to Proxmox but after a couple of seconds after the vm started.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The provider should wait the defined (or default) value of the
timeout
optionScreenshots
IP in the Proxmox GUI
The error
Additional context
The text was updated successfully, but these errors were encountered: