Skip to content

Commit f05b7c6

Browse files
authored
Merge pull request #499 from jpartlow/add-arm64-support-to-acceptance-8.x
Add arm64 support to acceptance 8.x
2 parents 51582a6 + d0b421c commit f05b7c6

228 files changed

Lines changed: 504 additions & 221 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/acceptance.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
name: Beaker OpenVox Acceptance Tests
33
run-name: |-
4-
Beaker acceptance tests of openvox for
4+
Beaker acceptance tests of openvox
5+
on ${{ inputs.guest-arch }} runners for
56
${{ inputs.pre-release-build && 'pre-release' || 'release' }}
67
packages of openvox-agent
78
${{ (inputs.pre-release-build && inputs.openvox-agent-version) ||
@@ -80,6 +81,20 @@ on:
8081
true)
8182
default: 'https://s3.osuosl.org/openvox-artifacts'
8283
type: string
84+
guest-arch:
85+
description: |-
86+
The architecture of the guest VMs to run the acceptance tests
87+
on. This is used by the nested_vms action to determine which
88+
VM images to use.
89+
90+
If not provided, the default is x86_64.
91+
92+
NOTE: Currently only x86_64 *runners* support nested
93+
virtualization, so if guest-arch is set to arm64, the
94+
nested_vms will run under qemu and be quite a bit slower
95+
(5x-20x).
96+
type: string
97+
default: 'x86_64'
8398

8499
permissions:
85100
contents: read
@@ -103,3 +118,4 @@ jobs:
103118
openvox-server-version: ${{ inputs.openvox-server-version }}
104119
openvox-server-pre-release-build: ${{ inputs.pre-release-build }}
105120
artifacts-url: ${{ inputs.artifacts-url }}
121+
guest-arch: ${{ inputs.guest-arch }}

acceptance/pre-suite/010_set_puppetserver_memory_defaults.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
end
1313

1414
if half_mem > 2048
15-
on(master, "sed -i -E -e '/^JAVA_ARGS=/ s/-Xms[0-9]+[m|g] -Xmx[0-9]+[m|g]/-Xms#{half_mem}m -Xmx#{half_mem}m/' #{defaults_dir}/puppetserver")
15+
mem_regex = "-Xms[0-9]+[m|g][[:blank:]]+-Xmx[0-9]+[m|g]"
16+
mem_replacement = "-Xms#{half_mem}m -Xmx#{half_mem}m"
17+
on(master, <<~EOS)
18+
sed -i -E \
19+
-e '/^JAVA_ARGS=/ s/#{mem_regex}/#{mem_replacement}/' \
20+
#{defaults_dir}/puppetserver
21+
EOS
1622
on(master, "cat #{defaults_dir}/puppetserver")
1723
else
1824
logger.info("System memory on the primary is less than 4GB (#{(mem_in_bytes.to_i / megabytes)}m). Leaving the defult 2GB for Puppetserver memory.")
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
test_name 'Set Puppetserver start and reload timeouts' do
2+
skip_test 'No primary node to configure Puppetserver timeouts for' unless master
3+
4+
start_timeout = options['puppetserver-start-timeout']
5+
reload_timeout = options['puppetserver-reload-timeout']
6+
skip_test 'No timeout options specified, skipping' if (start_timeout.nil? && reload_timeout.nil?)
7+
8+
# Update the defaults used internally by the puppetserver
9+
# service scripts.
10+
defaults_dir = case master.platform
11+
when /debian|ubuntu/ then '/etc/default'
12+
else '/etc/sysconfig'
13+
end
14+
15+
exprs = []
16+
exprs << "-e '/^START_TIMEOUT=/ s/=.*$/=#{start_timeout}/'" if !start_timeout.nil?
17+
exprs << "-e '/^RELOAD_TIMEOUT=/ s/=.*$/=#{reload_timeout}/'" if !reload_timeout.nil?
18+
on(master, "sed -i #{exprs.join(' ')} #{defaults_dir}/puppetserver")
19+
on(master, "cat #{defaults_dir}/puppetserver")
20+
21+
# And update the defaults used by the systemd service unit.
22+
# Puppetserver will effectively timeout a start at whichever
23+
# is shorter...
24+
if !start_timeout.nil?
25+
dropin_dir = '/etc/systemd/system/puppetserver.service.d'
26+
on(master, <<~EOS)
27+
mkdir -p #{dropin_dir}
28+
printf '[Service]\\nTimeoutStartSec=#{start_timeout}\\n' \
29+
> #{dropin_dir}/timeouts.conf
30+
EOS
31+
on(master, 'systemctl daemon-reload')
32+
on(master, 'systemctl cat puppetserver.service')
33+
end
34+
end

acceptance/tests/agent/agent_disable_lockfile.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# The validation of the `vardir` at the OS level
44
# should be accomplished in another test.
55
'audit:high',
6-
'audit:refactor' # This test should not require a master. Remove the use of `with_puppet_running_on`.
6+
'audit:refactor', # This test should not require a master. Remove the use of `with_puppet_running_on`.
7+
'shard:group1' # For splitting out groups of tests for slow test runners
78

89
#
910
# This test is intended to ensure that puppet agent --enable/--disable

acceptance/tests/agent/agent_fails_with_unknown_resource.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
test_name "agent run should fail if it finds an unknown resource type" do
22
tag 'audit:high',
3-
'audit:integration'
3+
'audit:integration',
4+
'shard:group2' # For splitting out groups of tests for slow test runners
45

56
require 'puppet/acceptance/common_utils'
67

acceptance/tests/agent/agent_parses_json_catalog.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
'audit:high', # tests defined catalog format
55
'audit:integration', # There is no OS specific risk here.
66
'server',
7-
'catalog:json'
7+
'catalog:json',
8+
'shard:group3' # For splitting out groups of tests for slow test runners
89

910
require 'puppet/acceptance/common_utils'
1011
require 'json'

acceptance/tests/agent/fallback_to_cached_catalog.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
tag 'audit:high',
44
'audit:integration', # This test is not OS sensitive.
5-
'audit:refactor' # A catalog fixture can be used for this test. Remove the usage of `with_puppet_running_on`.
5+
'audit:refactor', # A catalog fixture can be used for this test. Remove the usage of `with_puppet_running_on`.
6+
'shard:group4' # For splitting out groups of tests for slow test runners
67

78
step "run agents once to cache the catalog" do
89
with_puppet_running_on master, {} do

acceptance/tests/agent/last_run_summary_report.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
test_name "The 'last_run_summary.yaml' report has the right location and permissions" do
2-
tag 'audit:high'
2+
tag 'audit:high',
3+
'shard:group1' # For splitting out groups of tests for slow test runners
34

45
require 'puppet/acceptance/temp_file_utils'
56
extend Puppet::Acceptance::TempFileUtils

acceptance/tests/aix/aix_package_provider.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
test_name "aix package provider should work correctly" do
22

33
tag 'audit:high',
4-
'audit:acceptance' # OS specific by definition.
4+
'audit:acceptance', # OS specific by definition.
5+
'shard:group2' # For splitting out groups of tests for slow test runners
56

67
confine :to, :platform => /aix/
78

acceptance/tests/aix/nim_package_provider.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
test_name "NIM package provider should work correctly"
22

33
tag 'audit:high',
4-
'audit:acceptance' # OS specific by definition
4+
'audit:acceptance', # OS specific by definition
5+
'shard:group3' # For splitting out groups of tests for slow test runners
56

67
# nim test is slow, confine to only aix 7.2 and recent puppet versions
78
confine :to, :platform => "aix" do |aix|

0 commit comments

Comments
 (0)