ddelnano / packer-plugin-xenserver

A builder plugin for Packer.IO to support building XenServer images.
Mozilla Public License 2.0
76 stars 37 forks source link

Fix ISO SR config #42

Closed heindsight closed 1 year ago

heindsight commented 2 years ago

The GetISOSR function was using config.SrName instead of config.ISOSrName to look up the ISO SR, resulting in using the wrong SR. In addition to fixing this bug, I've also made the sr_iso_name config optional (defaulting to the default SR for the pool).

To get the pool default SR, I've had to work around a compatibility issue with newer XenAPI version in go-xen-api-client. In particular, some values for the pool allowed_operations are not recognised, resulting in a parse error when retrieving pool records. The workaround is to work with pool refs instead of pool records.

ddelnano commented 2 years ago

I'm so sorry for the late reply on this and greatly appreciate you taking the time to improve the packer plugin! I've had a ton of travel, personal things and my contributions to another project have been taking up my time.

I plan to look at this within the next week or two!

ddelnano commented 1 year ago

@heindsight sorry for the late follow up! I'm trying to work through the backlog of PRs and I've opened #63 to follow up with this.

There was a recent change that fixed the bug you were working on, so this new PR will only focus on the default SR fallback you implemented. There are some additional changes needed since the config structure still thinks that sr_iso_name is a required field. I'm working on fixing that and doing the final testing.

ddelnano commented 1 year ago

63 is merged now. Thanks for contributing and apologies for taking so long on this one!