Skip to content

API call to XO fails when selecting PXE boot #311

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

Closed
ZeleniJure opened this issue Mar 9, 2024 · 1 comment · Fixed by #312
Closed

API call to XO fails when selecting PXE boot #311

ZeleniJure opened this issue Mar 9, 2024 · 1 comment · Fixed by #312
Assignees

Comments

@ZeleniJure
Copy link
Contributor

ZeleniJure commented Mar 9, 2024

When installation_method = "network" is used, terraform apply will fail with

Error: jsonrpc2: code 10 message: invalid parameters: {"errors":[{"instancePath":"/installation/repository","schemaPath":"#/properties/installation/properties/repository/minLength","keyword":"minLength","params":{"limit":1},"message":"must NOT have fewer than 1 characters"}]}

XO then logs the following error:

vm.create
{
  "CPUs": 1,
  "VDIs": [
    {
      "$SR": "[07167eb5-1f51-1449-f6f7-eb7be3d74638](https://XXXXX/#/srs/07167eb5-1f51-1449-f6f7-eb7be3d74638)",
      "SR": "[07167eb5-1f51-1449-f6f7-eb7be3d74638](https://XXXXX/#/srs/07167eb5-1f51-1449-f6f7-eb7be3d74638)",
      "name_description": "",
      "name_label": "kube1",
      "size": 42949672960,
      "type": "user"
    }
  ],
  "VIFs": [
    {
      "network": "ac06d0cd-e89f-a5f8-71d2-f69f5918403c

"
    }
  ],
  "auto_poweron": true,
  "bootAfterCreate": false,
  "cloudConfig": "#cloud-config\nhostname: kube1\nfqdn: kube1.internal\npackage_upgrade: true\n",
  "coreOs": false,
  "cpuCap": null,
  "cpuWeight": null,
  "existingDisks": {},
  "expNestedHvm": false,
  "high_availability": "",
  "hvmBootFirmware": "bios",
  "installation": {
    "method": "network",
    "repository": ""
  },
  "memoryMax": 4294967296,
  "name_description": "Kubernetes Control Plane 1",
  "name_label": "kube1",
  "tags": [
    "Ubuntu"
  ],
  "template": "[83b3cc80-7731-860b-e73b-75578ef0c2d5](https://XXXXX/#/pools/83b3cc80-7731-860b-e73b-75578ef0c2d5)-df1a0e64-3799-482b-aa9f-1ed713c7dac5

",
  "vga": "std",
  "videoram": 8
}
{
  "code": 10,
  "data": {
    "errors": [
      {
        "instancePath": "/installation/repository",
        "schemaPath": "#/properties/installation/properties/repository/minLength",
        "keyword": "minLength",
        "params": {
          "limit": 1
        },
        "message": "must NOT have fewer than 1 characters"
      }
    ]
  },
  "message": "invalid parameters",
  "name": "XoError",
  "stack": "XoError: invalid parameters
    at Module.invalidParameters (/etc/xen-orchestra/packages/xo-common/api-errors.js:26:11)
    at Xo.call (file:///etc/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:90:22)
    at Api.#callApiMethod (file:///etc/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:362:19)"
}

XO version: 6056a
Terraform provider version: >=0.26.1

@ddelnano
Copy link
Collaborator

This issue is fixed in v0.28.1. Thanks @ZeleniJure for reporting this and opening up a PR for the fix!

To provide some additional background on the issue, this was likely introduced around #231. That breakage was detected because there were terraform acceptance tests for most of the VM resource functionality. Unfortunately testing PXE booting is more difficult and addressing that is tracked in #156. This is something we should try to prioritize soon to ensure this doesn't break at a later time.

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

Successfully merging a pull request may close this issue.

2 participants