Skip to content

Commit b6f0fc2

Browse files
Ed Espinoavamingli
authored andcommitted
gpcheckperf - Update a Python 3 reference of "python" to "python3"
In gpcheckperf, a remaining "python" reference exists. This commit renames it to "python3" and allows it to run when the symbolic link /usr/bin/python pointing to /usr/bin/python3 does not exist. Tl;dr - An attempt was made to update all Greenplum utilities to reference 'python3'. A reference was left unchanged in gpcheckperf. Python 3 installations by default do not create the symbolic link /usr/bin/python --> /usr/bin/python3. This has been observed in Python 3 installation3 on Rockylinux 8 & 9 and Ubuntu 20.04 & 22.04. In the case of gpcheckperf, when invoked, the output below reveals the "Error" a user receives when /usr/bin/python does not exist: ``` gpadmin@cdw:~$ /usr/local/gp7/bin/gpcheckperf -h cdw -d /data -r d -S 1 -v -------------------- SETUP 2023-03-12T17:26:27.967030 -------------------- [Info] verify python interpreter exists [Info] /usr/local/gp7/bin/gpssh -h cdw 'python -c print' -------------------- TEARDOWN -------------------- [Info] /usr/local/gp7/bin/gpssh -h cdw 'rm -rf /data/gpcheckperf_$USER' [Error] unable to find python interpreter on some hosts verify PATH variables on the hosts gpadmin@cdw:~$ ```
1 parent c72ce69 commit b6f0fc2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

gpMgmt/bin/gpcheckperf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,14 +346,14 @@ def runSetup():
346346
print('--------------------')
347347
okCount = 0
348348
try:
349-
# check python reachable
349+
# Verify python3 is accessible
350350
if GV.opt['-v']:
351-
print('[Info] verify python interpreter exists')
352-
(ok, out) = gpssh('python -c print')
351+
print('[Info] verify python3 interpreter exists')
352+
(ok, out) = gpssh('python3 -c print')
353353
if not ok:
354354
if not GV.opt['-v']:
355355
print(out)
356-
sys.exit("[Error] unable to find python interpreter on some hosts\n"
356+
sys.exit("[Error] unable to find python3 interpreter on some hosts\n"
357357
+ " verify PATH variables on the hosts")
358358

359359
# mkdir cperf

0 commit comments

Comments
 (0)