From b86905be477ded5bbea7c8349162bb6733c8d2cf Mon Sep 17 00:00:00 2001 From: amanda Date: Mon, 24 Jan 2022 16:51:01 +0000 Subject: [PATCH 1/7] Minor updates for Rocky --- CHANGELOG.rst | 5 ++++- contrib/linux/actions/service.py | 1 + st2common/bin/st2ctl | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 83e57db146..2edf93b7e2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,9 @@ Fixed Added ~~~~~ +* Minor updates for RockyLinux. + Contributed by Amanda McGuinness (@amanda11 intive) + * Added st2 API get action parameters by ref. #5509 API endpoint ``/api/v1/actions/views/parameters/{action_id}`` accepts ``ref_or_id``. @@ -4240,4 +4243,4 @@ v0.5.1 - November 3rd, 2014 Added ~~~~~ -* Initial public release \ No newline at end of file +* Initial public release diff --git a/contrib/linux/actions/service.py b/contrib/linux/actions/service.py index 70db65773b..1a04d20d13 100644 --- a/contrib/linux/actions/service.py +++ b/contrib/linux/actions/service.py @@ -70,6 +70,7 @@ def get_linux_distribution(): re.search(distro, "Redhat") or re.search(distro, "Fedora") or re.search(distro, "CentOS Linux") + or re.search(distro, "Rocky Linux") ): cmd_args = ["systemctl", args["act"], args["service"]] diff --git a/st2common/bin/st2ctl b/st2common/bin/st2ctl index 4e2ff9a295..0f735aa952 100755 --- a/st2common/bin/st2ctl +++ b/st2common/bin/st2ctl @@ -25,7 +25,7 @@ SYSTEMD_RELOADED="" # load in environment to allow override of COMPONENTS and ST2_CONF above # Ubuntu/Debian [ -r /etc/default/st2ctl ] && source /etc/default/st2ctl -# RHEL/CentOS +# RHEL/CentOS/Rocky [ -r /etc/sysconfig/st2ctl ] && source /etc/sysconfig/st2ctl From 3a67d5c3103abc8b15284f761f46fb52c581997e Mon Sep 17 00:00:00 2001 From: amanda Date: Mon, 24 Jan 2022 16:52:00 +0000 Subject: [PATCH 2/7] Update Changelog with PR --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2edf93b7e2..e0bc22fd74 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,7 +15,7 @@ Fixed Added ~~~~~ -* Minor updates for RockyLinux. +* Minor updates for RockyLinux. #5552 Contributed by Amanda McGuinness (@amanda11 intive) * Added st2 API get action parameters by ref. #5509 From 5fc032caa4ba22a78812a3a50bfd04b7c8e68ea7 Mon Sep 17 00:00:00 2001 From: amanda Date: Fri, 28 Jan 2022 10:15:19 +0000 Subject: [PATCH 3/7] Attempt to fix docker CircleCI error --- .circle/buildenv_st2.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circle/buildenv_st2.sh b/.circle/buildenv_st2.sh index da259724fd..cd20f3cb92 100755 --- a/.circle/buildenv_st2.sh +++ b/.circle/buildenv_st2.sh @@ -4,6 +4,10 @@ set -e my_dir="$(dirname "$0")" source "$my_dir/buildenv_common.sh" +# Add Docker version to prevent error +# Error response from daemon: client version 1.40 is too new. Maximum supported API version is 1.37 +DOCKER_API_VERSION=1.37 + distros=($DISTROS) DISTRO=${distros[$CIRCLE_NODE_INDEX]} @@ -52,6 +56,6 @@ fi re="\\b$DISTRO\\b" [[ "$NOTESTS" =~ $re ]] && TESTING=0 -write_env ST2_GITURL ST2_GITREV ST2PKG_VERSION ST2PKG_RELEASE ST2_WAITFORSTART DISTRO TESTING +write_env ST2_GITURL ST2_GITREV ST2PKG_VERSION ST2PKG_RELEASE ST2_WAITFORSTART DISTRO TESTING DOCKER_API_VERSION cat ~/.buildenv From fa3626c0dab4befc217ef4c5558ff0b37390a8bc Mon Sep 17 00:00:00 2001 From: Amanda McGuinness Date: Fri, 28 Jan 2022 14:18:13 +0000 Subject: [PATCH 4/7] Update contrib/linux/actions/service.py to work for CentOS Stream Co-authored-by: Eugen Cusmaunsa --- contrib/linux/actions/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/linux/actions/service.py b/contrib/linux/actions/service.py index 1a04d20d13..0226adeef7 100644 --- a/contrib/linux/actions/service.py +++ b/contrib/linux/actions/service.py @@ -69,7 +69,7 @@ def get_linux_distribution(): elif ( re.search(distro, "Redhat") or re.search(distro, "Fedora") - or re.search(distro, "CentOS Linux") + or re.search(distro, "CentOS") or re.search(distro, "Rocky Linux") ): cmd_args = ["systemctl", args["act"], args["service"]] From 697ddbf154c297688853bb93f17595b09f827f08 Mon Sep 17 00:00:00 2001 From: amanda Date: Fri, 28 Jan 2022 14:29:05 +0000 Subject: [PATCH 5/7] Update docker engine --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e1c4d4105..1b598b98e8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -129,7 +129,7 @@ jobs: exclusive: true # default - true # Temporary workaround for Circle CI issue # https://discuss.circleci.com/t/setup-remote-docker-connection-failures/26434 - version: 18.05.0-ce + version: 19.03.14 - run: name: Docker version command: | From 6dcb2ce4fcbf641e1c01b7a7e1d6b1df3b84086b Mon Sep 17 00:00:00 2001 From: amanda Date: Fri, 28 Jan 2022 14:31:52 +0000 Subject: [PATCH 6/7] Remove API version check as upgraded docker engine instead --- .circle/buildenv_st2.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.circle/buildenv_st2.sh b/.circle/buildenv_st2.sh index cd20f3cb92..da259724fd 100755 --- a/.circle/buildenv_st2.sh +++ b/.circle/buildenv_st2.sh @@ -4,10 +4,6 @@ set -e my_dir="$(dirname "$0")" source "$my_dir/buildenv_common.sh" -# Add Docker version to prevent error -# Error response from daemon: client version 1.40 is too new. Maximum supported API version is 1.37 -DOCKER_API_VERSION=1.37 - distros=($DISTROS) DISTRO=${distros[$CIRCLE_NODE_INDEX]} @@ -56,6 +52,6 @@ fi re="\\b$DISTRO\\b" [[ "$NOTESTS" =~ $re ]] && TESTING=0 -write_env ST2_GITURL ST2_GITREV ST2PKG_VERSION ST2PKG_RELEASE ST2_WAITFORSTART DISTRO TESTING DOCKER_API_VERSION +write_env ST2_GITURL ST2_GITREV ST2PKG_VERSION ST2PKG_RELEASE ST2_WAITFORSTART DISTRO TESTING cat ~/.buildenv From 3ab13813fdb3fbc45c3641c4034a8e789cb2f0d2 Mon Sep 17 00:00:00 2001 From: Eugen Cusmaunsa Date: Fri, 28 Jan 2022 14:35:15 +0000 Subject: [PATCH 7/7] Sync up the CircleCI config with the st2-packages --- .circleci/config.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1b598b98e8..dc8d4debd0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -127,8 +127,6 @@ jobs: - setup_remote_docker: reusable: true # default - false exclusive: true # default - true - # Temporary workaround for Circle CI issue - # https://discuss.circleci.com/t/setup-remote-docker-connection-failures/26434 version: 19.03.14 - run: name: Docker version @@ -176,7 +174,7 @@ jobs: docker cp . st2-packages-vol:${ST2_GITDIR} - run: name: Pull dependent Docker Images - command: .circle/docker-compose2.sh pull ${DISTRO} + command: .circle/docker-compose2.sh pull ${DISTRO} || .circle/docker-compose2.sh pull ${DISTRO} working_directory: ~/st2-packages - run: name: Build the ${DISTRO} Packages @@ -186,14 +184,6 @@ jobs: mkdir -p ~/st2/packages/${DISTRO}/log/ docker cp st2-packages-vol:/root/build/. ~/st2/packages/${DISTRO} working_directory: ~/st2-packages -# # TODO: It works! (~0.5-1min speed-up) Enable CircleCI2.0 cache for pip and wheelhouse later -# - run: -# name: Build the ${DISTRO} Packages 2nd time (compare with pip/wheelhouse cached) -# command: | -# .circle/docker-compose2.sh build ${DISTRO} -# # Once build container finishes we can copy packages directly from it -# docker cp st2-packages-vol:/root/build /tmp/st2-packages -# working_directory: ~/st2-packages - run: name: Test the Packages command: .circle/docker-compose2.sh test ${DISTRO}