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

proxmox-clone: "task_timeout is not expected here" #35

Open
ryapric opened this issue Sep 8, 2021 · 1 comment
Open

proxmox-clone: "task_timeout is not expected here" #35

ryapric opened this issue Sep 8, 2021 · 1 comment

Comments

@ryapric
Copy link

ryapric commented Sep 8, 2021

Overview of the Issue

According to the release commit for v1.0.2, proxmox-clone should support task_timeout as a build argument. However, Packer complains that it does not expect the argument.

Reproduction Steps

Given a file main.pkr.hcl:

packer {
  required_plugins {
    proxmox = {
      version = ">= 1.0.2"
      source  = "github.com/hashicorp/proxmox"
    }
  }
}

source "proxmox-clone" "main" {
  clone_vm     = "some_vm_template"
  node         = "some_node"
  password     = "some_password"
  proxmox_url  = "some_proxmox_url"
  task_timeout = "10m"
  username     = "some_username"
}

build {
  sources = ["source.proxmox-clone.main"]
}

Run packer init . && packer validate ., and observe the following error:

Error: Unsupported argument

  on main.pkr.hcl line 15:
  (source code not available)

An argument named "task_timeout" is not expected here.

Plugin and Packer version

Via packer version:

Packer v1.7.4

Plugin version scoped in the build file above, and also confirmed version number in local cache as ${HOME}}/.packer.d/plugins/github.com/hashicorp/proxmox/packer-plugin-proxmox_v1.0.2_x5.0_linux_amd64.

Operating system and Environment details

OS: Manjaro Linux
Architecture: x86_64

Log Fragments and crash.log files

PACKER_LOG=1 packer validate . yields:

2021/09/07 23:49:33 [INFO] Packer version: 1.7.4 [go1.16.6 linux amd64]                                                                                                                                                         [0/513]
2021/09/07 23:49:33 [TRACE] discovering plugins in /usr/bin                                                                                                                                                                            
2021/09/07 23:49:33 [TRACE] discovering plugins in /home/ryan/.packer.d/plugins
2021/09/07 23:49:33 [TRACE] discovering plugins in .
2021/09/07 23:49:33 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/09/07 23:49:33 [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/ryan/.packerconfig
2021/09/07 23:49:33 [WARN] Config file doesn't exist: /home/ryan/.packerconfig
2021/09/07 23:49:33 [INFO] Setting cache directory: /home/ryan/repos/opensourcecorp/ymir/reprex/packer_cache
2021/09/07 23:49:33 [TRACE] listing potential installations for "github.com/hashicorp/proxmox" that match ">= 1.0.2". plugingetter.ListInstallationsOptions{FromFolders:[]string{"/usr/bin/packer", ".", "/home/ryan/.packer.d/plugins"
}, BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*
sha256.digest)(0xc00026c100)}}}}
2021/09/07 23:49:33 [TRACE] Found the following "github.com/hashicorp/proxmox" installations: [{/home/ryan/.packer.d/plugins/github.com/hashicorp/proxmox/packer-plugin-proxmox_v1.0.2_x5.0_linux_amd64 v1.0.2}]
2021/09/07 23:49:33 [INFO] found external [-packer-default-plugin-name- proxmox-clone proxmox-iso] builders from proxmox plugin
2021/09/07 23:49:33 [TRACE] Starting internal plugin packer-builder-proxmox-clone
2021/09/07 23:49:33 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-builder-proxmox-clone"}
2021/09/07 23:49:33 Waiting for RPC address for: /usr/bin/packer
2021/09/07 23:49:34 packer-builder-proxmox-clone plugin: [INFO] Packer version: 1.7.4 [go1.16.6 linux amd64]
2021/09/07 23:49:34 packer-builder-proxmox-clone plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/09/07 23:49:34 packer-builder-proxmox-clone plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/ryan/.packerconfig
2021/09/07 23:49:34 packer-builder-proxmox-clone plugin: [WARN] Config file doesn't exist: /home/ryan/.packerconfig 
2021/09/07 23:49:34 packer-builder-proxmox-clone plugin: [INFO] Setting cache directory: /home/ryan/repos/opensourcecorp/ymir/reprex/packer_cache
2021/09/07 23:49:34 packer-builder-proxmox-clone plugin: args: []string{"packer-builder-proxmox-clone"}
2021/09/07 23:49:34 packer-builder-proxmox-clone plugin: Plugin address: unix /tmp/packer-plugin555706750
2021/09/07 23:49:34 packer-builder-proxmox-clone plugin: Waiting for connection...
2021/09/07 23:49:34 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin555706750
2021/09/07 23:49:34 packer-builder-proxmox-clone plugin: Serving a plugin connection...

  on main.pkr.hcl line 15:
  (source code not available)

Error: Unsupported argument
An argument named "task_timeout" is not expected here.


2021/09/07 23:49:34 [INFO] (telemetry) Finalizing.
  on main.pkr.hcl line 15:
  (source code not available)

An argument named "task_timeout" is not expected here.


2021/09/07 23:49:34 waiting for all plugin processes to complete...
2021/09/07 23:49:34 /usr/bin/packer: plugin process exited
@ryapric ryapric added the bug label Sep 8, 2021
@nywilken
Copy link
Contributor

nywilken commented Nov 1, 2022

Hi releases of the proxmox builders prior to v1.1.0, which was released today, were incorrectly registered as proxmox-promox-iso and proxmox-proxmox-clone. I suspect that this bug has to do with the the embedded version of the Proxmox being used over any externally installed version of the plugin.

You are encouraged to upgrade any locally installed version of this plugin to v1.1.0 and try again if you are still running into issues.

Refer to #119 for more details on the incorrectly registered builders.

You can use the Packer init command to install the plugin by adding the following block to your template.

packer {
  required_plugins {
     proxmox = {  
       version = ">= 1.1.0"
      source  = "github.com/hashicorp/proxmox"
    }
  }
}

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

No branches or pull requests

2 participants