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

fix(proxmox): use default values when possible #10208

Closed
wants to merge 1 commit into from

Conversation

aerialls
Copy link
Contributor

@aerialls aerialls commented Nov 2, 2020

Use default values when possible for the Proxmox provider.

  • Don't set a Description as the template will be used for "final" (non-ephemeral) VMs and the description will be wrong.
  • Don't hardcode Boot parameter. From my tests, this is breaking the booting order and will always load the CDROM every time. Let the API use the default value (hard-drive, cd-rom and network).

@codecov
Copy link

codecov bot commented Nov 2, 2020

Codecov Report

Merging #10208 (d205c9d) into master (28245ec) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted Files Coverage Δ
builder/proxmox/common/step_start_vm.go 17.36% <ø> (+0.11%) ⬆️
builder/azure/dtl/tempname.go 68.75% <0.00%> (-6.25%) ⬇️
builder/azure/arm/tempname.go 80.55% <0.00%> (-5.56%) ⬇️

@azr
Copy link
Contributor

azr commented Nov 4, 2020

cc @carlpett

QemuCpu: c.CPUType,
Description: "Packer ephemeral build VM",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be automatically either removed or replaced with the configured template description as part of the template-conversion step. Is this not happening for you?
I believe it is a good thing to have this in place during the build so others seeing the VM can understand what it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried again today and I can confirm that the description parameter is passed to the final VM. I've the following template.

$ qm config 200
name: ubuntu-20.04
description: Packer ephemeral build VM
template: 1
[...]

I've created a VM from this template.

$ qm config 108
name: templated
description: Packer ephemeral build VM
[...]

This is not critical but if the description is passed to the final VM, it's not that useful.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of this change @carlpett ? Should we go on with it ? 🙂 cheers !

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooops, must have missed this notification in the christmas mail heaps. Sorry!
What I would have expected in this is that the template with VMID 200 shouldn't have a description at all, it's supposed to be removed before being converted to a template. If it has stuck around somehow, then it's expected that it'll get cloned onto VMs built from the template.

I'm unable to reproduce this locally, though. Could you tell me what version of Packer and Proxmox you have, and a sample build configuration?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bump @aerialls -- did you see Carl's comment above?

@SwampDragons
Copy link
Contributor

@aerialls It's been a month, so I'm checking in -- any interest in addressing the review suggestions, or should I close this PR?

@aerialls
Copy link
Contributor Author

@SwampDragons Sorry I missed the reply, I'll check this week-end, thanks!

@SwampDragons
Copy link
Contributor

Is this ready for a re-review?

@aerialls
Copy link
Contributor Author

aerialls commented Jan 4, 2021

@SwampDragons Yes, good for me!

@ghost ghost removed the stage/waiting-reply label Jan 4, 2021
@azr azr added the stage/thinking Flagged for internal discussions about possible enhancements label Feb 5, 2021
@SwampDragons
Copy link
Contributor

@carlpett are you happy for me to merge?

@carlpett
Copy link
Collaborator

carlpett commented Apr 5, 2021

@SwampDragons Well, no, not really... @aerialls could you respond in the thread? I believe that the behaviour you are describing would be a bug. But I can't reproduce it.
The change you are proposing would of course "solve" this bug if it exists, but it'd also remove a useful feature. So I'd rather have the bug fixed, if possible.

@SwampDragons
Copy link
Contributor

Sorry, I forgot about the missing review. I'm going to close this in two weeks if we don't hear back, since I pinged a month ago on that thread.

@nywilken
Copy link
Member

nywilken commented Apr 20, 2021

@aerialls I closed this PR because of inactivity. If you find that you want to revisit this change please feel free to follow up int the Promox plugin repo, currently at github.com/hashicorp/packer-plugin-proxmox

cc @SwampDragons @carlpett

@nywilken nywilken closed this Apr 20, 2021
@ghost
Copy link

ghost commented May 21, 2021

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.

@hashicorp hashicorp locked as resolved and limited conversation to collaborators May 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
builder/proxmox stage/thinking Flagged for internal discussions about possible enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants