Update/Reload without downtime #3123
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Yum based Linux | |
on: | |
push: | |
branches: | |
- master | |
- fluent-package-lts-v5 | |
pull_request: | |
concurrency: | |
group: ${{ github.head_ref || github.sha }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
timeout-minutes: 120 | |
strategy: | |
fail-fast: false | |
matrix: | |
label: | |
- RockyLinux 8 x86_64 | |
- AlmaLinux 9 x86_64 | |
- Amazon Linux 2 x86_64 | |
- Amazon Linux 2023 x86_64 | |
include: | |
- label: RockyLinux 8 x86_64 | |
rake-job: rockylinux-8 | |
test-docker-image: rockylinux:8 | |
centos-stream: false | |
- label: AlmaLinux 9 x86_64 | |
rake-job: almalinux-9 | |
test-docker-image: almalinux:9 | |
centos-stream: false | |
- label: Amazon Linux 2 x86_64 | |
rake-job: amazonlinux-2 | |
test-docker-image: amazonlinux:2 | |
centos-stream: false | |
- label: Amazon Linux 2023 x86_64 | |
rake-job: amazonlinux-2023 | |
test-docker-image: amazonlinux:2023 | |
centos-stream: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt -V install ruby ruby-bundler ruby-serverspec | |
sudo gem install bundler:2.2.9 --no-document | |
sudo gem uninstall fileutils | |
- name: cache rpm | |
uses: actions/cache@v4 | |
id: cache-rpm | |
with: | |
path: | | |
fluent-package/yum/repositories | |
v6-test/fluent-package/yum/repositories | |
key: ${{ runner.os }}-cache-${{ matrix.rake-job }}-${{ hashFiles('**/config.rb', '**/Rakefile', '**/Gemfile*', '**/*.spec.in', 'fluent-package/templates/**', 'fluent-package/yum/**/Dockerfile') }} | |
- name: Build rpm with Docker | |
if: ${{ ! steps.cache-rpm.outputs.cache-hit }} | |
run: | | |
rake yum:build YUM_TARGETS=${{ matrix.rake-job }} | |
- uses: actions/checkout@master | |
if: ${{ ! steps.cache-rpm.outputs.cache-hit }} | |
with: | |
path: v6-test | |
- name: Build v6 rpm with Docker | |
if: ${{ ! steps.cache-rpm.outputs.cache-hit }} | |
run: | | |
cd v6-test | |
git config user.email "[email protected]" | |
git config user.name "Fluentd developers" | |
git am fluent-package/bump-version-v6.patch | |
rake yum:build YUM_TARGETS=${{ matrix.rake-job }} | |
- name: Upload fluent-package rpm | |
uses: actions/upload-artifact@v4 | |
with: | |
name: packages-${{ matrix.rake-job }} | |
path: fluent-package/yum/repositories | |
- name: Upload v6 fluent-package rpm | |
uses: actions/upload-artifact@v4 | |
with: | |
name: v6-packages-${{ matrix.rake-job }} | |
path: v6-test/fluent-package/yum/repositories | |
# TODO move the following steps to "Test" job | |
- name: Check Package Size | |
run: | | |
fluent-package/yum/pkgsize-test.sh ${{ matrix.rake-job }} x86_64 | |
- name: Installation Test | |
run: | | |
mkdir -p .bundle | |
docker run \ | |
--rm \ | |
--tty \ | |
--env CI=true \ | |
--volume ${PWD}:/fluentd:ro \ | |
--env CENTOS_STREAM=${{ matrix.centos-stream }} \ | |
${{ matrix.test-docker-image }} \ | |
/fluentd/fluent-package/yum/install-test.sh | |
- name: Serverspec Test | |
run: | | |
mkdir -p .bundle | |
docker run \ | |
--rm \ | |
--tty \ | |
--env CI=true \ | |
--volume ${PWD}:/fluentd:ro \ | |
--env CENTOS_STREAM=${{ matrix.centos-stream }} \ | |
${{ matrix.test-docker-image }} \ | |
/fluentd/fluent-package/yum/serverspec-test.sh | |
- name: Confluent Test | |
run: | | |
mkdir -p .bundle | |
docker run \ | |
--rm \ | |
--tty \ | |
--env CI=true \ | |
--volume ${PWD}:/fluentd:ro \ | |
${{ matrix.test-docker-image }} \ | |
/fluentd/fluent-package/yum/confluent-test.sh | |
- name: Binstubs Test | |
run: | | |
mkdir -p .bundle | |
docker run \ | |
--rm \ | |
--tty \ | |
--env CI=true \ | |
--volume ${PWD}:/fluentd:ro \ | |
--env CENTOS_STREAM=${{ matrix.centos-stream }} \ | |
${{ matrix.test-docker-image }} \ | |
/fluentd/fluent-package/yum/binstubs-test.sh | |
v1test: | |
name: Test ${{ matrix.label }} ${{ matrix.test }} (CGroup V1) | |
needs: build | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
label: | |
- AmazonLinux 2 x86_64 | |
- AmazonLinux 2023 x86_64 | |
test: | |
- "update-from-v4.sh" | |
- "downgrade-to-v4.sh" | |
- "install-newly.sh local" | |
- "install-newly.sh v5" | |
- "install-newly.sh lts" | |
- "update-to-next-version.sh" | |
- "update-to-next-version-with-backward-compat-for-v4.sh" | |
- "update-to-next-version-service-status.sh enabled active" | |
- "update-to-next-version-service-status.sh enabled inactive" | |
- "update-to-next-version-service-status.sh disabled active" | |
- "update-to-next-version-service-status.sh disabled inactive" | |
- "update-to-next-version-with-auto-and-manual.sh" | |
- "update-to-next-major-version.sh" | |
- "update-without-data-lost.sh v5 v6" | |
- "update-without-data-lost.sh v6 v5" | |
include: | |
- label: AmazonLinux 2 x86_64 | |
rake-job: amazonlinux-2 | |
lxc-image: images:amazonlinux/2 | |
- label: AmazonLinux 2023 x86_64 | |
rake-job: amazonlinux-2023 | |
lxc-image: images:amazonlinux/2023 | |
exclude: | |
- label: AmazonLinux 2023 x86_64 | |
test: update-from-v4.sh | |
- label: AmazonLinux 2023 x86_64 | |
test: update-to-next-version-with-backward-compat-for-v4.sh | |
- label: AmazonLinux 2023 x86_64 | |
test: downgrade-to-v4.sh | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-${{ matrix.rake-job }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: v6-packages-${{ matrix.rake-job }} | |
path: v6-test | |
- uses: canonical/[email protected] | |
- name: Run diagnostic | |
run: | | |
uname -a | |
echo "::group::snap info lxd" | |
snap info lxd | |
echo "::endgroup::" | |
echo "::group::snap services lxd" | |
snap services lxd | |
echo "::endgroup::" | |
echo "::group::snap logs lxd" | |
sudo snap logs lxd | |
echo "::endgroup::" | |
echo "::group::lxc remote list" | |
lxc remote list | |
echo "::endgroup::" | |
echo "::group::lxc list images:" | |
lxc image list images: | |
echo "::endgroup::" | |
- name: Run Test ${{ matrix.test }} on ${{ matrix.lxc-image }} | |
run: fluent-package/yum/systemd-test/test.sh ${{ matrix.lxc-image }} ${{ matrix.test }} | |
v2test: | |
name: Test ${{ matrix.label }} ${{ matrix.test }} (CGroup V2) | |
needs: build | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
label: | |
- RockyLinux 8 x86_64 | |
- AlmaLinux 9 x86_64 | |
test: | |
- "update-from-v4.sh" | |
- "downgrade-to-v4.sh" | |
- "install-newly.sh local" | |
- "install-newly.sh v5" | |
- "install-newly.sh lts" | |
- "update-to-next-version.sh" | |
- "update-to-next-version-with-backward-compat-for-v4.sh" | |
- "update-to-next-version-service-status.sh enabled active" | |
- "update-to-next-version-service-status.sh enabled inactive" | |
- "update-to-next-version-service-status.sh disabled active" | |
- "update-to-next-version-service-status.sh disabled inactive" | |
- "update-to-next-version-with-auto-and-manual.sh" | |
- "update-to-next-major-version.sh" | |
- "update-without-data-lost.sh v5 v6" | |
- "update-without-data-lost.sh v6 v5" | |
include: | |
- label: RockyLinux 8 x86_64 | |
rake-job: rockylinux-8 | |
lxc-image: images:rockylinux/8 | |
- label: AlmaLinux 9 x86_64 | |
rake-job: almalinux-9 | |
lxc-image: images:almalinux/9 | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-${{ matrix.rake-job }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: v6-packages-${{ matrix.rake-job }} | |
path: v6-test | |
- uses: canonical/[email protected] | |
- name: Run Test ${{ matrix.test }} on ${{ matrix.lxc-image }} | |
run: fluent-package/yum/systemd-test/test.sh ${{ matrix.lxc-image }} ${{ matrix.test }} |