From 6929757f8cc8e8407d725d7abc8f60862824299d Mon Sep 17 00:00:00 2001 From: Ronnie Hoffmann Date: Sun, 22 Oct 2023 17:05:32 +0200 Subject: [PATCH 1/5] Change shebang lint to #!/usr/bin/env python --- contrib/debug/actions/print_ctx.py | 2 +- contrib/debug/actions/python_version.py | 2 +- contrib/debug/actions/pythonpath.py | 2 +- contrib/linux/actions/checks/check_loadavg.py | 2 +- contrib/linux/actions/checks/check_processes.py | 2 +- contrib/linux/actions/dig.py | 2 +- contrib/linux/actions/service.py | 2 +- st2client/setup.py | 2 +- st2common/bin/paramiko_ssh_evenlets_tester.py | 2 +- st2tests/testpacks/checks/actions/checks/check_loadavg.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/contrib/debug/actions/print_ctx.py b/contrib/debug/actions/print_ctx.py index 99bb00d319..42d6e3a775 100644 --- a/contrib/debug/actions/print_ctx.py +++ b/contrib/debug/actions/print_ctx.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # Copyright 2020 The StackStorm Authors. # diff --git a/contrib/debug/actions/python_version.py b/contrib/debug/actions/python_version.py index ed044db40d..927361f723 100644 --- a/contrib/debug/actions/python_version.py +++ b/contrib/debug/actions/python_version.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # Copyright 2020 The StackStorm Authors. # diff --git a/contrib/debug/actions/pythonpath.py b/contrib/debug/actions/pythonpath.py index 1af41a558a..82a2f4e480 100644 --- a/contrib/debug/actions/pythonpath.py +++ b/contrib/debug/actions/pythonpath.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # Copyright 2020 The StackStorm Authors. # diff --git a/contrib/linux/actions/checks/check_loadavg.py b/contrib/linux/actions/checks/check_loadavg.py index 41de2774cf..04036924e8 100755 --- a/contrib/linux/actions/checks/check_loadavg.py +++ b/contrib/linux/actions/checks/check_loadavg.py @@ -1,4 +1,4 @@ -#!/opt/stackstorm/st2/bin/python +#!/usr/bin/env python # Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. diff --git a/contrib/linux/actions/checks/check_processes.py b/contrib/linux/actions/checks/check_processes.py index 4a7d9682c1..a32e009fec 100755 --- a/contrib/linux/actions/checks/check_processes.py +++ b/contrib/linux/actions/checks/check_processes.py @@ -1,4 +1,4 @@ -#!/opt/stackstorm/st2/bin/python +#!/usr/bin/env python # Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. diff --git a/contrib/linux/actions/dig.py b/contrib/linux/actions/dig.py index c20f28259e..737ac30133 100644 --- a/contrib/linux/actions/dig.py +++ b/contrib/linux/actions/dig.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!/usr/bin/env python # Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. diff --git a/contrib/linux/actions/service.py b/contrib/linux/actions/service.py index 743ffdef78..0226adeef7 100644 --- a/contrib/linux/actions/service.py +++ b/contrib/linux/actions/service.py @@ -1,4 +1,4 @@ -#!/opt/stackstorm/st2/bin/python +#!/usr/bin/env python # Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. diff --git a/st2client/setup.py b/st2client/setup.py index decfaf9237..1fe8ec1af3 100644 --- a/st2client/setup.py +++ b/st2client/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python # Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. # diff --git a/st2common/bin/paramiko_ssh_evenlets_tester.py b/st2common/bin/paramiko_ssh_evenlets_tester.py index ceb4206080..012e7c128b 100755 --- a/st2common/bin/paramiko_ssh_evenlets_tester.py +++ b/st2common/bin/paramiko_ssh_evenlets_tester.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python # Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. # diff --git a/st2tests/testpacks/checks/actions/checks/check_loadavg.py b/st2tests/testpacks/checks/actions/checks/check_loadavg.py index 9439679df3..23845e7316 100755 --- a/st2tests/testpacks/checks/actions/checks/check_loadavg.py +++ b/st2tests/testpacks/checks/actions/checks/check_loadavg.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. From c44c9077f7cbdab6f7c699e876838cf97d13d028 Mon Sep 17 00:00:00 2001 From: Ronnie Hoffmann Date: Sun, 22 Oct 2023 17:18:39 +0200 Subject: [PATCH 2/5] add information in CHANGELOG.rst --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 36b5f82e86..e0bdf000e8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,8 @@ in development Fixed ~~~~~ +* Fix issue #5983 + Contributed by Ronnie Hoffmann (@ZoeLeah Schwarz IT KG) * Fix proxy auth mode in HA environments #5766 Contributed by @floatingstatic From db67d76a627e2a325bcd5877a45fbf4284587347 Mon Sep 17 00:00:00 2001 From: Ronnie Hoffmann Date: Tue, 24 Oct 2023 07:34:08 +0200 Subject: [PATCH 3/5] more detailed changelog added --- CHANGELOG.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e0bdf000e8..ec3ef6c4dc 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,7 +6,10 @@ in development Fixed ~~~~~ -* Fix issue #5983 +* Fix issue #5983 with actions that are executed remotely. + The following error message was returned: "/opt/stackstorm/st2/bin/python: bad interpreter: No such file or directory" + Change the shebang line "#!/opt/stackstorm/st2/bin/python" to "#!/usr/bin/env python". + It was also changed "#!/usr/bin/python" to "#!/usr/bin/env python" to have it consistent Contributed by Ronnie Hoffmann (@ZoeLeah Schwarz IT KG) * Fix proxy auth mode in HA environments #5766 From 56732cf33dcc5d23352fedd63acbd202e45ddbf6 Mon Sep 17 00:00:00 2001 From: Eugen C <1533818+armab@users.noreply.github.com> Date: Tue, 24 Oct 2023 12:58:01 +0100 Subject: [PATCH 4/5] Bump the updated pack versions --- contrib/debug/pack.yaml | 2 +- contrib/linux/pack.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/debug/pack.yaml b/contrib/debug/pack.yaml index 41dd36b3d6..d864ac685c 100644 --- a/contrib/debug/pack.yaml +++ b/contrib/debug/pack.yaml @@ -3,6 +3,6 @@ description: Debug utilities for StackStorm ref: debug author: StackStorm Authors email: info@stackstorm.com -version: "0.0.1" +version: "0.0.2" python_versions: - "3" diff --git a/contrib/linux/pack.yaml b/contrib/linux/pack.yaml index 1ca97e01b9..c611cf950e 100644 --- a/contrib/linux/pack.yaml +++ b/contrib/linux/pack.yaml @@ -16,7 +16,7 @@ keywords: - open ports - processes - ps -version : 1.2.0 +version : 1.2.1 python_versions: - "2" - "3" From fce262570d554ac5325d558e1772e38660935634 Mon Sep 17 00:00:00 2001 From: Eugen C <1533818+armab@users.noreply.github.com> Date: Tue, 24 Oct 2023 13:02:45 +0100 Subject: [PATCH 5/5] Update the Changelog --- CHANGELOG.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ec3ef6c4dc..26992cade6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,10 +6,7 @@ in development Fixed ~~~~~ -* Fix issue #5983 with actions that are executed remotely. - The following error message was returned: "/opt/stackstorm/st2/bin/python: bad interpreter: No such file or directory" - Change the shebang line "#!/opt/stackstorm/st2/bin/python" to "#!/usr/bin/env python". - It was also changed "#!/usr/bin/python" to "#!/usr/bin/env python" to have it consistent +* Fix issue with linux pack actions failed to run remotely due to incorrect python shebang. #5983 #6042 Contributed by Ronnie Hoffmann (@ZoeLeah Schwarz IT KG) * Fix proxy auth mode in HA environments #5766