diff --git a/.github/workflows/image-centos.yml b/.github/workflows/image-centos.yml index 510e37d1f..9a8deb330 100644 --- a/.github/workflows/image-centos.yml +++ b/.github/workflows/image-centos.yml @@ -17,20 +17,17 @@ on: jobs: centos: - runs-on: ${{ matrix.architecture == 'arm64' && 'Ubuntu_ARM64_4C_16G_01' || 'ubuntu-20.04' }} + runs-on: ${{ matrix.architecture == 'arm64' && 'Ubuntu_ARM64_4C_16G_01' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: release: - - 7 # CentOS 7 tests require cgroups v1. They will pass on ubuntu-20.04 runner. - 9-Stream variant: - default - cloud architecture: - ${{ (inputs.build-arm64 == true || github.event.schedule == '0 0 * * 1') && 'arm64' ||'amd64' }} - exclude: - - {architecture: arm64, release: 7} env: type: "container" distro: "${{ github.job }}" @@ -62,14 +59,6 @@ jobs: [ "${ARCH}" = "arm64" ] && IMAGE_ARCH="aarch64" EXTRA_ARGS="" - if [ "${RELEASE}" = "7" ] && [ "${ARCH}" != "amd64" ]; then - EXTRA_ARGS="-o source.url=http://mirror.math.princeton.edu/pub/centos-altarch/ -o source.skip_verification=true" - fi - - if [ "${RELEASE}" = "7" ]; then - EXTRA_ARGS="${EXTRA_ARGS} -o packages.manager=yum" - fi - if [ "${RELEASE}" = "9-Stream" ]; then EXTRA_ARGS="${EXTRA_ARGS} -o source.variant=boot" EXTRA_ARGS="${EXTRA_ARGS} -o source.url=https://mirror1.hs-esslingen.de/pub/Mirrors/centos-stream" diff --git a/bin/test-image b/bin/test-image index 348b112ef..5e2e4c3b9 100755 --- a/bin/test-image +++ b/bin/test-image @@ -180,12 +180,6 @@ for url in $(lxc query "/1.0/instances" | jq -r .[] | grep "${TEST_IMAGE}"); do continue fi - # Skip CentOS 7 VMs due to racy agent - if [ "${TYPE}" = "vm" ] && [ "${DISTRO}" = "centos" ] && [ "${RELEASE}" = "7" ]; then - echo "===> SKIP: CentOS 7 has an unstable agent: ${name}" - continue - fi - # Systemd cleanliness. if lxc exec "${name}" -- test -d /run/systemd/system/; then if lxc exec "${name}" -- systemctl --failed 2>&1 | grep -qwF 'failed'; then diff --git a/images/centos.yaml b/images/centos.yaml index 5381ebc6c..71978c5b7 100644 --- a/images/centos.yaml +++ b/images/centos.yaml @@ -3,134 +3,11 @@ image: simplestream: distro_name: CentOS - requirements: - - requirements: - cgroup: v1 - releases: - - 7 source: downloader: centos-http url: https://mirror.math.princeton.edu/pub/centos/ keys: - # RPM-GPG-KEY-CentOS-6 - - |- - -----BEGIN PGP PUBLIC KEY BLOCK----- - - mQINBE4P06MBEACqn48FZgYkG2QrtUAVDV58H6LpDYEcTcv4CIFSkgs6dJ9TavCW - NyPBZRpM2R+Rg5eVqlborp7TmktBP/sSsxc8eJ+3P2aQWSWc5ol74Y0OznJUCrBr - bIdypJllsD9Fe+h7gLBXTh3vdBEWr2lR+xA+Oou8UlO2gFbVFQqMafUgU1s0vqaE - /hHH0TzwD0/tJ6eqIbHwVR/Bu6kHFK4PwePovhfvyYD9Y+C0vOYd5Ict2vbLHz1f - QBDZObv4M6KN3j7nzme47hKtdMd+LwFqxM5cXfM6b5doDulWPmuGV78VoX6OR7el - x1tlfpuiFeuXYnImm5nTawArcQ1UkXUSYcTUKShJebRDLR3BycxR39Q9jtbOQ29R - FumHginovEhdUcinRr22eRXgcmzpR00zFIWoFCwHh/OCtG14nFhefuZ8Z80qbVhW - 2J9+/O4tksv9HtQBmQNOK5S8C4HNF2M8AfOWNTr8esFSDc0YA5/cxzdfOOtWam/w - lBpNcUUSSgddRsBwijPuWhVA3NmA/uQlJtAo4Ji5vo8cj5MTPG3+U+rfNqRxu1Yc - ioXRo4LzggPscaTZX6V24n0fzw0J2k7TT4sX007k+7YXwEMqmHpcMYbDNzdCzUer - Zilh5hihJwvGfdi234W3GofttoO+jaAZjic7a3p6cO1ICMgfVqrbZCUQVQARAQAB - tEZDZW50T1MtNiBLZXkgKENlbnRPUyA2IE9mZmljaWFsIFNpZ25pbmcgS2V5KSA8 - Y2VudG9zLTYta2V5QGNlbnRvcy5vcmc+iQI8BBMBAgAmBQJOD9OjAhsDBQkSzAMA - BgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQCUb8osEFud6ajRAAnb6d+w6Y/v/d - MSy7UEy4rNquArix8xhqBwwjoGXpa37OqTvvcJrftZ1XgtzmTbkqXc+9EFch0C+w - ST10f+H0SPTUGuPwqLkg27snUkDAv1B8laub+l2L9erzCaRriH8MnFyxt5v1rqWA - mVlRymzgXK+EQDr+XOgMm1CvxVY3OwdjdoHNox4TdVQWlZl83xdLXBxkd5IRciNm - sg5fJAzAMeg8YsoDee3m4khg9gEm+/Rj5io8Gfk0nhQpgGGeS1HEXl5jzTb44zQW - qudkfcLEdUMOECbu7IC5Z1wrcj559qcp9C94IwQQO+LxLwg4kHffvZjCaOXDRiya - h8KGsEDuiqwjU9HgGq9fa0Ceo3OyUazUi+WnOxBLVIQ8cUZJJ2Ia5PDnEsz59kCp - JmBZaYPxUEteMtG3yDTa8c8jUnJtMPpkwpSkeMBeNr/rEH4YcBoxuFjppHzQpJ7G - hZRbOfY8w97TgJbfDElwTX0/xX9ypsmBezgGoOvOkzP9iCy9YUBc9q/SNnflRWPO - sMVrjec0vc6ffthu2xBdigBXhL7x2bphWzTXf2T067k+JOdoh5EGney6LhQzcp8m - YCTENStCR+L/5XwrvNgRBnoXe4e0ZHet1CcCuBCBvSmsPHp5ml21ahsephnHx+rl - JNGtzulnNP07RyfzQcpCNFH7W4lXzqM= - =jrWY - -----END PGP PUBLIC KEY BLOCK----- - - # RPM-GPG-KEY-CentOS-Security-6 - - |- - -----BEGIN PGP PUBLIC KEY BLOCK----- - - mQINBE4P134BEAC+ho3SNeLTnB4VaQHl1MFnsRHPEseN82AGiusUYlu+MR8pZ90P - F9Kv97idgKcEhdG7kGrCqGS5DOvLbv5UOyOEeNf9Zd9bvE2MEQ6XWa6IcffeunAp - RfFo71CAuTfvix7ewCkFf/SvRx28mHVOeCtpjVU6BQ9XXMnXPFiD1YALJEif8YF1 - qq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2gBCADPM3WDbdHNnMAB0FPvVRIBjGpkpeWT5rsbMZbk35tCx7MbAhMk - zcN519xw7DGVLigFd68S3W2Lrde6ioyVQ1SVSJ7z84U4uYUfSa858Dskxxy021Ip - NrocTrziy773v1gCPwA5xeT89bgzsMVMzCSy0U7TeqMDhN2urEMG5CCEpy0K9XZv - bpUexhn7TbP10g5BzC9igd498QcW/69Oz5OK7WcZOtqmGn78pGBCH2ly+IqIV6ZS - 9yXC6jOmOnA8fM0gKJAelhQALd77cULMSGbu96ReG3BEFlgWQjbtZG3L5BvMVInw - MkUQEntHvjp6oHtPiIAc3VtLq0IxWVygFHNRABEBAAG0cENlbnRPUyBBbHRBcmNo - IFNJRyAtIEFBcmNoNjQgKGh0dHA6Ly93aWtpLmNlbnRvcy5vcmcvU3BlY2lhbElu - dGVyZXN0R3JvdXAvQWx0QXJjaC9BQXJjaDY0KSA8c2VjdXJpdHlAY2VudG9zLm9y - Zz6JATkEEwECACMFAlW3h2gCGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAK - CRBsfLbvMF1J1pSFCACQbLvjwCFdgr0DpVJZ0o50Dcl8jYzZtd/NZOBNYXi/TQza - c6DFhiAj72zkgOGb+xznUXJJIiOLCgyJBUdJQSRx/EfVb9ftd4kSOA/wErOhDV71 - Hyww9M/gz82SjHF9qq8ofDto6ZfJMfiLX4aZwR39jZzS5Gm+bH5FfgxlwG0V88fu - aKlzsn3p975uD659tSKae4xLysxkBG6oDaXvnWI2/UGC724gN+R3aKe9kI0wk8wA - h5Qzf7+jRk0qb859rryno1rBpuzxJcwg5qvN2PXG3xDFOHG+3LX3mV3UnVAqCjHO - zyGnzAAiNfBwgMyu6bu4lXd4hbZKy73RwnouQkuA - =qiwp - -----END PGP PUBLIC KEY BLOCK----- - # RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32 - |- -----BEGIN PGP PUBLIC KEY BLOCK----- @@ -256,39 +133,6 @@ files: - path: /var/lib/dbus/machine-id generator: remove -- name: ifcfg-eth0 - path: /etc/sysconfig/network-scripts/ifcfg-eth0 - generator: dump - templated: true - content: |- - DEVICE=eth0 - BOOTPROTO=dhcp - ONBOOT=yes - HOSTNAME=LXC_NAME - NM_CONTROLLED=no - TYPE=Ethernet - MTU= - DHCP_HOSTNAME=LXC_NAME - releases: - - 7 - types: - - container - -- name: ifcfg-eth0.lxd - path: /etc/sysconfig/network-scripts/ifcfg-eth0 - generator: template - content: |- - DEVICE=eth0 - BOOTPROTO=dhcp - ONBOOT=yes - HOSTNAME={{ container.name }} - NM_CONTROLLED=no - TYPE=Ethernet - MTU= - DHCP_HOSTNAME={{ container.name }} - releases: - - 7 - - path: /etc/default/grub generator: dump content: |- @@ -305,15 +149,6 @@ files: types: - vm -- path: /etc/dracut.conf.d/lxd.conf - generator: dump - content: |- - add_drivers+=" virtio_scsi virtio_pci virtio_console " - types: - - vm - releases: - - 7 - - path: /etc/dracut.conf.d/lxd.conf generator: dump content: |- @@ -327,36 +162,6 @@ files: types: - vm -- name: lxd-agent-workaround.service - path: /etc/systemd/system/lxd-agent-workaround.service - generator: dump - content: |- - [Unit] - Description=LXD - agent (centos workaround) - Before=lxd-agent.service - - [Service] - Type=oneshot - ExecStart=-/bin/mkdir /run/lxd_agent - - [Install] - WantedBy=multi-user.target - types: - - vm - releases: - - 7 - -- name: lxd-agent.override - path: /etc/systemd/system/lxd-agent.service.d/lxd.conf - generator: dump - content: |- - [Service] - WorkingDirectory=/run/lxd_agent - types: - - vm - releases: - - 7 - - name: 86-nm-unmanaged.rules path: /etc/udev/rules.d/86-nm-unmanaged.rules generator: dump @@ -385,40 +190,6 @@ files: variants: - cloud -- name: network-config - generator: cloud-init - variants: - - cloud - releases: - - 7 - types: - - container - -- name: network-config - generator: cloud-init - content: |- - {%- if config_get("cloud-init.network-config", "") == "" -%} - {%- if config_get("user.network-config", "") == "" -%} - version: 1 - config: - - type: physical - name: eth0 - subnets: - - type: dhcp - control: auto - {%- else -%} - {{- config_get("user.network-config", "") -}} - {%- endif -%} - {%- else -%} - {{- config_get("cloud-init.network-config", "") -}} - {%- endif %} - variants: - - cloud - releases: - - 7 - types: - - vm - - name: network-config generator: cloud-init variants: @@ -461,12 +232,6 @@ packages: - vim-minimal action: install - - packages: - - cronie-noanacron - action: install - releases: - - 7 - - packages: - cronie-anacron - NetworkManager @@ -514,18 +279,8 @@ packages: types: - vm releases: - - 7 - 9-Stream - - packages: - - kernel-plus - - irqbalance - action: install - types: - - vm - releases: - - 7 - - packages: - kernel action: install @@ -540,7 +295,6 @@ packages: types: - vm releases: - - 7 - 9-Stream architectures: - x86_64 @@ -550,24 +304,10 @@ packages: action: install types: - vm - releases: - - 7 architectures: - aarch64 actions: -- trigger: post-unpack - action: |- - #!/bin/sh - set -eux - - # Enable the centosplus repo which has a kernel with 9p support - sed -i 's/^enabled=0/enabled=1/' /etc/yum.repos.d/CentOS-Base.repo - types: - - vm - releases: - - 7 - - trigger: post-unpack action: |- #!/bin/sh @@ -580,49 +320,6 @@ actions: sed -ri 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf fi -- trigger: post-unpack - action: |- - #!/bin/sh - set -eux - - # Note: This will be reverted at the end of the build - - # Use baseurl instead of mirrorlist to avoid networking issues - for repo in $(ls /etc/yum.repos.d/*.repo); do - grep -q '^#baseurl' "${repo}" || continue - - cp "${repo}" "${repo}.bak" - - sed -ri 's/^mirrorlist=.*/#\0/g;s@^#(baseurl=)http://mirror.centos.org/(.*)@\1https://mirror.csclub.uwaterloo.ca/\2@g' "${repo}" - done - releases: - - 7 - architectures: - - x86_64 - -- trigger: post-unpack - action: |- - #!/bin/sh - set -eux - - # Note: This will be reverted at the end of the build - - # Use baseurl instead of mirrorlist to avoid networking issues - for repo in $(ls /etc/yum.repos.d/*.repo); do - grep -q '^#baseurl' "${repo}" || continue - - cp "${repo}" "${repo}.bak" - - sed -ri 's/^mirrorlist=.*/#\0/g;s@^#(baseurl=)http://mirror.centos.org/altarch/(.*)@\1https://mirror.init7.net/centos-altarch/\2@g' "${repo}" - done - releases: - - 7 - architectures: - - aarch64 - - armhfp - - ppc64le - - i386 - - trigger: post-unpack action: |- #!/bin/sh @@ -679,7 +376,6 @@ actions: types: - vm releases: - - 7 - 9-Stream - trigger: post-packages @@ -708,32 +404,6 @@ actions: localedef -i en_US -f UTF-8 en_US.UTF-8 echo 'LANG=en_US.utf8' > /etc/locale.conf -- trigger: post-files - action: |- - #!/bin/sh - set -eux - - mount -t tmpfs tmpfs /sys/firmware - mkdir /sys/firmware/efi - - # Regenerate initramfs - kver=$(ls /boot/initramfs-*.img | sed -r 's#.*initramfs-(.+)\.img#\1#') - dracut --kver "${kver}" -f - - target="$(readlink -f /etc/grub2-efi.cfg)" - grub2-mkconfig -o "${target}" - - umount /sys/firmware - - sed -i "s#root=[^ ]*#root=/dev/sda2#g" "${target}" - - # Workaround for broken systemd in centos7 - systemctl enable lxd-agent-workaround.service - types: - - vm - releases: - - 7 - - trigger: post-files action: |- #!/bin/sh