clemlabprojects / ambari

Fork of Apache Ambari maintained by Clemlab Company
https://www.clemlab.com
Apache License 2.0
39 stars 15 forks source link

ambari-python3 can not install on Rocky linux 9 #84

Open aghazeh opened 1 month ago

aghazeh commented 1 month ago

@lucasbak hi , ambari 110 (python3) can not install on Rocky linux 9.4 log==================================================== [root@m1 ~]# ambari-server setup Using python /usr/bin/python Setup ambari-server /usr/sbin/ambari-server.py:719: SyntaxWarning: "is not" with a literal. Did you mean "!="? if db_username is not None and db_username is not "" and db_password is not None and db_password is not "": /usr/sbin/ambari-server.py:719: SyntaxWarning: "is not" with a literal. Did you mean "!="? if db_username is not None and db_username is not "" and db_password is not None and db_password is not "": /usr/sbin/ambari-server.py:725: SyntaxWarning: "is not" with a literal. Did you mean "!="? if (options.database_host is not None and options.database_host is not "" \ /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1037: SyntaxWarning: "is not" with a literal. Did you mean "!="? if alias and env_master_key and env_master_key is not "" and env_master_key != "None": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1352: SyntaxWarning: "is" with a literal. Did you mean "=="? if i_name is None or i_name is "": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1355: SyntaxWarning: "is" with a literal. Did you mean "=="? if i_desc is None or i_desc is "": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1359: SyntaxWarning: "is" with a literal. Did you mean "=="? if i_url is None or i_url is "": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1362: SyntaxWarning: "is" with a literal. Did you mean "=="? if i_dest_file is None or i_dest_file is "": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1366: SyntaxWarning: "is" with a literal. Did you mean "=="? if not (i_jcpol_url is None or i_jcpol_url is ""): /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1368: SyntaxWarning: "is" with a literal. Did you mean "=="? if i_dest_jcpol_file is None or i_dest_jcpol_file is "": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1372: SyntaxWarning: "is" with a literal. Did you mean "=="? if i_inst_dir is None or i_inst_dir is "": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1376: SyntaxWarning: "is" with a literal. Did you mean "=="? if i_reg_exp is None or i_reg_exp is "": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1388: SyntaxWarning: "is" with a literal. Did you mean "=="? if section_name is None or section_name is "": /usr/lib/ambari-server/lib/ambari_server/userInput.py:61: SyntaxWarning: "is" with a literal. Did you mean "=="? elif choice is "": # Just enter pressed /usr/lib/ambari-server/lib/ambari_server/dbConfiguration.py:242: SyntaxWarning: "is not" with a literal. Did you mean "!="? val = options_val if options_val is not None and options_val is not "" else default_val /usr/lib/ambari-server/lib/ambari_server/dbConfiguration.py:248: SyntaxWarning: "is" with a literal. Did you mean "=="? if options_val is None or options_val is "": /usr/lib/ambari-server/lib/ambari_server/dbConfiguration.py:255: SyntaxWarning: "is" with a literal. Did you mean "=="? if val is None or val is "": Checking SELinux... SELinux status is 'disabled' Customize user account for ambari-server daemon [y/n] (n)? ERROR: Unexpected error Ambari repo file path not set for current OS. ERROR: Exiting with exit code 1. REASON: Failed to create user. Exiting. [root@m1 ~]# /usr/bin/python Python 3.9.18 (main, Jan 24 2024, 00:00:00) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] on linux Type "help", "copyright", "credits" or "license" for more information.

KeyboardInterrupt

[root@m1 ~]# cat /etc/redhat-release Rocky Linux release 9.4 (Blue Onyx) [root@m1 ~]#

lucasbak commented 1 month ago

Hi @aghazeh,

Which repo did you use ? tar.gz tarball or rpms public repository ? So we can try to reproduce.

We have already tested on Rhel 9.4/ Rocky Linux 9.4 and it does work. The urls may be wrong.

Best regards,

Clemlab team

aghazeh commented 1 month ago

