puppetlabs / puppet-agent

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

Use older rubygems-update on AIX 7.2 #2457

Closed joshcooper closed 6 months ago

joshcooper commented 6 months ago

The validate_vendored_ruby test started failing on AIX 7.2 when loading the gemspecs from artifactory:

# /opt/puppetlabs/puppet/bin/gem update --system -V
GET https://rubygems.org/specs.4.8.gz
304 Not Modified
GET https://artifactory.delivery.puppetlabs.net/artifactory/api/gems/rubygems/specs.4.8.gz
304 Not Modified
[FATAL] failed to allocate memory

It appears the new behavior is triggered when using the new safe marshall code introduced in rubygems-update[1]:

# truss -f -i -t kopen /opt/puppetlabs/puppet/bin/gem update --system
...
10813880: 11338039: kopen("/root/.local/share/gem/specs/rubygems.org%443/specs.4.8", 0440000002) = 9
10813880: 11338039: kopen("/opt/puppetlabs/puppet/lib/ruby/site_ruby/3.2.0/rubygems/safe_marshal.rb", 0440000004) = 9
...
10813880: 11338039: kopen("/root/.local/share/gem/specs/artifactory.delivery.puppetlabs.net%443/artifactory/api/gems/rubygems/specs.4.8", 0440000004) = 10
[FATAL] failed to allocate memory

Pin back to an older rubygems-update on AIX 7.2.

[1] https://github.com/rubygems/rubygems/pull/6896

joshcooper commented 6 months ago

I manually tested this using:

export SHA=e955ce4c2cf1cfa9ad43ad16e1d1df1c476cd45a
export GEM_SOURCE=https://artifactory.delivery.puppetlabs.net/artifactory/api/gems/rubygems/
bundle exec beaker-hostgenerator aix72-POWERfa%7Bpackaging_platform=aix-7.2-power%7D --hypervisor abs --disable-default-role --osinfo-version 1 > hosts.yaml
bundle exec rake ci:test:setup HOSTS=hosts.yaml
bundle exec beaker exec tests/validate_vendored_ruby.rb
joshcooper commented 6 months ago

This doesn't need to be backported because we already pinned this test to use rubygems 3.4.22 in the 7.x branch, see 3ce3b43922a4a8dd3aab18a8a77d3df8bb297df7