himanshumaurya09876 commented on code in PR #4261:
URL: https://github.com/apache/ambari/pull/4261#discussion_r4627955600


##########
ambari-web/latest/src/hooks/useEnhancedConfigs.ts:
##########
@@ -689,6 +710,21 @@ function useEnhancedConfigs(
           }
           
           if (shouldIncludeProperty && allowUpdateProperty(propertyName, 
configType + ".xml", "Default", null, null)) {
+            // Like Ember's _createNewProperty: a recommended property the 
stack does not
+            // define (e.g. hadoop.proxyuser.*) must join the configs, or it 
is never deployed.
+            if (
+              targetServiceName
+              && targetServiceName !== "MISC"
+              && !deletedProperties.has(`${propertyName}_${configType}`)
+            ) {
+              addRecommendedConfigProperty(
+                configProperties,
+                targetServiceName,
+                configType,
+                propertyName,
+                recommendedValue,
+              );
+            }

Review Comment:
   Hi @prabhjyotsingh, thanks for this, and for porting Classic's 
_createNewProperty so the proxyuser recommendations actually get deployed. 
   
   I think this change can wipe the installed cluster's core-site during Add 
Service:
   
   1. The recommended hadoop.proxyuser.* property is added to the installed 
HDFS's Custom core-site with initialValue: null, so it always counts as changed.
   2. For installed services, buildClusterConfigurationPayload sends only the 
changed properties. Locally, the payload came out as:
   {"type":"core-site","properties":{"hadoop.proxyuser.hive.hosts":"*"}}
   3. The server doesn't merge desired configs. AmbariManagementControllerImpl 
creates the new version from exactly those properties, so fs.defaultFS and 
every other existing core-site key would be dropped.
   
   I haven't verified this end to end on a cluster yet. Could you check the 
core-site payload sent during Add Service deploy? If it only has the proxyuser 
keys, I think we should send the full property set the way Classic does.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to