[root@m1 ~]# yum info ambari-server Last metadata expiration check: 1:27:44 ago on Thu 16 May 2024 10:43:55 PM +0330. Installed Packages Name : ambari-server Version : 2.7.9.0 Release : 110 Architecture : x86_64 Size : 620 M Source : ambari-server-2.7.9.0-110.src.rpm Repository : @System From repo : ambari-110 Summary : Ambari Server URL : https://www.apache.org License : 2012, Apache Software Foundation Description : Maven Recipe: RPM Package.

link ambari downloaded -------------> https://archive.clemlab.com/centos9/ambari-release/2.7.9.0.0-110/repos-ambari.tar.gz

lucasbak commented 1 month ago

@aghazeh it does not answer my question. Which repository did you use ? which link ?

aghazeh commented 1 month ago

https://archive.clemlab.com/centos9/ambari-release/2.7.9.0.0-110/repos-ambari.tar.gz

aghazeh commented 1 month ago

pic

lucasbak commented 1 month ago

does your cluster have access to Internet ? Can you try with

[ambari-clemlabs-2.7.9.0.0-110]
name=Ambari Clemlab's release
baseurl=https://clemlabs.s3.eu-west-3.amazonaws.com/centos9/ambari-release/2.7.9.0.0-110/rpms/
enabled=1
gpgkey=https://clemlabs.s3.eu-west-3.amazonaws.com/RPM-GPG-KEY-Jenkins
gpgcheck=0
aghazeh commented 1 month ago

ok .
Thanks for the report, I am going to check it internally and inform you.

Best regards

aghazeh commented 1 month ago

@lucasbak The problem still exists.

[root@m1 ~]# cat /etc/yum.repos.d/ambari.repo [ambari-clemlabs-2.7.9.0.0-110] name=Ambari Clemlab's release baseurl=https://clemlabs.s3.eu-west-3.amazonaws.com/centos9/ambari-release/2.7.9.0.0-110/rpms/ enabled=1 gpgkey=https://clemlabs.s3.eu-west-3.amazonaws.com/RPM-GPG-KEY-Jenkins gpgcheck=0

[root@m1 ~]# yum install ambari-server ambari-agent Ambari Clemlab's release 1.0 kB/s | 3.0 kB 00:02 Dependencies resolved.

Package Architecture Version Repository Size

Installing: ambari-agent x86_64 2.7.9.0-110 ambari-clemlabs-2.7.9.0.0-110 69 M ambari-server x86_64 2.7.9.0-110 ambari-clemlabs-2.7.9.0.0-110 531 M Installing dependencies: postgresql x86_64 13.14-1.el9_3 appstream 1.5 M postgresql-private-libs x86_64 13.14-1.el9_3 appstream 132 k

Transaction Summary

Install 4 Packages

Total size: 602 M Total download size: 531 M Installed size: 719 M Is this ok [y/N]: y Downloading Packages: [SKIPPED] ambari-agent-2.7.9.0-110.x86_64.rpm: Already downloaded [SKIPPED] postgresql-private-libs-13.14-1.el9_3.x86_64.rpm: Already downloaded [SKIPPED] postgresql-13.14-1.el9_3.x86_64.rpm: Already downloaded (4/4): ambari-server-2.7.9.0-110.x86_64.rpm 226 kB/s | 531 MB 40:12

Total 226 kB/s | 531 MB 40:12 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : postgresql-private-libs-13.14-1.el9_3.x86_64 1/4 Installing : postgresql-13.14-1.el9_3.x86_64 2/4 Running scriptlet: ambari-server-2.7.9.0-110.x86_64 3/4 Backing up configs: /etc/ambari-server/conf.save -> /etc/ambari-server/conf_17_05_24_01_31.save

Installing : ambari-server-2.7.9.0-110.x86_64 3/4 Running scriptlet: ambari-server-2.7.9.0-110.x86_64 3/4 Running scriptlet: ambari-agent-2.7.9.0-110.x86_64 4/4 Installing : ambari-agent-2.7.9.0-110.x86_64 4/4 Running scriptlet: ambari-agent-2.7.9.0-110.x86_64 4/4 Running scriptlet: ambari-server-2.7.9.0-110.x86_64 4/4 Running scriptlet: ambari-agent-2.7.9.0-110.x86_64 4/4 Verifying : ambari-agent-2.7.9.0-110.x86_64 1/4 Verifying : ambari-server-2.7.9.0-110.x86_64 2/4 Verifying : postgresql-private-libs-13.14-1.el9_3.x86_64 3/4 Verifying : postgresql-13.14-1.el9_3.x86_64 4/4

