puppetlabs / puppet-agent

All of the directions for building a puppet agent package.
Other
47 stars 146 forks source link

[PA-5570] Added platform file for amazon 2023 aarch64 & amd64 for 7.x #2417

Closed span786 closed 9 months ago

span786 commented 10 months ago

Added platform file for amazon 2023 aarch64 & amd64 for 7.x branch

span786 commented 10 months ago

Vanagon generic builder is able to build puppet-agent but somehow it is failing to upload it to artifactory. Below is the link to generic builder execution:

https://jenkins-platform.delivery.puppetlabs.net/job/platform_vanagon-generic-builder_vanagon-packaging_generic-builder/2508/

mhashizume commented 10 months ago

I believe that your build failed because of packaging. It seems like the Vanagon Generic Builder uses the latest tag of packaging, which doesn't include your changes.

I would add your changes to the packaging changelog as Eric requested and create a new release of packaging following these instructions.

When testing changes to puppet-agent like this, I would use the ad hoc pipeline instead of the Vanagon generic builder, as the ad hoc pipeline is the most similar to our normal CI pipeline and can best replicate what it will look like once changes are merged.

I ran your changes in the ad hoc pipeline and ran into another issue: Beaker does not support these versions of Amazon Linux.

Jake added support to the Beaker 5 stream, but we are still using Beaker 4: https://github.com/puppetlabs/puppet-agent/blob/cf78697840819e305365b9808abe2a2e8fa61ca0/acceptance/Gemfile#L15

We have an epic to migrate to Beaker 5, but there's a lot of work to be done before we can do that.

I think for now, I would backport Jake's changes to the 4.x branch of Beaker and work with Vox Pupuli on creating a new Beaker 4 release.

span786 commented 10 months ago

Artifacts for Puppet-Agent 7.x are available in below links:

https://builds.delivery.puppetlabs.net/puppet-agent/97ecc790090922500ef0a560d562853ba0007e52/artifacts/amazon/?C=M&O=D

mhashizume commented 9 months ago

@span786 I've released both new Beaker (4.41.0) and packaging (0.112.0) versions today that should support this work.

However when I run your PR through the ad hoc pipeline with updated Beaker and packaging, I see a few issues.

x86_64 gives this error:

10:59:32   ip-10-227-4-66.amz-dev.puppet.net (ip-10-227-4-66.amz-dev.puppet.net) 18:59:32$ yum -y  install puppet-agent
10:59:32     PL Repo for puppet-agent at commit 97ecc7900909 648 kB/s |  61 kB     00:00    
10:59:33     Error: 
10:59:33      Problem: conflicting requests
10:59:33       - nothing provides /bin/mkdir needed by puppet-agent-7.27.0.37.g97ecc7900-1.amazon2023.x86_64
10:59:33     (try to add '--skip-broken' to skip uninstallable packages)

This looks like what we've seen in the past with CPR-644, which was solved in Vanagon in the project.spec template.

I think the same fix would work here, so you should update Vanagon for Amazon Linux 2023.

With aarch64, we see this issue:

14:10:35 Beaker::DSL::Outcomes::FailTest: 
14:10:35               :packaging_platform 'amazon-2023-arm64' for host 'ip-10-227-7-165.amz-dev.puppet.net' not in build details
14:10:35               :packaging_platform should be the platform-specific key from this list:
14:10:35                 ["amazon-2023-aarch64", "amazon-2023-x86_64", "ubuntu-20.04-amd64", "el-7-x86_64"]

I believe this is due to beaker-hostgenerator using "arm64" when everything else in the ecosystem uses "aarch64": https://github.com/voxpupuli/beaker-hostgenerator/blob/64f315292da95440a025223a47b57d767cdd7f0f/lib/beaker-hostgenerator/data.rb#L1114

I would try changing this line and doing a new beaker-hostgenerator release.

span786 commented 9 months ago

Hi @mhashizume,

I have raised following PR, please review them and let me know if any more changes are required.

https://github.com/puppetlabs/vanagon/pull/828 https://github.com/voxpupuli/beaker-hostgenerator/pull/345

I tried running 'ad-hoc' pipeline for Puppet-Agent using the Vanagon changes as per PR-828, it still failed with the same error. Here is the link to pipeline.