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

In v3.0.1-rc6 release network block macaddr value converts from upper to lower case #1182

Open
maksimsamt opened this issue Nov 26, 2024 · 4 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented resource/qemu Issue or PR related to Qemu resource type/bug

Comments

@maksimsamt
Copy link
Contributor

Network Block

Seems it is related with:
#1139

Adding resources:

      + network {
          + bridge    = "vmbr0"
          + firewall  = false
          + id        = 0
          + link_down = false
          + macaddr   = "AC:15:11:99:D5:11"
          + model     = "virtio"
          + tag       = 1111
        }

Removing resources:

      - network {
          - bridge    = "vmbr0" -> null
          - firewall  = false -> null
          - id        = 0 -> null
          - link_down = false -> null
          - macaddr   = "ac:15:11:99:d5:11" -> null
          - model     = "virtio" -> null
          - mtu       = 0 -> null
          - queues    = 0 -> null
          - rate      = 0 -> null
          - tag       = 1111 -> null
        }

I have some macaddr manipulations after VM provisioning (with provisioner "local-exec") and due to this change this action fails:

│ Error: Provider produced inconsistent final plan
│ 
│ When expanding the plan for terraform_data.* to include new values learned so far during apply, provider "terraform.io/builtin/terraform" produced an invalid new value for .triggers_replace[0]: was
│ cty.StringVal("AC:15:11:99:D5:11"), but now cty.StringVal("ac:15:11:99:d5:11").
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
@Tinyblargon
Copy link
Collaborator

@maksimsamt this was done on purpose to enforce the same case pve uses when it generates a mac address from the ui. As switching the case of the mac address counts as disconnecting and reconnecting the network interface.

@Tinyblargon
Copy link
Collaborator

Tinyblargon commented Nov 26, 2024

Also, all mac address formats are valid, even octal as we use the binary representation of the mac address.

Would using lower-case mac addresses in your be a solution for you?

Personally prefer upper-case mac address, so could make it default to uppercase.

@maksimsamt
Copy link
Contributor Author

@Tinyblargon,

Would using lower-case mac addresses in your be a solution for you?

Yes, already changed in my solution logic to use lower case values.

Personally prefer upper-case mac address, so could make it default to uppercase.

The same to me, upper-case mac address is more readable.

@Tinyblargon
Copy link
Collaborator

@maksimsamt gonna try to figure out if i can preserve the format when returning it.

I'll add it to RC7.

@Tinyblargon Tinyblargon added type/bug issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented resource/qemu Issue or PR related to Qemu resource labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented resource/qemu Issue or PR related to Qemu resource type/bug
Projects
None yet
Development

No branches or pull requests

2 participants