Installed: ambari-agent-2.7.9.0-110.x86_64 ambari-server-2.7.9.0-110.x86_64 postgresql-13.14-1.el9_3.x86_64 postgresql-private-libs-13.14-1.el9_3.x86_64

[root@m1 ~]# yum install ambari-server ambari-agent Rocky Linux 9 - Extras 839 B/s | 2.9 kB 00:03 Package ambari-server-2.7.9.0-110.x86_64 is already installed. Package ambari-agent-2.7.9.0-110.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete! [root@m1 ~]# ambari-server setup Using python /usr/bin/python Setup ambari-server /usr/sbin/ambari-server.py:719: SyntaxWarning: "is not" with a literal. Did you mean "!="? if db_username is not None and db_username is not "" and db_password is not None and db_password is not "": /usr/sbin/ambari-server.py:719: SyntaxWarning: "is not" with a literal. Did you mean "!="? if db_username is not None and db_username is not "" and db_password is not None and db_password is not "": /usr/sbin/ambari-server.py:725: SyntaxWarning: "is not" with a literal. Did you mean "!="? if (options.database_host is not None and options.database_host is not "" \ /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1037: SyntaxWarning: "is not" with a literal. Did you mean "!="? if alias and env_master_key and env_master_key is not "" and env_master_key != "None": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1352: SyntaxWarning: "is" with a literal. Did you mean "=="? if i_name is None or i_name is "": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1355: SyntaxWarning: "is" with a literal. Did you mean "=="? if i_desc is None or i_desc is "": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1359: SyntaxWarning: "is" with a literal. Did you mean "=="? if i_url is None or i_url is "": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1362: SyntaxWarning: "is" with a literal. Did you mean "=="? if i_dest_file is None or i_dest_file is "": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1366: SyntaxWarning: "is" with a literal. Did you mean "=="? if not (i_jcpol_url is None or i_jcpol_url is ""): /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1368: SyntaxWarning: "is" with a literal. Did you mean "=="? if i_dest_jcpol_file is None or i_dest_jcpol_file is "": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1372: SyntaxWarning: "is" with a literal. Did you mean "=="? if i_inst_dir is None or i_inst_dir is "": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1376: SyntaxWarning: "is" with a literal. Did you mean "=="? if i_reg_exp is None or i_reg_exp is "": /usr/lib/ambari-server/lib/ambari_server/serverConfiguration.py:1388: SyntaxWarning: "is" with a literal. Did you mean "=="? if section_name is None or section_name is "": /usr/lib/ambari-server/lib/ambari_server/userInput.py:61: SyntaxWarning: "is" with a literal. Did you mean "=="? elif choice is "": # Just enter pressed /usr/lib/ambari-server/lib/ambari_server/dbConfiguration.py:242: SyntaxWarning: "is not" with a literal. Did you mean "!="? val = options_val if options_val is not None and options_val is not "" else default_val /usr/lib/ambari-server/lib/ambari_server/dbConfiguration.py:248: SyntaxWarning: "is" with a literal. Did you mean "=="? if options_val is None or options_val is "": /usr/lib/ambari-server/lib/ambari_server/dbConfiguration.py:255: SyntaxWarning: "is" with a literal. Did you mean "=="? if val is None or val is "": Checking SELinux... SELinux status is 'disabled' Customize user account for ambari-server daemon [y/n] (n)? y Enter user account for ambari-server daemon (root): ERROR: Unexpected error Ambari repo file path not set for current OS. ERROR: Exiting with exit code 1. REASON: Failed to create user. Exiting.

=====================================

stuncb97 commented 1 week ago

append this to line 253, file /usr/lib/ambari-server/lib/ambari_commons/os_check.py

    elif operatingSystem.startswith('rocky linux'):
      operatingSystem = 'redhat'