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

[BUG] Keeps waiting for all interfaces to have an IP #64

Open
ksaio opened this issue Jan 10, 2021 · 3 comments
Open

[BUG] Keeps waiting for all interfaces to have an IP #64

ksaio opened this issue Jan 10, 2021 · 3 comments
Labels
Milestone

Comments

@ksaio
Copy link

ksaio commented Jan 10, 2021

Describe the bug
Provider will wait for all network interfaces to have an IP, if you use docker some interfaces might not get an IP address and there for the provider will hang trying to refresh state.

Here is the code that waits for IP.
https://github.com/danitso/terraform-provider-proxmox/blob/master/proxmox/virtual_environment_vm.go#L182

To Reproduce
Create VM with Linux (I used Ubuntu 20.04)
Install docker
Setup some containers
Interfaces like veth* will be created without any IP
Now try terraform plan / apply

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether da:32:b5:8b:48:ea brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.91/24 brd 10.0.0.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::d832:b5ff:fe8b:48ea/64 scope link
       valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:28:31:3b:ce brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
4: br-28149d5850db: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:00:2d:80:b1 brd ff:ff:ff:ff:ff:ff
    inet 172.18.0.1/16 brd 172.18.255.255 scope global br-28149d5850db
       valid_lft forever preferred_lft forever
8: veth15c0c67@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-28149d5850db state UP group default
    link/ether 46:ab:52:0a:ae:2f brd ff:ff:ff:ff:ff:ff link-netnsid 0
12: vetha425024@if11: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-28149d5850db state UP group default
    link/ether 42:d3:d1:e5:6d:5e brd ff:ff:ff:ff:ff:ff link-netnsid 2
14: vetha7e1e62@if13: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-28149d5850db state UP group default
    link/ether 16:e2:f4:d9:af:9d brd ff:ff:ff:ff:ff:ff link-netnsid 1

Expected behavior
Should just refresh state even if interfaces does not have IP address.

Screenshots
proxmox_virtual_environment_vm.vm: Refreshing state... [id=1051]

@blz-ea
Copy link
Contributor

blz-ea commented Jan 15, 2021

Hey @ksaio.
Can you see VM's IP address in UI? In the Summary section do you see IP addresses exposed by VM's QEMU Agent ?

@danitso-dp
Copy link
Collaborator

@ksaio I've created #70 as an example of how we can solve this issue. The PR also enables the provider to wait for bonded or teamed interfaces, if you narrow the list of prefixes to bond and team.

@danitso-dp
Copy link
Collaborator

@ksaio check out #72 instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants