-
Notifications
You must be signed in to change notification settings - Fork 454
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
SCSI IDs changing on machines built with 2.60+. #2089
Comments
Hello, gavinwill! 🖐 Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle. If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests. |
@vasilsatanasov cannyou investigate to see if this is related to SR-IOV introduction? |
I did think it may be SR-IOV related from quickly looking at the diff from 2.5.1 > 2.6.0 Potentially may be available for PR to fix also |
Looking at it, @gavinwill , could you please provide and example HCL to reproduce the issue + Ubuntu version you are using ? |
Hi @vasilsatanasov I have just tested this out by building the provider against different commits If i taint machine and rebuild with building the provider against 9c25530 It fails and we see the scsi device order wrong and hence the ens161 nic. We use a slightly customised module. I am just parsing that down to minimal stand alone code so that you can repo. |
Thank you @gavinwill , waiting for the code for reproduction! |
Hi I have "converted" our module to a simple tf file with hard coded values but can repo the issue with the below config. If i specify the provider to be 2.5.1 and apply (after cleaning out .terraform folder to be sure including terraform init) the machine boots up fine with expected scsi order and nic is ens192 If I clean out the .terraform folder and update provider to 2.6.0+ the machine boots up but the nic is ens161 and the scsi ordering is changed. The change to terraform is only the provider version.
our locals contains
We use the address to populate our cloudinit and do a for each on the key in above tf. Hope this helps |
I have faced this same issue today, I could not work out why the order was incorrect on new VM builds, before finding this issue. VMs would come up, but the network would not come up so needed manual intervention via the console. v2.5.1:
v2.6.1:
This causes the network to not come up as ens160 now becomes ens224. Adam Horden |
@vasilsatanasov - this might be related to the SR-IOV enhancement? |
Looks like it is, as per @gavinwill 's report. |
After the introduction of the SR-IOV feature network adapters due to inconsistent check for changes in the `physical_function` attribute have been recreated after clone since the check always returned `true`. The result is that instead of updating existing NICs the relocate tack started after clone was always deleting the existing NICs and creating new ones. This was causing the new VM to be disconnected from network Changed the check for changes in `physical_function` attribute to treat nil and empty string equaly so missing `physical_function` attribute in the device compared to empty string from the schema won't be cosnidered as changed. Testing done: cloned VM from template with 2 nics and verified that there is network connectivity. Also verified the output from lspci command on the template VM and on the clone VM. Fixes hashicorp#2089 Signed-off-by: Vasil Atanasov <[email protected]>
Ref: #2089 Signed-off-by: Vasil Atanasov <[email protected]>
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Community Guidelines
Terraform
Terraform v1.3.0
Terraform Provider
v2.6.0
VMware vSphere
7.0.3.01700
Description
Hi
On building a VM from an Ubuntu OVF template we are seeing the scsi order change and therefore the interface naming change (which has impact as we use cloudinit and specify nic to configure)
On a machine deployed with provider 2.5.1 we see the correct ordering for us
This provides us with ens192
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
on the ubuntu machineWhen we deploy a brand new machine with provider 2.6.0+ we see the scsi order change
This change in order means that our nic interface name has changed since naming is
# example Interface names are generated as:
# en --> ethernet
# p0 --> bus number
# s31 --> slot number
ip link on this machine shows
2: ens161: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
Note - i need to get access via console in vmware since cant ssh to host as network config mismatch.
If i have a machine built on provider 2.5.1 then upgrade the provider to 2.6.0+ and do a plan we see that infra is up to date and no changes are planned. It seems it is on new vm creation with later provider the order is incorrect.
The text was updated successfully, but these errors were encountered: