You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "wenwj0 (via GitHub)" <gi...@apache.org> on 2023/09/04 01:41:16 UTC
[GitHub] [ambari] wenwj0 opened a new pull request, #3751: AMBARI-26000: Ambari supports Python3 environment
wenwj0 opened a new pull request, #3751:
URL: https://github.com/apache/ambari/pull/3751
## What changes were proposed in this pull request?
- Upgrade ambari from python2 to python3 on trunk branch.
- More changes details can be found in `Ambari-support-python3.md` in [AMBARI-26000](https://issues.apache.org/jira/browse/AMBARI-26000)
## How was this patch tested?
- All unit tests
- Manual deploy tests on centos7
Please review [Ambari Contributing Guide](https://cwiki.apache.org/confluence/display/AMBARI/How+to+Contribute) before opening a pull request.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] JiaLiangC commented on pull request #3751: AMBARI-26000: Make Ambari supports Python3 environment
Posted by "JiaLiangC (via GitHub)" <gi...@apache.org>.
JiaLiangC commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1731010984
@arshadmohammad Could you help trigger the CI/CD process of this PR again?
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "wenwj0 (via GitHub)" <gi...@apache.org>.
wenwj0 commented on code in PR #3751:
URL: https://github.com/apache/ambari/pull/3751#discussion_r1375471423
##########
ambari-common/src/main/python/ambari_commons/repo_manager/yum_manager.py:
##########
@@ -352,7 +330,7 @@ def rpm_check_package_available(self, name):
regex = re.compile(name_regex)
for package in packages:
- if regex.match(package['name']):
+ if regex.match(package['name'].decode()):
Review Comment:
Sometimes the return of `package['name']` is not `str`, so I think we need to add a judgement this place.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] wenwj0 commented on pull request #3751: AMBARI-26000: Ambari supports Python3 environment
Posted by "wenwj0 (via GitHub)" <gi...@apache.org>.
wenwj0 commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1704515884
Python3 rely on `distro` module and it is not installed on the current machine, thus continuous-integration test failed.
Phenomenon: `ModuleNotFoundError: No module named 'distro'`
UT command: `mvn -Dmaven.test.failure.ignore=true -am test -pl ambari-agent -Dmaven.artifact.threads=10 -Drat.skip`
Please install distro module by using command: `pip3 install distro`
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad commented on code in PR #3751:
URL: https://github.com/apache/ambari/pull/3751#discussion_r1385401084
##########
ambari-common/src/main/python/ambari_commons/repo_manager/yum_manager.py:
##########
@@ -352,7 +330,7 @@ def rpm_check_package_available(self, name):
regex = re.compile(name_regex)
for package in packages:
- if regex.match(package['name']):
+ if regex.match(package['name'].decode()):
Review Comment:
> Sometimes the return of `package['name']` is not `str`, so I think we need to add a judgement this place.
yes, please add it
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] JiaLiangC commented on pull request #3751: AMBARI-26000: Ambari supports Python3 environment
Posted by "JiaLiangC (via GitHub)" <gi...@apache.org>.
JiaLiangC commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1730826797
> > Sorry I couldn't take a look. @arshadmohammad you think you can take a look at CI pipeline for python 3 installation?
>
> no idea how to access the CI Vms, but let me run distro installation as part of the test execution script itself. lets see whether it works
thanks man
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "wenwj0 (via GitHub)" <gi...@apache.org>.
wenwj0 commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1925398225
> @wenwj0 @JiaLiangC any idea why CI is failing?
The log shows that there is an error in `org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (ambari-web unit tests) on project ambari-web`. In the `ambari-web unit tests` part, I see that it executed command `npm run`.
The only error I found in this part is `ERROR [launcher]: No binary for ChromeHeadless browser on your platform.
Please, set "CHROME_BIN" env variable.`
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "Jetiaime (via GitHub)" <gi...@apache.org>.
Jetiaime commented on code in PR #3751:
URL: https://github.com/apache/ambari/pull/3751#discussion_r1453159276
##########
ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/runtime.py:
##########
Review Comment:
`__str__` is duplicated in Line 468 and Line 475.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "simonj217 (via GitHub)" <gi...@apache.org>.
simonj217 commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-2717724065
hi @JiaLiangC
Hello,
I was able to successfully build Ambari on RHEL 8 without any issues but i can not install ambari server .
log ---------------------------
/usr/jdk64/bin/java -version
openjdk version "17.0.14" 2025-01-21 LTS
OpenJDK Runtime Environment (Red_Hat-17.0.14.0.7-1) (build 17.0.14+7-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.14.0.7-1) (build 17.0.14+7-LTS, mixed mode, sharing)
[root@m1 ~]# ambari-server setup ^C
[root@m1 ~]# ambari-server setup
bash: /usr/sbin/ambari-server: No such file or directory
[root@m1 ~]# yum install ambari-server
Last metadata expiration check: 1:32:51 ago on Wed 12 Mar 2025 01:47:47 PM +0330.
Dependencies resolved.
================================================================================================================================================================
Package Architecture Version Repository Size
================================================================================================================================================================
Installing:
ambari-server x86_64 3.0.0.0-SNAPSHOT ambari 134 M
Installing dependencies:
libpq x86_64 13.20-1.el8_10 appstream 198 k
postgresql x86_64 10.23-4.module+el8.9.0+1734+74bd286c appstream 1.5 M
postgresql-server x86_64 10.23-4.module+el8.9.0+1734+74bd286c appstream 5.1 M
Transaction Summary
================================================================================================================================================================
Install 4 Packages
Total download size: 141 M
Installed size: 207 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): libpq-13.20-1.el8_10.x86_64.rpm 53 kB/s | 198 kB 00:03
(2/4): postgresql-server-10.23-4.module+el8.9.0+1734+74bd286c.x86_64.rpm 1.3 MB/s | 5.1 MB 00:03
(3/4): postgresql-10.23-4.module+el8.9.0+1734+74bd286c.x86_64.rpm 404 kB/s | 1.5 MB 00:03
(4/4): ambari-server-3.0.0.0-SNAPSHOT.x86_64.rpm 346 MB/s | 134 MB 00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 33 MB/s | 141 MB 00:04
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : libpq-13.20-1.el8_10.x86_64 1/4
Installing : postgresql-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 2/4
Running scriptlet: postgresql-server-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 3/4
Installing : postgresql-server-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 3/4
Running scriptlet: postgresql-server-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 3/4
Running scriptlet: ambari-server-3.0.0.0-SNAPSHOT.x86_64 4/4
Backing up configs: /etc/ambari-server/conf.save -> /etc/ambari-server/conf_12_03_25_15_20.save
Installing : ambari-server-3.0.0.0-SNAPSHOT.x86_64 4/4
Running scriptlet: ambari-server-3.0.0.0-SNAPSHOT.x86_64 4/4
Verifying : libpq-13.20-1.el8_10.x86_64 1/4
Verifying : postgresql-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 2/4
Verifying : postgresql-server-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 3/4
Verifying : ambari-server-3.0.0.0-SNAPSHOT.x86_64 4/4
Installed:
ambari-server-3.0.0.0-SNAPSHOT.x86_64 libpq-13.20-1.el8_10.x86_64 postgresql-10.23-4.module+el8.9.0+1734+74bd286c.x86_64
postgresql-server-10.23-4.module+el8.9.0+1734+74bd286c.x86_64
Complete!
[root@m1 ~]# ambari-server setup
Using python /usr/bin/python3
Setup ambari-server
Checking SELinux...
SELinux status is 'disabled'
Customize user account for ambari-server daemon [y/n] (n)?
Adjusting ambari-server permissions and ownership...
Checking firewall status...
Checking JDK...
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Custom JDK
==============================================================================
Enter choice (1): 2
WARNING: JDK must be installed on all hosts and JAVA_HOME must be valid on all hosts.
WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use Kerberos,please make sure JCE Unlimited Strength Jurisdiction Policy Files are valid on all hosts.
Path to JAVA_HOME: /usr/jdk64/
Validating JDK on Ambari Server...done.
Checking GPL software agreement...
GPL License for LZO: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
Enable Ambari Server to download and install GPL Licensed LZO packages [y/n] (n)?
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)? n
Configuring database...
Default properties detected. Using built-in database.
Configuring ambari database...
Checking PostgreSQL...
Running initdb: This may take up to a minute.
About to start PostgreSQL
Configuring local database...
Configuring PostgreSQL...
Backup for pg_hba found, reconfiguration not required
Creating schema and user...
done.
Creating tables...
done.
Extracting system views...
INFO: Looking for available JDKs at /usr/jdk64
ERROR: No JDK found, please run the "setup" command to install a JDK automatically or install any JDK manually to /usr/jdk64
ERROR: Exiting with exit code 1.
REASON: Error while extracting system views. Exiting
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "wenwj0 (via GitHub)" <gi...@apache.org>.
wenwj0 commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1846461372
> @wenwj0 Thanks for working on it. This is a huge PR inclding 716 files. What about separating this PR into a series of patches, each focusing on a different module? In my opinion, this approach would be more reviewer-friendly and make it easier to track any issues in the future.
@guyuqi
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] eubnara commented on a diff in pull request #3751: AMBARI-26000: Make Ambari supports Python3 environment
Posted by "eubnara (via GitHub)" <gi...@apache.org>.
eubnara commented on code in PR #3751:
URL: https://github.com/apache/ambari/pull/3751#discussion_r1340656566
##########
ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py:
##########
@@ -20,9 +20,9 @@
import logging
import time
-import urllib2
+import urllib.request, urllib.error, urllib.parse
-from urllib2 import HTTPError
+from urllib.error import HTTPError
from tempfile import gettempdir
from alerts.base_alert import BaseAlert
Review Comment:
`alerts.base_alert` => `ambari_agent.alerts.base_alert`
Maybe it should be also changed?
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] eubnara commented on pull request #3751: AMBARI-26000: Make Ambari supports Python3 environment
Posted by "eubnara (via GitHub)" <gi...@apache.org>.
eubnara commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1739972789
I think there are a lot of code which imports `urllib2`. As far as I know, there is no `urllib2` in python3. There is `urllib` on python3. I think it should be changed.
e.g.
https://github.com/apache/ambari/blob/trunk/contrib/nagios-alerts/plugins/ambari_alerts.py#L21
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "JiaLiangC (via GitHub)" <gi...@apache.org>.
JiaLiangC commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-2709609009
@Jati-Jostar @minixar The issue with the RPM packaging failure was caused by the system's handling of the shebang, and it has been resolved. The relevant fixes and compilation commands are in this PR: https://github.com/apache/ambari/pull/3952
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "Jati-Jostar (via GitHub)" <gi...@apache.org>.
Jati-Jostar commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-2709330024
ohh ok,thanks for the information sir
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] arshadmohammad commented on pull request #3751: AMBARI-26000: Ambari supports Python3 environment
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1730819919
> Sorry I couldn't take a look. @arshadmohammad you think you can take a look at CI pipeline for python 3 installation?
no idea how to access the CI Vms, but let me run distro installation as part of the test execution script itself. lets see whether it works
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] arshadmohammad commented on pull request #3751: AMBARI-26000: Ambari supports Python3 environment
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1730866333
installing distro package, as part of the test execution script, does not work. https://ci-hadoop.apache.org/blue/organizations/jenkins/Ambari%2FAmbari-PreCommit-GitHub-PR/detail/PR-3754/1/pipeline
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] eubnara commented on pull request #3751: AMBARI-26000: Make Ambari supports Python3 environment
Posted by "eubnara (via GitHub)" <gi...@apache.org>.
eubnara commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1739982701
There are some `import rpm` lines. But rpm module is not preinstalled in python3.
e.g. yum_manager.py
```py
def rpm_check_package_available(self, name):
import rpm # this is faster then calling 'rpm'-binary externally.
```
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "JiaLiangC (via GitHub)" <gi...@apache.org>.
JiaLiangC commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1784371557
@arshadmohammad
Thank you very much for helping with the review. If you have any questions, feel free to ask.
The bug you mentioned has been fixed.
Also, since Ambari Metrics is a subproject of Ambari, PRs for Ambari Metrics and Ambari Infra should be submitted under their respective subprojects.
To test Ambari Metrics, you need to test the PRs for upgrading Python3 in both Ambari Metrics and Ambari Infra.
You can find the PRs here:
Ambari Metrics: https://github.com/apache/ambari-metrics/pull/126
Ambari Infra: https://github.com/apache/ambari-infra/pull/53
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "Jetiaime (via GitHub)" <gi...@apache.org>.
Jetiaime commented on code in PR #3751:
URL: https://github.com/apache/ambari/pull/3751#discussion_r1470773757
##########
ambari-agent/src/main/python/ambari_agent/main.py:
##########
Review Comment:
seems like it should be 'w' rather than 'wb' in line 278,it's work when I using `ambari-agent setup x`, but if 'wb', it will clean the `.ini` file and raise error like: "a bytes-like object is required, not 'str'"
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1935241894
As discussed in mailing thread https://lists.apache.org/thread/htsfrt0zh89ql9covz721j696tskwqx3, I am going to merge this PR.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] arshadmohammad commented on pull request #3751: AMBARI-26000: Ambari supports Python3 environment
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1730950089
Thanks @JiaLiangC, it worked.
https://ci-hadoop.apache.org/blue/organizations/jenkins/Ambari%2FAmbari-PreCommit-GitHub-PR/detail/PR-3754/2/pipeline/

--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1924294204
@wenwj0 @JiaLiangC any idea why CI is failing?
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] virajjasani commented on pull request #3751: AMBARI-26000: Ambari supports Python3 environment
Posted by "virajjasani (via GitHub)" <gi...@apache.org>.
virajjasani commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1726195217
Sorry I couldn't take a look. @arshadmohammad you think you can take a look at CI pipeline for python 3 installation?
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "Jetiaime (via GitHub)" <gi...@apache.org>.
Jetiaime commented on code in PR #3751:
URL: https://github.com/apache/ambari/pull/3751#discussion_r1454994377
##########
ambari-agent/src/main/python/ambari_agent/apscheduler/util.py:
##########
Review Comment:
Line 224, 225 should be changed?
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "Jetiaime (via GitHub)" <gi...@apache.org>.
Jetiaime commented on code in PR #3751:
URL: https://github.com/apache/ambari/pull/3751#discussion_r1453121804
##########
ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/compiler.py:
##########
Review Comment:
Should `xrange` be `range` in line 73 ?
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "Jetiaime (via GitHub)" <gi...@apache.org>.
Jetiaime commented on code in PR #3751:
URL: https://github.com/apache/ambari/pull/3751#discussion_r1453200636
##########
ambari-common/src/main/python/resource_management/core/providers/__init__.py:
##########
Review Comment:
Should not `__unicode__` changed to `__str__` ?
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "minixar (via GitHub)" <gi...@apache.org>.
minixar commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-2709321388
Thank @JiaLiangC for sharing the news about the release of the 3.0 version.
Is there a jira issue or epic for this task?
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "minixar (via GitHub)" <gi...@apache.org>.
minixar commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-2851519392
Hi @simonj217
I think you can find here: https://ambari.apache.org/docs/3.0.0/ambari-dev/bigtop-guide/ the answer to your questions.
Bye
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] wenwj0 commented on a diff in pull request #3751: AMBARI-26000: Make Ambari supports Python3 environment
Posted by "wenwj0 (via GitHub)" <gi...@apache.org>.
wenwj0 commented on code in PR #3751:
URL: https://github.com/apache/ambari/pull/3751#discussion_r1341978059
##########
ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py:
##########
@@ -20,9 +20,9 @@
import logging
import time
-import urllib2
+import urllib.request, urllib.error, urllib.parse
-from urllib2 import HTTPError
+from urllib.error import HTTPError
from tempfile import gettempdir
from alerts.base_alert import BaseAlert
Review Comment:
both these two way are work.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1783426982
> Therefore, on Rocky8, the old python2 soft link needs to be deleted, and create a new one using ln -s /usr/bin/python3 /usr/bin/python.
I am using rocky linux 8.8, it does not have python2 installed on it. It has only python 3.6. So the build failure was not related to python version. But the build failure is because some files do not have shebang as expected. I skipped the shebang validation with %global __brp_mangle_shebangs %{nil} for time being, we can check this part later.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad merged PR #3751:
URL: https://github.com/apache/ambari/pull/3751
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] JiaLiangC commented on pull request #3751: AMBARI-26000: Make Ambari supports Python3 environment
Posted by "JiaLiangC (via GitHub)" <gi...@apache.org>.
JiaLiangC commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1731143140
@virajjasani @arshadmohammad @brahmareddybattula
Can you help review and push the merge of this PR? Detailed explanations for all the changes in the PR are available in the documentation within the issue.
I've already reviewed this PR and tested multiple times. Once this PR is merged, it will greatly simplify support for multiple operating systems and different architectures.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] eubnara commented on a diff in pull request #3751: AMBARI-26000: Make Ambari supports Python3 environment
Posted by "eubnara (via GitHub)" <gi...@apache.org>.
eubnara commented on code in PR #3751:
URL: https://github.com/apache/ambari/pull/3751#discussion_r1340639316
##########
ambari-agent/src/main/python/ambari_agent/hostname.py:
##########
@@ -131,9 +131,9 @@ def server_hostnames(config):
def main(argv=None):
- print hostname()
- print public_hostname()
- print server_hostname()
+ print(hostname())
+ print(public_hostname())
+ print(server_hostname())
Review Comment:
server_hostname => server_hostnames

--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad commented on code in PR #3751:
URL: https://github.com/apache/ambari/pull/3751#discussion_r1374894047
##########
ambari-common/src/main/python/ambari_commons/repo_manager/yum_manager.py:
##########
@@ -352,7 +330,7 @@ def rpm_check_package_available(self, name):
regex = re.compile(name_regex)
for package in packages:
- if regex.match(package['name']):
+ if regex.match(package['name'].decode()):
Review Comment:
This is not working, it is failing with following error
`2023-10-27 19:00:36,138 - Reporting component version failed
Traceback (most recent call last):
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 354, in execute
method(env)
File "/var/lib/ambari-agent/cache/stack-hooks/before-INSTALL/scripts/hook.py", line 33, in hook
install_packages()
File "/var/lib/ambari-agent/cache/stack-hooks/before-INSTALL/scripts/shared_initialization.py", line 37, in install_packages
retry_count=params.agent_stack_retry_count)
File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 123, in __new__
cls(names_list.pop(0), env, provider, **kwargs)
File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 164, in __init__
self.env.run()
File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 163, in run
self.run_action(resource, action)
File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 127, in run_action
provider_action()
File "/usr/lib/ambari-agent/lib/resource_management/core/providers/packaging.py", line 30, in action_install
self._pkg_manager.install_package(package_name, self.__create_context())
File "/usr/lib/ambari-agent/lib/ambari_commons/repo_manager/yum_manager.py", line 211, in install_package
elif not self._check_existence(name) or context.action_force:
File "/usr/lib/ambari-agent/lib/ambari_commons/repo_manager/yum_manager.py", line 279, in _check_existence
return self.rpm_check_package_available(name)
File "/usr/lib/ambari-agent/lib/ambari_commons/repo_manager/yum_manager.py", line 333, in rpm_check_package_available
if regex.match(package['name'].decode()):
AttributeError: 'str' object has no attribute 'decode'`
package['name'] is already unicode_string, no need to decode it
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad commented on code in PR #3751:
URL: https://github.com/apache/ambari/pull/3751#discussion_r1374896426
##########
ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/metrics_collector.py:
##########
@@ -22,21 +22,21 @@
from resource_management.libraries.functions.security_commons import build_expectations, \
cached_kinit_executor, get_params_from_filesystem, validate_security_config_properties, \
FILE_TYPE_XML
-from ams import ams
-from ams_service import ams_service
-from hbase import hbase
-from status import check_service_status
+from scripts.ams import ams
Review Comment:
Ambari metrics collector start is failing with following error
`Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/3.0.0/package/scripts/metrics_collector.py", line 25, in <module>
from scripts.ams import ams
ModuleNotFoundError: No module named 'scripts'
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] JiaLiangC commented on pull request #3751: AMBARI-26000: Ambari supports Python3 environment
Posted by "JiaLiangC (via GitHub)" <gi...@apache.org>.
JiaLiangC commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1730876168
@arshadmohammad it seems your change in jenkinsfile not woring fine ,maybe you can try this
stage('Some Stage') {
steps {
// Other steps here
sh 'pip3 install distro'
// Other steps here
}
}
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "JiaLiangC (via GitHub)" <gi...@apache.org>.
JiaLiangC commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1928641503
@arshadmohammad
Conclusion: This CI error is not related to PR AMBARI-26000; it's an issue with the trunk branch.
The error can be reproduced in the trunk branch code due to PR https://github.com/apache/ambari/pull/3760.
Cause:
PR https://github.com/apache/ambari/pull/3760 introduced `chromium-browser`, which caused the error during test execution because of the `chromium-browser` settings in our CI environment. This needs to be fixed in CI.
How to reproduce:
Operating System: Rocky Linux 8
1. Install chromium:
yum install -y chromium
2. Change directory to ambari:
cd ambari
3. Start compilation:
mvn -X -T 2C -am test -pl ambari-web -Dmaven.artifact.threads=10 -Drat.skip

As shown above, the error message is the same as in CI, confirming the reproduction of the issue!
Below is the error from CI:

How to solve:
1. The error message indicates that `CHROME_BIN` is not set, so let's set it:
export CHROME_BIN=/usr/bin/chromium-browser
Continue execution:
mvn -X -T 2C -am test -pl ambari-web -Dmaven.artifact.threads=10 -Drat.skip

2. Error message:
ERROR:zygote_host_impl_linux.cc(100)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
How to solve:
Edit `/usr/bin/chromium-browser`:
vim /usr/bin/chromium-browser
Add `--no-sandbox` at the end of the file.

Then the compilation succeeds.

--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "wenwj0 (via GitHub)" <gi...@apache.org>.
wenwj0 commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1936971757
Thank @arshadmohammad very much for reviewing and merging the code, and also thank @Jetiaime and @eubnara for reviewing the code.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "aghazeh (via GitHub)" <gi...@apache.org>.
aghazeh commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-2719133331
hi @arshadmohammad @JiaLiangC
vi ambari-server-command.log
----------------------------------------------------------------------------------------------
INFO 2025-03-12 14:02:52,509 ambari-server.py:1804 - loglevel=logging.INFO
INFO 2025-03-12 14:02:52,509 serverSetup.py:1391 - Setup ambari-server.
ERROR 2025-03-12 14:03:27,753 ambari-server.py:1921 - 'Fatal exception: Error while extracting system views. Exiting, exit code 1'
Traceback (most recent call last):
File "/usr/sbin/ambari-server.py", line 1902, in main
action_obj.execute()
File "/usr/sbin/ambari-server.py", line 131, in execute
self.fn(*self.args, **self.kwargs)
File "/usr/lib/ambari-server/lib/ambari_server/serverSetup.py", line 1455, in setup
raise FatalException(retcode, err)
ambari_commons.exceptions.FatalException: 'Fatal exception: Error while extracting system views. Exiting, exit code 1'
INFO 2025-03-12 14:05:11,710 ambari-server.py:1804 - loglevel=logging.INFO
INFO 2025-03-12 14:05:11,710 serverSetup.py:1391 - Setup ambari-server.
ERROR 2025-03-12 14:05:39,730 ambari-server.py:1921 - 'Fatal exception: Error while extracting system views. Exiting, exit code 1'
Traceback (most recent call last):
File "/usr/sbin/ambari-server.py", line 1902, in main
action_obj.execute()
File "/usr/sbin/ambari-server.py", line 131, in execute
self.fn(*self.args, **self.kwargs)
File "/usr/lib/ambari-server/lib/ambari_server/serverSetup.py", line 1455, in setup
raise FatalException(retcode, err)
ambari_commons.exceptions.FatalException: 'Fatal exception: Error while extracting system views. Exiting, exit code 1'
INFO 2025-03-12 14:08:37,834 ambari-server.py:1804 - loglevel=logging.INFO
INFO 2025-03-12 14:08:37,835 serverSetup.py:1391 - Setup ambari-server.
ERROR 2025-03-12 14:09:01,036 ambari-server.py:1921 - 'Fatal exception: Error while extracting system views. Exiting, exit code 1'
Traceback (most recent call last):
File "/usr/sbin/ambari-server.py", line 1902, in main
action_obj.execute()
File "/usr/sbin/ambari-server.py", line 131, in execute
self.fn(*self.args, **self.kwargs)
File "/usr/lib/ambari-server/lib/ambari_server/serverSetup.py", line 1455, in setup
raise FatalException(retcode, err)
ambari_commons.exceptions.FatalException: 'Fatal exception: Error while extracting system views. Exiting, exit code 1'
INFO 2025-03-12 14:09:31,253 ambari-server.py:1804 - loglevel=logging.INFO
INFO 2025-03-12 14:09:31,253 serverSetup.py:1391 - Setup ambari-server.
ERROR 2025-03-12 14:09:41,388 ambari-server.py:1921 - "Fatal exception: Downloading or installing JDK failed: 'Fatal exception: Failed to download JDK: <urlopen error [Errno -2] Name or service not known>. Please check that the JDK is available at http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u112-linux-x64.tar.gz. Also you may specify JDK file location in local filesystem using --jdk-location command line argument., exit code 1'. Exiting., exit code 1"
Traceback (most recent call last):
File "/usr/lib64/python3.6/urllib/request.py", line 1349, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/lib64/python3.6/http/client.py", line 1273, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib64/python3.6/http/client.py", line 1319, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib64/python3.6/http/client.py", line 1268, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib64/python3.6/http/client.py", line 1044, in _send_output
self.send(msg)
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] JiaLiangC commented on pull request #3751: AMBARI-26000: Ambari supports Python3 environment
Posted by "JiaLiangC (via GitHub)" <gi...@apache.org>.
JiaLiangC commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1720760904
@brahmareddybattula @virajjasani
Could you please help check CI/CD environment about the python3 dependency problem?
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] JiaLiangC commented on pull request #3751: AMBARI-26000: Ambari supports Python3 environment
Posted by "JiaLiangC (via GitHub)" <gi...@apache.org>.
JiaLiangC commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1730954815
> Thanks @JiaLiangC, it worked. https://ci-hadoop.apache.org/blue/organizations/jenkins/Ambari%2FAmbari-PreCommit-GitHub-PR/detail/PR-3754/2/pipeline/ 
Thank you very much for your assistance!
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] arshadmohammad commented on pull request #3751: AMBARI-26000: Make Ambari supports Python3 environment
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1731133088
> @arshadmohammad Could you help trigger the CI/CD process of this PR again?
CI got triggered with the new commit by @wenwj0. CI is passed for this PR.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] wenwj0 commented on a diff in pull request #3751: AMBARI-26000: Make Ambari supports Python3 environment
Posted by "wenwj0 (via GitHub)" <gi...@apache.org>.
wenwj0 commented on code in PR #3751:
URL: https://github.com/apache/ambari/pull/3751#discussion_r1341977405
##########
ambari-agent/src/main/python/ambari_agent/hostname.py:
##########
@@ -131,9 +131,9 @@ def server_hostnames(config):
def main(argv=None):
- print hostname()
- print public_hostname()
- print server_hostname()
+ print(hostname())
+ print(public_hostname())
+ print(server_hostname())
Review Comment:
thanks for finding this, I will fix it later.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad commented on code in PR #3751:
URL: https://github.com/apache/ambari/pull/3751#discussion_r1405633056
##########
ambari-common/src/main/python/ambari_commons/repo_manager/yum_manager.py:
##########
@@ -352,7 +330,7 @@ def rpm_check_package_available(self, name):
regex = re.compile(name_regex)
for package in packages:
- if regex.match(package['name']):
+ if regex.match(package['name'].decode()):
Review Comment:
@wenwj0 seems you have not addressed this comment.
you can change the code with some thing like this:
` pkg_name = package['name'].decode() if isinstance(package['name'], bytes) else package['name']
if regex.match(pkg_name):`
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "guyuqi (via GitHub)" <gi...@apache.org>.
guyuqi commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1839988649
@wenwj0
Thanks for working on it.
This is a huge PR inclding 716 files.
What about separating this PR into a series of patches, each focusing on a different module?
In my opinion, this approach would be more reviewer-friendly and make it easier to track any issues in the future.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "minixar (via GitHub)" <gi...@apache.org>.
minixar commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-2709016091
>  hello i got this error how to fix it
Hi!
I've the same issue using: rocky linux 9 + java 17 + python3.
I was able to work around the issue avoiding the rpm build.
mvn -B clean install package -DskipRpm -Drat.skip=true -DskipTests -Dmaven.test.skip=true
Then just use the .tar.gz in the target dir.
I suggest avoiding the trunk branch. I used the merge [5262967] with rockylinux 8 + java 1.8 + python3 and worked great.
Hope this help.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "simonj217 (via GitHub)" <gi...@apache.org>.
simonj217 commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-2848633254
Hello,
I was able to build Apache Ambari successfully. Now, I want to install BigTop 3.3 services using Ambari.
I have two questions for you:
1 - Do I need to build BigTop from scratch so that its packages are like zookeeper_3_3_3 instead of just zookeeper? Because I use the -PpkgSuffix option during the build process. Can Ambari use the packages that were built by you and published on the Apache website directly, or do I need to build them myself?
2 - And my last question is that bigtop-select uses Python 2, but the version of Ambari I have uses Python 3, and most of the time this causes problems. What is your solution for installing BigTop 3.3 with Ambari that is running on Python 3?
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "Jati-Jostar (via GitHub)" <gi...@apache.org>.
Jati-Jostar commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-2723433535

im sorry but im still got the same error, i think its about os architecture mine is x86_64 rocky9 , and on the log is showing that 2 file is not recognizeable because the format of the file is ppc64le
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1935240251
Thanks @JiaLiangC for detailed information on CI. We will address CI issue separate PR.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] wenwj0 commented on pull request #3751: AMBARI-26000: Make Ambari supports Python3 environment
Posted by "wenwj0 (via GitHub)" <gi...@apache.org>.
wenwj0 commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1741811603
> There are some `import rpm` lines. But rpm module is not preinstalled in python3.
>
> e.g. yum_manager.py
>
> ```python
> def rpm_check_package_available(self, name):
> import rpm # this is faster then calling 'rpm'-binary externally.
> ```
Yes, `rpm` module is needed and that isn't preinstalled. We install [python36-rpm](https://pkgs.org/download/python36-rpm) in centos 7 and it works.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
[GitHub] [ambari] MacChen01 commented on pull request #3751: AMBARI-26000: Make Ambari supports Python3 environment
Posted by "MacChen01 (via GitHub)" <gi...@apache.org>.
MacChen01 commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1736595246
@guyuqi please help to review the code, thanks.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1773735412
I was trying to build this PR(also applied https://github.com/apache/ambari/pull/3758 changes) on rocky linux 8.8 but build failed with following error
`[INFO] error: Bad exit status from /var/tmp/rpm-tmp.HcNglV (%install)
[INFO] Bad exit status from /var/tmp/rpm-tmp.HcNglV (%install)
[INFO]
[INFO]
[INFO] RPM build errors:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Ambari Server 3.0.0.0-SNAPSHOT:
[INFO]
[INFO] Ambari Server ...................................... FAILURE [02:10 min]
[INFO] Ambari Functional Tests ............................ SKIPPED
[INFO] Ambari Agent ....................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:10 min
[INFO] Finished at: 2023-10-21T15:03:07+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.1.4:rpm (default-cli) on project ambari-server: RPM build execution returned: '1' executing '/bin/sh -c cd '/home/code/non-forked/ambari/ambari-server/target/rpm/ambari-server/SPECS' && 'rpmbuild' '-bb' '--target' 'x86_64-redhat-linux' '--buildroot' '/home/code/non-forked/ambari/ambari-server/target/rpm/ambari-server/buildroot' '--define' '_topdir /home/code/non-forked/ambari/ambari-server/target/rpm/ambari-server' '--define' '_build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' '--define' '_builddir %{_topdir}/BUILD' '--define' '_rpmdir %{_topdir}/RPMS' '--define' '_sourcedir %{_topdir}/SOURCES' '--define' '_specdir %{_topdir}/SPECS' '--define' '_srcrpmdir %{_topdir}/SRPMS' 'ambari-server.spec'' -> [Help 1]`
@wenwj0 any idea what changes to be done to make it build on rocky linux 8 also. It will be easy for me to review this PR if this can be build and tested on rocky linux 8 also.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "arshadmohammad (via GitHub)" <gi...@apache.org>.
arshadmohammad commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1773733712
I will review this PR.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "JiaLiangC (via GitHub)" <gi...@apache.org>.
JiaLiangC commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-1773961364
@arshadmohammad
> I was trying to build this PR(also applied #3758 changes) on rocky linux 8.8 but build failed with following error `[INFO] error: Bad exit status from /var/tmp/rpm-tmp.HcNglV (%install) [INFO] Bad exit status from /var/tmp/rpm-tmp.HcNglV (%install) [INFO] [INFO] [INFO] RPM build errors: [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Ambari Server 3.0.0.0-SNAPSHOT: [INFO] [INFO] Ambari Server ...................................... FAILURE [02:10 min] [INFO] Ambari Functional Tests ............................ SKIPPED [INFO] Ambari Agent ....................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 02:10 min [INFO] Finished at: 2023-10-21T15:03:07+05:30 [INFO] ------------------------------------------------------------------------ [ERROR]
Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.1.4:rpm (default-cli) on project ambari-server: RPM build execution returned: '1' executing '/bin/sh -c cd '/home/code/non-forked/ambari/ambari-server/target/rpm/ambari-server/SPECS' && 'rpmbuild' '-bb' '--target' 'x86_64-redhat-linux' '--buildroot' '/home/code/non-forked/ambari/ambari-server/target/rpm/ambari-server/buildroot' '--define' '_topdir /home/code/non-forked/ambari/ambari-server/target/rpm/ambari-server' '--define' '_build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' '--define' '_builddir %{_topdir}/BUILD' '--define' '_rpmdir %{_topdir}/RPMS' '--define' '_sourcedir %{_topdir}/SOURCES' '--define' '_specdir %{_topdir}/SPECS' '--define' '_srcrpmdir %{_topdir}/SRPMS' 'ambari-server.spec'' -> [Help 1]` @wenwj0 any idea what changes to be done to make it build on rocky linux 8 also. It will be easy for me to review this PR if this can be build and tested on rocky linux 8 also.
Things to note when compiling on Rocky8:
The maven-rpm-plugin used for rpm compilation will, by default, perform python compilation, and it uses /usr/bin/python for the compilation, which cannot be configured to use python3.
Therefore, on Rocky8, the old python2 soft link needs to be deleted, and create a new one using ln -s /usr/bin/python3 /usr/bin/python.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "Jati-Jostar (via GitHub)" <gi...@apache.org>.
Jati-Jostar commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-2705473552

hello i got this error how to fix it
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26000: Make Ambari supports Python3 environment [ambari]
Posted by "JiaLiangC (via GitHub)" <gi...@apache.org>.
JiaLiangC commented on PR #3751:
URL: https://github.com/apache/ambari/pull/3751#issuecomment-2709262649
@Jati-Jostar @minixar Apologies for the lack of community manpower and missing relevant documentation. The 3.0 version is set to be released this month, which will include detailed compilation, deployment, and installation documentation, supporting both rocky8 and rocky9.
--
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@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org