From b4300db307f542d2ece7ad9f487f078d00210a27 Mon Sep 17 00:00:00 2001 From: Lari Hotari Date: Wed, 14 Apr 2021 17:36:59 +0300 Subject: [PATCH] Add current ip address, long hostname and short hostname to /etc/hosts Fixes #10232 --- .github/actions/tune-runner-vm/action.yml | 31 +++++++++++++++++++ .github/workflows/ci-build-macos.yaml | 3 ++ .github/workflows/ci-cpp.yaml | 3 ++ .github/workflows/ci-go-functions-style.yaml | 3 ++ .github/workflows/ci-go-functions-test.yaml | 3 ++ ...i-integration-backwards-compatibility.yaml | 3 ++ .github/workflows/ci-integration-cli.yaml | 3 ++ .../workflows/ci-integration-function.yaml | 3 ++ .../workflows/ci-integration-messaging.yaml | 3 ++ .github/workflows/ci-integration-process.yaml | 3 ++ .github/workflows/ci-integration-schema.yaml | 3 ++ .github/workflows/ci-integration-sql.yaml | 3 ++ .../workflows/ci-integration-standalone.yaml | 3 ++ .github/workflows/ci-integration-thread.yaml | 3 ++ .../ci-integration-tiered-filesystem.yaml | 3 ++ .../ci-integration-tiered-jcloud.yaml | 3 ++ .../workflows/ci-integration-transaction.yaml | 3 ++ .github/workflows/ci-license.yaml | 3 ++ .github/workflows/ci-maven-cache-update.yaml | 3 ++ .../workflows/ci-pulsar-website-build.yaml | 3 ++ .github/workflows/ci-pulsarbot.yaml | 3 ++ .github/workflows/ci-shade-test.yaml | 3 ++ .../workflows/ci-unit-broker-broker-gp1.yaml | 3 ++ .../workflows/ci-unit-broker-broker-gp2.yaml | 3 ++ .../workflows/ci-unit-broker-client-api.yaml | 3 ++ .../workflows/ci-unit-broker-client-impl.yaml | 3 ++ .github/workflows/ci-unit-broker-other.yaml | 3 ++ .github/workflows/ci-unit-proxy.yaml | 3 ++ .github/workflows/ci-unit.yaml | 3 ++ 29 files changed, 115 insertions(+) create mode 100644 .github/actions/tune-runner-vm/action.yml diff --git a/.github/actions/tune-runner-vm/action.yml b/.github/actions/tune-runner-vm/action.yml new file mode 100644 index 0000000000000..59f977c315063 --- /dev/null +++ b/.github/actions/tune-runner-vm/action.yml @@ -0,0 +1,31 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +name: Tune Runner VM performance +description: tunes the GitHub Runner VM operation system +runs: + using: composite + steps: + - run: | + if [[ "$OSTYPE" == "linux-gnu"* ]]; then + # Ensure that reverse lookups for current hostname are handled properly + # Add the current IP address, long hostname and short hostname record to /etc/hosts file + echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts + fi + shell: bash \ No newline at end of file diff --git a/.github/workflows/ci-build-macos.yaml b/.github/workflows/ci-build-macos.yaml index 9cc345333f14b..4a35687fb9028 100644 --- a/.github/workflows/ci-build-macos.yaml +++ b/.github/workflows/ci-build-macos.yaml @@ -42,6 +42,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Cache Maven dependencies uses: actions/cache@v2 with: diff --git a/.github/workflows/ci-cpp.yaml b/.github/workflows/ci-cpp.yaml index 54ff67cfd1510..8d3ab3ad8e6bc 100644 --- a/.github/workflows/ci-cpp.yaml +++ b/.github/workflows/ci-cpp.yaml @@ -40,6 +40,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-go-functions-style.yaml b/.github/workflows/ci-go-functions-style.yaml index 805bce226bdfb..caf69f360298d 100644 --- a/.github/workflows/ci-go-functions-style.yaml +++ b/.github/workflows/ci-go-functions-style.yaml @@ -48,6 +48,9 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-go-functions-test.yaml b/.github/workflows/ci-go-functions-test.yaml index 942d2388fda51..d31d6e7fb7ec7 100644 --- a/.github/workflows/ci-go-functions-test.yaml +++ b/.github/workflows/ci-go-functions-test.yaml @@ -50,6 +50,9 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-integration-backwards-compatibility.yaml b/.github/workflows/ci-integration-backwards-compatibility.yaml index 10b3d6e7dd9ca..ae61fb7d4ff66 100644 --- a/.github/workflows/ci-integration-backwards-compatibility.yaml +++ b/.github/workflows/ci-integration-backwards-compatibility.yaml @@ -40,6 +40,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-integration-cli.yaml b/.github/workflows/ci-integration-cli.yaml index 2ffd6ef6bbcb6..81c898a545da2 100644 --- a/.github/workflows/ci-integration-cli.yaml +++ b/.github/workflows/ci-integration-cli.yaml @@ -40,6 +40,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-integration-function.yaml b/.github/workflows/ci-integration-function.yaml index c1c55c7fa048d..e8a5c3d12d92c 100644 --- a/.github/workflows/ci-integration-function.yaml +++ b/.github/workflows/ci-integration-function.yaml @@ -40,6 +40,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-integration-messaging.yaml b/.github/workflows/ci-integration-messaging.yaml index 72ac6f813d312..d470ebb2f5c8e 100644 --- a/.github/workflows/ci-integration-messaging.yaml +++ b/.github/workflows/ci-integration-messaging.yaml @@ -40,6 +40,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-integration-process.yaml b/.github/workflows/ci-integration-process.yaml index 24022b3d80ee6..b21aeacb44a8e 100644 --- a/.github/workflows/ci-integration-process.yaml +++ b/.github/workflows/ci-integration-process.yaml @@ -39,6 +39,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-integration-schema.yaml b/.github/workflows/ci-integration-schema.yaml index a33a696b8fe20..2608c0155c400 100644 --- a/.github/workflows/ci-integration-schema.yaml +++ b/.github/workflows/ci-integration-schema.yaml @@ -39,6 +39,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-integration-sql.yaml b/.github/workflows/ci-integration-sql.yaml index 8d2388c6d9416..56af4218bd717 100644 --- a/.github/workflows/ci-integration-sql.yaml +++ b/.github/workflows/ci-integration-sql.yaml @@ -39,6 +39,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-integration-standalone.yaml b/.github/workflows/ci-integration-standalone.yaml index 6f5e8b03ec71a..8d1bc94d3d2e2 100644 --- a/.github/workflows/ci-integration-standalone.yaml +++ b/.github/workflows/ci-integration-standalone.yaml @@ -39,6 +39,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-integration-thread.yaml b/.github/workflows/ci-integration-thread.yaml index 8a9d4ec7c504d..6d08f00e4a8a2 100644 --- a/.github/workflows/ci-integration-thread.yaml +++ b/.github/workflows/ci-integration-thread.yaml @@ -39,6 +39,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-integration-tiered-filesystem.yaml b/.github/workflows/ci-integration-tiered-filesystem.yaml index d7980ab2a7d05..724262fec1685 100644 --- a/.github/workflows/ci-integration-tiered-filesystem.yaml +++ b/.github/workflows/ci-integration-tiered-filesystem.yaml @@ -39,6 +39,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-integration-tiered-jcloud.yaml b/.github/workflows/ci-integration-tiered-jcloud.yaml index 5fc03d5512377..b707f1616882b 100644 --- a/.github/workflows/ci-integration-tiered-jcloud.yaml +++ b/.github/workflows/ci-integration-tiered-jcloud.yaml @@ -39,6 +39,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-integration-transaction.yaml b/.github/workflows/ci-integration-transaction.yaml index 2141011e7d121..fbbea210e60bb 100644 --- a/.github/workflows/ci-integration-transaction.yaml +++ b/.github/workflows/ci-integration-transaction.yaml @@ -39,6 +39,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-license.yaml b/.github/workflows/ci-license.yaml index e9d4d40bed017..ead5b1aede208 100644 --- a/.github/workflows/ci-license.yaml +++ b/.github/workflows/ci-license.yaml @@ -40,6 +40,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-maven-cache-update.yaml b/.github/workflows/ci-maven-cache-update.yaml index dc442a35c7b39..311acb54b8973 100644 --- a/.github/workflows/ci-maven-cache-update.yaml +++ b/.github/workflows/ci-maven-cache-update.yaml @@ -72,6 +72,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check if: ${{ github.event_name != 'schedule' }} id: changes diff --git a/.github/workflows/ci-pulsar-website-build.yaml b/.github/workflows/ci-pulsar-website-build.yaml index ded10634826e8..cd343e93688e5 100644 --- a/.github/workflows/ci-pulsar-website-build.yaml +++ b/.github/workflows/ci-pulsar-website-build.yaml @@ -35,6 +35,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Cache local Maven repository uses: actions/cache@v2 with: diff --git a/.github/workflows/ci-pulsarbot.yaml b/.github/workflows/ci-pulsarbot.yaml index de73391bc7fb3..b85600be3296f 100644 --- a/.github/workflows/ci-pulsarbot.yaml +++ b/.github/workflows/ci-pulsarbot.yaml @@ -38,6 +38,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Execute pulsarbot command id: pulsarbot if: github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/pulsarbot') diff --git a/.github/workflows/ci-shade-test.yaml b/.github/workflows/ci-shade-test.yaml index f63733aafdb94..2854af4e52b63 100644 --- a/.github/workflows/ci-shade-test.yaml +++ b/.github/workflows/ci-shade-test.yaml @@ -40,6 +40,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-unit-broker-broker-gp1.yaml b/.github/workflows/ci-unit-broker-broker-gp1.yaml index c4fd56c2d27a4..2c90fcc952d00 100644 --- a/.github/workflows/ci-unit-broker-broker-gp1.yaml +++ b/.github/workflows/ci-unit-broker-broker-gp1.yaml @@ -40,6 +40,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-unit-broker-broker-gp2.yaml b/.github/workflows/ci-unit-broker-broker-gp2.yaml index 402dc1b594e4f..2a36ddbe020fe 100644 --- a/.github/workflows/ci-unit-broker-broker-gp2.yaml +++ b/.github/workflows/ci-unit-broker-broker-gp2.yaml @@ -40,6 +40,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-unit-broker-client-api.yaml b/.github/workflows/ci-unit-broker-client-api.yaml index c2c6a0b4758d4..e1dbc6e7ee241 100644 --- a/.github/workflows/ci-unit-broker-client-api.yaml +++ b/.github/workflows/ci-unit-broker-client-api.yaml @@ -40,6 +40,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-unit-broker-client-impl.yaml b/.github/workflows/ci-unit-broker-client-impl.yaml index a26be7ba1ca9e..3e9546e1b18f5 100644 --- a/.github/workflows/ci-unit-broker-client-impl.yaml +++ b/.github/workflows/ci-unit-broker-client-impl.yaml @@ -40,6 +40,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-unit-broker-other.yaml b/.github/workflows/ci-unit-broker-other.yaml index 023d2b330364b..e0734d73eaa71 100644 --- a/.github/workflows/ci-unit-broker-other.yaml +++ b/.github/workflows/ci-unit-broker-other.yaml @@ -40,6 +40,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-unit-proxy.yaml b/.github/workflows/ci-unit-proxy.yaml index de2db845c33ec..3b69d60840a21 100644 --- a/.github/workflows/ci-unit-proxy.yaml +++ b/.github/workflows/ci-unit-proxy.yaml @@ -40,6 +40,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master diff --git a/.github/workflows/ci-unit.yaml b/.github/workflows/ci-unit.yaml index 8c5d9c3785692..a76b84be33460 100644 --- a/.github/workflows/ci-unit.yaml +++ b/.github/workflows/ci-unit.yaml @@ -40,6 +40,9 @@ jobs: - name: checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm + - name: Changed files check id: changes uses: apache/pulsar-test-infra/paths-filter@master