Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMBARI-26311: postgresql-server should be installed even though ambari-server is configured with mysql #3945

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

eubnara
Copy link
Contributor

@eubnara eubnara commented Feb 26, 2025

What changes were proposed in this pull request?

(Please fill in changes proposed in this fix)
Allow ambari-server can be installed or executed with db-purge-history script without postgresql-server package on centos7 if ambari-server is not configured with postgresql.

How was this patch tested?

manual tests on our company's cluster.

Comment on lines +114 to +116
properties = get_ambari_properties()
parse_properties_file(options)
options.database_index = LINUX_DBMS_KEYS_LIST.index(properties[JDBC_DATABASE_PROPERTY])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without these, it tries to execute ensure_jdbc_driver_is_installed() with postgresql even though ambari-server is configured with another RDBMS.

@@ -598,6 +597,8 @@ class PGConfig(LinuxDBMSConfig):
)

def __init__(self, options, properties, storage_type):
if PGConfig.PG_INITDB_CMD is None:
raise FatalException(1, "Cannot find postgresql-setup script.")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move FatalException here in order to raise this exception only when __init__ called with createPGConfig().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant