You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/06/25 00:56:00 UTC

[jira] [Commented] (IMPALA-12242) bin/cmake_aux/create_py3_virtualenv.sh doesn't successfully fall back to impala-virtualenv

    [ https://issues.apache.org/jira/browse/IMPALA-12242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17736810#comment-17736810 ] 

ASF subversion and git services commented on IMPALA-12242:
----------------------------------------------------------

Commit 152c7ef33ff6886df77bb21211f7dcce532e1202 in impala's branch refs/heads/master from Joe McDonnell
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=152c7ef33 ]

IMPALA-12242: Fix failover case in bin/cmake_aux/create_py3_virtualenv.sh

bin/cmake_aux/create_py3_virtualenv.sh will try to use
"python3 -m venv", but if it fails, it wants to fall back
to using impala-virtualenv. Unfortunately, the "python3 -m venv"
command left behind a directory and impala-virtualenv can't
handle it.

This removes the venv directory created by "python3 -m venv"
before falling back to impala-virtualenv.

Testing:
 - Remove python3-venv from bin/bootstrap_build.sh and ran
   it on a fresh Ubuntu 20 machine. This scenario would
   fail without the fix.

Change-Id: Ic20d5b2fba3da3c5358e3ab5513885389bb9eeaa
Reviewed-on: http://gerrit.cloudera.org:8080/20118
Reviewed-by: Joe McDonnell <jo...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> bin/cmake_aux/create_py3_virtualenv.sh doesn't successfully fall back to impala-virtualenv
> ------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-12242
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12242
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Infrastructure
>    Affects Versions: Impala 4.3.0
>            Reporter: Joe McDonnell
>            Assignee: Joe McDonnell
>            Priority: Major
>
> -If python3-venv is not installed on Ubuntu systems, the "python3 -m venv" command will fail. bin/cmake_aux/create_py3_virtualenv.sh was intended to handle that and fall back to the impala-virtualenv command. That is working. Instead, it fails with this message:
>  
> {noformat}
> Traceback (most recent call last):
>   File "/home/ubuntu/Impala/infra/python/env-gcc10.4.0/lib/python2.7/site-packages/virtualenv.py", line 2633, in <module>
>     main()
>   File "/home/ubuntu/Impala/infra/python/env-gcc10.4.0/lib/python2.7/site-packages/virtualenv.py", line 859, in main
>     create_environment(
>   File "/home/ubuntu/Impala/infra/python/env-gcc10.4.0/lib/python2.7/site-packages/virtualenv.py", line 1161, in create_environment
>     install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear, symlink=symlink)
>   File "/home/ubuntu/Impala/infra/python/env-gcc10.4.0/lib/python2.7/site-packages/virtualenv.py", line 1531, in install_python
>     shutil.copyfile(executable, py_executable)
>   File "/usr/lib/python3.8/shutil.py", line 244, in copyfile
>     raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
> shutil.SameFileError: '/usr/bin/python3' and '/home/ubuntu/Impala/shell/build/py3_venv/bin/python3' are the same file{noformat}
> This is because the failed "python3 -m venv" command left behind a directory, and the virtualenv command can't handle it. bin/cmake_aux/create_py3_virtualenv.sh should remove the directory before falling back to impala-virtualenv.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org