You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bigtop.apache.org by "JiaLiangC (via GitHub)" <gi...@apache.org> on 2023/09/26 07:11:20 UTC

[GitHub] [bigtop] JiaLiangC commented on pull request #1163: BIGTOP-3983: Fix the Ranger-2.4 deploying issues

JiaLiangC commented on PR #1163:
URL: https://github.com/apache/bigtop/pull/1163#issuecomment-1734958498

   @guyuqi 
   
   I am doing an upgrade to Python3 for Ambari and its related components, and I have encountered this problem.
    
   Here, the issue is actually because all Python code for Ranger is executed in Python2. Therefore, if the Ranger db_setup.py script was previously run using Python2 in the system, it would not throw an error. 
   This is because `subprocess.Popen(command, stdout = subprocess.PIPE)` returns a str in Python2, but returns bytes in Python3.
   
   So, if you use a Python3 script to execute db_setup.py, modifying it to `(key, _, value) = line.decode('utf8').partition('=')` is good. However, there are many places where similar subprocess.Popen code exists, and all have encoding issues. 
   All Python scripts for Ranger are based on Python2, so upgrading them all would be a better approach.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@bigtop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org