Giter Site home page Giter Site logo

Comments (12)

pdonias avatar pdonias commented on May 25, 2024 3

@julien-f Yes, the MAC addresses may be empty, let's fix it.

from xen-orchestra.

olivierlambert avatar olivierlambert commented on May 25, 2024 1

Ah indeed good catch. Let me ping @julien-f for this :)

from xen-orchestra.

olivierlambert avatar olivierlambert commented on May 25, 2024 1

Perfect, thanks for your investigation. We'll fix this :)

from xen-orchestra.

julien-f avatar julien-f commented on May 25, 2024 1

This looks like an TerraForm plugin issue and is not something to handle on XO's side.

Anyway, it's perfectly normal for vm.start to not work if it is passed an invalid host.

from xen-orchestra.

olivierlambert avatar olivierlambert commented on May 25, 2024

Hi,

By TF you mean the TerraForm plugin for XO? If yes, have you reported first to the XO TF Github? Also, could you reproduce the issue and find the exact broken commit?

Thanks!

from xen-orchestra.

josuemotte avatar josuemotte commented on May 25, 2024

Hello,

This TF : https://github.com/terra-farm/terraform-provider-xenorchestra , I'll open an issue there as well.

I found the commit : d6a3492 , this commit bring also another side effect which is that , users are forced to add a MAC Address when creating a VM.

Cheers

from xen-orchestra.

josuemotte avatar josuemotte commented on May 25, 2024

after more testing, the issue seems to be related to the argument : affinity_host of the resource xenorchestra_vm, if the value is not correct you won't receive any error just a broken VM.

The argument was previously optional but since d6a3492 it is now mandatory.

An issue is open on the TF project : terra-farm/terraform-provider-xenorchestra#231

from xen-orchestra.

julien-f avatar julien-f commented on May 25, 2024

@josuemotte I cannot reproduce the problem in XO itself, the issue may be in the TerraForm provider instead. If you can reproduce directly in XO, let me know.

@pdonias Can you check that VM creation in xo-web does not send an empty MAC address param? The parameter is optional but must not be empty.

from xen-orchestra.

josuemotte avatar josuemotte commented on May 25, 2024

hello @julien-f,

To reproduce the issue, you need to set affinity_host to a wrong value such as the pool id instead of the host id, the TF provider won't see it as an error since the formatting is correct.

The machine will be create in XO but the start will give the above error message, can the affinity_host parameter become optional like before ?

Here is how we ended with the error message :

resource "xenorchestra_vm" "vm" {
  for_each     = local.vm
  name_label   = each.key
  name_description = each.value.description
  memory_max   = (1073741824 * each.value.memory)
  cpus         = each.value.cpu
  cloud_config = templatefile("linux.tftpl",{
   name = each.key
  })
  cloud_network_config = templatefile("network.tftpl",{
   ipaddress = each.value.ipaddress
  })
  template     = "d627d80d-027a-3993-ad48-2b59b621f40e"
  affinity_host = "wrongid"
  network {
    network_id = "bb873991-36c0-a596-d25a-87e87e17b853"
    mac_address = each.value.mac_address
  }

  disk {
    sr_id = "5f7ae541-c9be-fae5-51d1-6fc830b1ffe7"
    name_label = each.key
    size = (1073741824 * each.value.disk_size)
  }

  tags = [
    "Linux",
    each.value.tags
  ]

  // Override the default create timeout from 5 mins to 20.
  timeouts {
    create = "5m"
  }
}

from xen-orchestra.

julien-f avatar julien-f commented on May 25, 2024

Closing, feel free to re-open if reproduced in XO itself.

from xen-orchestra.

josuemotte avatar josuemotte commented on May 25, 2024

@julien-f can't find the commit 7a999b4 in the master branch

from xen-orchestra.

julien-f avatar julien-f commented on May 25, 2024

@josuemotte The commit you are looking for is 954b29c

from xen-orchestra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.