Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
aca6187
AMBARI-26613: Ambari Admin React Implementation: complete the ambari …
sandeepk318 Jun 10, 2026
b2119e3
AMBARI-26257: Create new Configuration Group now worked #3907
zRains Dec 9, 2024
81123d0
AMBARI-26147: Add Ruff integration to ambari (#3908)
JiaLiangC Dec 10, 2024
5070497
AMBARI-26251: tooltip display issue #3911
zRains Dec 11, 2024
8baaee8
AMBARI-26207: Metrics sortable not work #3912
zRains Dec 11, 2024
a26014c
AMBARI-26203: Fix annotation processing issue in ConfigurationTest af…
JiaLiangC Oct 28, 2024
f51f4d2
AMBARI-26212: Fix checkstyle error (#3862)
coldless177 Oct 29, 2024
df67d01
Ambari-26211: Fix TaskActionScheduler test failed (#3861)
JiaLiangC Oct 30, 2024
4cc730a
AMBARI-26215: Fix BlueprintConfigurationProcessorTest and others (#3863)
JiaLiangC Oct 31, 2024
3177f1a
AMBARI-26222: Fix ClientConfigResourceProviderTest & PreUpgradeCheckR…
JiaLiangC Nov 1, 2024
6fb9527
AMBARI-26304 : User authentication fails for previously sync'd LDAP /…
Feb 3, 2025
6f14ab9
Revert "AMBARI-26304 : User authentication fails for previously sync'…
Feb 3, 2025
4b58f70
AMBARI-26304 : User authentication fails for previously sync'd LDAP /…
vishalsuvagia Feb 4, 2025
e756731
AMBARI-26305: Setting up Hive's xms config (#3939)
basapuram-kumar Feb 5, 2025
281147a
AMBARI-26306: Bumpup logback to 1.5.16(latest) due to CVE's (#3940)
basapuram-kumar Feb 11, 2025
cac78f0
AMBARI-26319: Fix rpm build failed problem (#3952)
JiaLiangC Mar 10, 2025
dc83fc1
AMBARI-26320: Fix jersey conflict error when ambari server start (#3953)
JiaLiangC Mar 11, 2025
733bba6
AMBARI-26323: Ambari Component Installation Failure After Commons-Col…
JiaLiangC Mar 14, 2025
971aa31
AMBARI-26326: Fix Hive installation failures due to missing dependenc…
JiaLiangC Mar 15, 2025
5c49177
AMBARI-26328: Fix Zeppelin can't start error (#3957)
JiaLiangC Mar 15, 2025
4d0b54d
AMBARI-26322: Centralize dependency versions in properties #3954
yaruyng Mar 16, 2025
6f668ca
AMBARI-26334: Fix execute_db_connection_check failed error (#3958)
JiaLiangC Mar 18, 2025
c1eaf01
AMBARI-26310: Refactor zoo.cfg.j2 to Align with Python3 Migration (#3…
basapuram-kumar Mar 20, 2025
ebed5a4
AMBARI-26337: Fix Ambari Metrics java home and JVM options (#3960)
JiaLiangC Mar 20, 2025
20e84c6
AMBARI-26338: Fix Rocky Linux 9 RPM Package Compatibility by Removing…
JiaLiangC Mar 20, 2025
c03353a
AMBARI-26192: Ambari checkbox issue #3959
zRains Mar 21, 2025
536c1b6
AMBARI-26341: Fix Batch restart not worked (#3962)
JiaLiangC Mar 22, 2025
52651f4
AMBARI-26252: Service autostart checkbox display issue #3965
zRains Mar 24, 2025
a9ca902
AMBARI-26426: Hosts failed to delete message is missing (#3972)
himanshumaurya09876 Mar 31, 2025
43ccad9
AMBARI-26427: Handling Translation for Ranger TagSync Component (#3973)
basapuram-kumar Apr 2, 2025
404b62a
AMBARI-26428: Fix Ambari Server Startup Failure with Jetty SSL and Mu…
basapuram-kumar Apr 2, 2025
13b298d
Revert "AMBARI-26428: Fix Ambari Server Startup Failure with Jetty SS…
arshadmohammad Apr 10, 2025
10c8894
AMBARI-26288:Preliminary upgrade of Spring and Jetty dependencies (#3…
itongxiaojun Jan 17, 2025
904ad34
AMBARI-26292: Upgrade jetty version to 2.1 (#3932)
JiaLiangC Jan 20, 2025
11fee31
AMBARI-26293: upgrade guice to 6.0 (#3933)
JiaLiangC Jan 21, 2025
60a6574
AMBARI-26294: upgrade JPA (#3935)
JiaLiangC Jan 22, 2025
eda06c6
AMBARI-26296: Fix security related issues after spring upgrade (#3951)
JiaLiangC Mar 11, 2025
96e01e8
AMBARI-26185: Upgrade commons-collections to resolve CVEs (#3936)
sandeepk318 Jan 23, 2025
1d76e5f
AMBARI-26357: Errors occur when compiling ambari after upgrading jett…
guluo2016 Mar 25, 2025
17d0e27
AMBARI-26440. trunk does not compile (#3978)
peterxcli Apr 14, 2025
18b70ba
AMBARI-26443. Failed to execute goal frontend-maven-plugin on MAC M1 …
peterxcli Apr 14, 2025
135c9a6
AMBARI-26444: Build is broken: infra_solr.py:172:1: SyntaxError: Unex…
Yunyung Apr 15, 2025
9d998df
AMBARI-26454: Two source code files don't have Apache license text #3982
rich7420 Apr 16, 2025
e2523a4
AMBARI-26461: NotAMock Argument should be a mock, but is: class java.…
jojochuang Apr 16, 2025
d68f546
AMBARI-26462: Alluxio-site-properties.xml does not pass validation (#…
jojochuang Apr 16, 2025
94dc95a
AMBARI-26438: Ambari capacity view add failed (#3983)
JiaLiangC Apr 16, 2025
f4b20f5
[AMBARI-26456]Dependency org.mockito:mockito-inline version is not un…
0lai0 Apr 16, 2025
2da9184
AMBARI-26453: change to 3.1.0.0-SNAPSHOT (#3986)
rich7420 Apr 17, 2025
45dc251
AMBARI-26449:Update org.postgresql:postgresql to 42.3.9 #3994
rich7420 Apr 18, 2025
3abfc78
AMBARI-26458: Maven -DskipSurefireTests does not skip Java tests (#3997)
Yunyung Apr 18, 2025
ee295db
AMBARI-26474: Fix ambari server py test (#3995)
JiaLiangC Apr 18, 2025
ace26e9
AMBARI-26460: module java.base does not "opens sun.nio.fs" to unnamed…
Yunyung Apr 18, 2025
9e3988b
AMBARI-25598. Fix parameter error in the toString() of the ServiceCom…
743294668 Apr 19, 2025
cb2028c
AMBARI-26448: Update org.springframework:* to 6.0.23 (#3993)
frankvicky Apr 19, 2025
90c2698
Bump org.apache.derby:derby in /ambari-project (#3990)
dependabot[bot] Apr 19, 2025
495aa36
AMBARI-26470: Bump org.codehaus.groovy:groovy-all in /ambari-project…
dependabot[bot] Apr 19, 2025
d972de1
AMBARI-25814: Bump commons-io:commons-io from 2.8.0 to 2.14.0 in /amb…
dependabot[bot] Apr 19, 2025
60f2c6e
AMBARI-26463: AmbariHandlerListTest.testRemoveViewInstance NPE (#3988)
jojochuang Apr 20, 2025
a47e238
AMBARI-26476:Precommit failed due to checkstyle error (#4003)
rich7420 Apr 20, 2025
a4234bd
AMBARI-26461 addendum (#4006)
jojochuang Apr 21, 2025
629da62
AMBARI-26474: Fix ambari server py test (#4007)
JiaLiangC Apr 21, 2025
dd614f9
AMBARI-26475:Two Ambari WebUI Tests failures (#4002)
rich7420 Apr 21, 2025
2254b6c
AMBARI-26466: WidgetResourceProviderTest.testUpdateResources fails du…
Yunyung Apr 24, 2025
7edd943
AMBARI-26471:Python test failures: X509_V_FLAG_NOTIFY_POLICY unsuppor…
rich7420 Apr 24, 2025
e9fc243
AMBARI-26489 Remove odpi-ambari-mpack #4005
rich7420 Apr 24, 2025
469fb4d
AMBARI-26494: Ambari server failed to start due to database check fai…
guluo2016 Apr 30, 2025
83173d0
AMBARI-26479: Bump org.apache.commons:commons-compress from 1.21 to 1…
0lai0 Apr 30, 2025
b4b900a
AMBARI-26495: Ambari server startup failure caused by incorrect sprin…
guluo2016 May 6, 2025
cf13109
AMBARI-26508: Multiple versions of ehcache.jar found in java class pa…
guluo2016 May 13, 2025
c831a7c
AMBARI-26516 : Ambari Agent hung when ambari server sends agent resta…
develop-vijay Jun 12, 2025
27a543f
AMBARI-26316: Add metrics for Agent Stomp and Api Stomp performance (…
sandeepk318 Jun 12, 2025
159363e
AMBARI-25839: Reset user after RA HA wizard close (#3628)
develop-vijay Jun 16, 2025
da2ba68
Ambari-26513: Added Scrolling Functionality in Sidebar Navigation Usi…
manish-m-pillai Jun 23, 2025
2f374dc
AMBARI-26519: Additional check for public and local during 1st time i…
kravii Jul 1, 2025
aa16c2a
AMBARI-26517 : Avoid printing password during DB connection check (#4…
develop-vijay Jul 1, 2025
dab0b5a
AMBARI-26520 : Fix deprecated usage string.uppercase (#4029)
harshith-21 Jul 1, 2025
872caeb
AMBARI-26295: ambari-server start error: Caused by: java.lang.Abstrac…
guluo2016 Jul 1, 2025
6607006
AMBARI-26522 : Fix imports for collections (#4033)
harshith-21 Jul 2, 2025
60c9306
AMBARI-26523: Add missing logback.xml #4035
hidataplus Jul 3, 2025
10503f5
AMBARI-26524: Fix inspect deprecations for Python 3.11 compatibility …
harshith-21 Jul 3, 2025
246bfab
AMBARI-26528: Add build.os_arch params to support aarch64 #4040
hidataplus Aug 11, 2025
8e209c0
AMBARI-26535: Fix apache rat-plugin check errors and web test failed …
prabhjyotsingh Aug 11, 2025
fe2a0bd
AMBARI-26531: Restore java_exec in infra_solr.py (#4042)
Ko-dany Aug 11, 2025
71684df
AMBARI-26530: Allow Jetty to serve symlinked resource files (#4041)
Ko-dany Aug 11, 2025
620ca11
AMBARI-26538: Fix KeyError by initializing stack_version before use (…
Ko-dany Aug 12, 2025
6cda52b
AMBARI-26529 Fix Kerberos admin session ajax failure (#4039)
shubhluck Aug 12, 2025
654fb99
AMBARI-26545: Fix rolling restart: use Response.readEntity(String) in…
sanrajbandre Sep 11, 2025
57a82e2
AMBARI-26537: Security: Remove command file json after execution of a…
develop-vijay Sep 12, 2025
d7f47af
AMBARI-26000: Change admin_password to use str instead of unicode (#4…
HalimKim Oct 27, 2025
67afb26
AMBARI-26552: Upgrade service version to Bigtop 3.4.0 (#4078)
abjfh30 Nov 9, 2025
e1881b2
AMBARI-26496 Multiple HTTP GET methods incorrectly consume entity, ca…
guluo2016 Nov 9, 2025
ca147ac
AMBARI-26533: Ranger Admin Restart Deletes JDBC JAR When Installed on…
eubnara Nov 10, 2025
b8cc03a
AMBARI-26555: Password leaked for configurations at stack root (e.g. …
eubnara Nov 13, 2025
bee2a07
AMBARI-26311: postgresql-server should be installed even though ambar…
eubnara Nov 27, 2025
d233f8b
AMBARI-26559: compilation not working on trunk branch (#4089)
sandeepk318 Dec 2, 2025
78876b1
AMBARI-26560: Unable to execute alert because of mistakenly ambari-ag…
guluo2016 Dec 2, 2025
9f3e8af
AMBARI-26562: Fix UT failure in Kerberos Step2 Controller (#4092)
prabhjyotsingh Dec 8, 2025
989a8e5
AMBARI-26561: add support for $.browser (#4091)
prabhjyotsingh Dec 11, 2025
5d9878b
AMBARI-26563: Replace deprecated logger.warn() with logger.warning() …
guluo2016 Dec 13, 2025
5605979
AMBARI-26568: Fixing IllegalArgumentException: argument src is null d…
basapuram-kumar Jan 27, 2026
75b51f0
AMBARI-26599: Update the ambari-3.0.0 docs (#4131)
sandeepk318 May 19, 2026
713781a
AMBARI-26303: Rebase trunk branch onto frontend-refactor (#3937)
nikita15p Feb 6, 2025
8c3b591
AMBARI-26315: Ambari Web Switchable experience (#3967)
vanshuhassija May 13, 2025
a5365e7
Merge branch 'frontend-refactor' into feature/vishalsuvagia/AMBARI-26…
vishalsuvagia Jun 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ pipeline {

stage('Ambari Server PyTests') {
steps {
sh '''
# Install pyOpenSSL in one step
pip3 install --user --upgrade pyOpenSSL
# Verify installations
pip3 --version
openssl version
'''
sh 'mvn clean -am test -pl ambari-server -DskipSurefireTests -Dmaven.test.failure.ignore -Dmaven.artifact.threads=10 -Drat.skip -Dcheckstyle.skip -DskipAdminWebTests=true'
}
}
Expand Down
3 changes: 1 addition & 2 deletions ambari-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<relativePath>../ambari-project</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.ambari</groupId>
<artifactId>ambari-admin</artifactId>
<packaging>jar</packaging>
<name>Ambari Admin View</name>
Expand Down Expand Up @@ -60,7 +59,7 @@
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.3</version>
<version>1.11.0</version>
<configuration>
<nodeVersion>v4.5.0</nodeVersion>
<npmVersion>2.15.0</npmVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useState, useEffect, useRef } from 'react';
import {Button, Modal} from 'react-bootstrap';

Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified ambari-admin/src/main/resources/ui/ambari-admin/vite.config.ts
100644 → 100755
Empty file.
117 changes: 99 additions & 18 deletions ambari-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<relativePath>../ambari-project</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.ambari</groupId>
<artifactId>ambari-agent</artifactId>
<name>Ambari Agent</name>
<description>Ambari Agent</description>
Expand Down Expand Up @@ -54,6 +53,23 @@
<customActionsLocation>${target.cache.dir}/custom_actions</customActionsLocation>
<empty.dir>src/packages/tarball</empty.dir> <!-- any directory in project with not very big amount of files (not to waste-load them) -->
<python.test.mask>[Tt]est*.py</python.test.mask>

<commons-cli.version>1.5.0</commons-cli.version>
<commons-collections.version>3.2.2</commons-collections.version>
<commons-configuration2.version>2.8.0</commons-configuration2.version>
<commons-lang.version>2.6</commons-lang.version>
<commons-lang3.version>3.12.0</commons-lang3.version>
<commons-io.version>2.14.0</commons-io.version>
<commons-logging.version>1.1.3</commons-logging.version>
<commons-compress.version>1.26.0</commons-compress.version>
<guava.version>27.0-jre</guava.version>
<hadoop.version>3.3.4</hadoop.version>
<hadoop-auth.version>3.3.4</hadoop-auth.version>
<hadoop-shaded-guava.version>1.1.1</hadoop-shaded-guava.version>
<slf4j.version>1.7.36</slf4j.version>
<woodstox-core.version>5.4.0</woodstox-core.version>
<stax2-api.version>4.2.1</stax2-api.version>
<curator.version>4.2.0</curator.version>
</properties>
<dependencies>
<dependency>
Expand All @@ -73,41 +89,65 @@
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>${commons-cli.version}</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>${commons-collections.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
<artifactId>commons-configuration2</artifactId>
<version>${commons-configuration2.version}</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.6</version>
<exclusions>
<exclusion>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils-core</artifactId>
</exclusion>
</exclusions>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons-lang.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons-logging.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>${commons-compress.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.1.3-jre</version>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.7.3</version>
<version>${hadoop.version}</version>
<exclusions>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
</exclusion>
<exclusion>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
Expand Down Expand Up @@ -136,16 +176,57 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-auth</artifactId>
<version>${hadoop-auth.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop.thirdparty</groupId>
<artifactId>hadoop-shaded-guava</artifactId>
<version>${hadoop-shaded-guava.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
<version>${woodstox-core.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId>
<version>${stax2-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper-jute</artifactId>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
<version>4.2.0</version>
<version>${curator.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand All @@ -157,13 +238,13 @@
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<version>4.2.0</version>
<version>${curator.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-client</artifactId>
<version>4.2.0</version>
<version>${curator.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -341,7 +422,7 @@
<fileEncoding>utf-8</fileEncoding>
</postremoveScriptlet>

<needarch>x86_64</needarch>
<needarch>${build.os_arch}</needarch>
<autoRequires>false</autoRequires>
<mappings>
<mapping>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def run(self):
Run an endless loop which reports all the alert statuses got from collector
"""
if self.alert_reports_interval == 0:
logger.warn(
logger.warning(
"AlertStatusReporter is turned off. Some functionality might not work correctly."
)
return
Expand Down Expand Up @@ -142,7 +142,7 @@ def get_changed_alerts(self, alerts):
):
changed_alerts.append(alert)
else:
logger.warn(
logger.warning(
"Cannot find alert definition for alert='{0}', alert_state='{1}'.".format(
alert_name, alert_state
)
Expand Down
40 changes: 23 additions & 17 deletions ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,22 @@ def __init__(self):
global content
self.config = configparser.RawConfigParser()
self.config.readfp(io.StringIO(content))
self._cluster_cache_dir = os.path.join(
self.cache_dir, FileCache.CLUSTER_CACHE_DIRECTORY
)
self._alerts_cachedir = os.path.join(
self.cache_dir, FileCache.ALERTS_CACHE_DIRECTORY
)

# initialize derived paths for the cache directories
self._recalculate_cache_paths()

def _recalculate_cache_paths(self):
"""
Recalculate all cache-related paths based on the current cache_dir value.
Keeps derived instance variables consistent with the parser-backed `cache_dir`.
"""
self._cluster_cache_dir = os.path.join(self.cache_dir, FileCache.CLUSTER_CACHE_DIRECTORY)
self._alerts_cachedir = os.path.join(self.cache_dir, FileCache.ALERTS_CACHE_DIRECTORY)
self._stacks_dir = os.path.join(self.cache_dir, FileCache.STACKS_CACHE_DIRECTORY)
self._common_services_dir = os.path.join(
self.cache_dir, FileCache.COMMON_SERVICES_DIRECTORY
)
self._extensions_dir = os.path.join(
self.cache_dir, FileCache.EXTENSIONS_CACHE_DIRECTORY
)
self._host_scripts_dir = os.path.join(
self.cache_dir, FileCache.HOST_SCRIPTS_CACHE_DIRECTORY
)
self._common_services_dir = os.path.join(self.cache_dir, FileCache.COMMON_SERVICES_DIRECTORY)
self._extensions_dir = os.path.join(self.cache_dir, FileCache.EXTENSIONS_CACHE_DIRECTORY)
self._host_scripts_dir = os.path.join(self.cache_dir, FileCache.HOST_SCRIPTS_CACHE_DIRECTORY)


def get(self, section, value, default=None):
try:
Expand All @@ -143,6 +143,8 @@ def has_section(self, section):

def setConfig(self, customConfig):
self.config = customConfig
# Recalculate derived paths when the underlying parser changes
self._recalculate_cache_paths()

def getConfig(self):
return self.config
Expand All @@ -160,7 +162,7 @@ def get_resolved_config(cls, home_dir=""):
raise Exception(f"No config found at {configPath}, use default")

except Exception as err:
logger.warn(err)
logger.warning(err)
setattr(cls, "_conf_cache", config)
return config

Expand Down Expand Up @@ -292,7 +294,7 @@ def command_file_retention_policy(self):
policy = self.get(
"agent",
self.COMMAND_FILE_RETENTION_POLICY_PROPERTY,
default=self.COMMAND_FILE_RETENTION_POLICY_KEEP,
default=self.COMMAND_FILE_RETENTION_POLICY_REMOVE,
)
policies = [
self.COMMAND_FILE_RETENTION_POLICY_KEEP,
Expand Down Expand Up @@ -363,9 +365,13 @@ def remove_option(self, section, option):

def load(self, data):
self.config = configparser.RawConfigParser(data)
# Recalculate derived paths after loading config data
self._recalculate_cache_paths()

def read(self, filename):
self.config.read(filename)
# Recalculate derived paths after reading configuration file
self._recalculate_cache_paths()

def getServerOption(self, url, name, default=None):
from ambari_agent.NetUtil import NetUtil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def run(self):
Run an endless loop which reports all the commands results (IN_PROGRESS, FAILED, COMPLETE) every self.command_reports_interval seconds.
"""
if self.command_reports_interval == 0:
logger.warn(
logger.warning(
"CommandStatusReporter is turned off. Some functionality might not work correctly."
)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def run(self):
Run an endless loop which executes all status commands every 'status_commands_run_interval' seconds.
"""
if self.status_commands_run_interval == 0:
self.logger.warn(
self.logger.warning(
"ComponentStatusExecutor is turned off. Some functionality might not work correctly."
)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def cancel_command(self, task_id, reason):
log_process_information(logger)
shell.kill_process_with_children(pid)
else:
logger.warn(f"Unable to find process associated with taskId = {task_id}")
logger.warning(f"Unable to find process associated with taskId = {task_id}")

def get_py_executor(self, forced_command_name):
"""
Expand Down
Loading