Dahyun Ko created AMBARI-26530:
----------------------------------

             Summary: Enable support for symlinked mpack installation scripts 
in Jetty 11
                 Key: AMBARI-26530
                 URL: https://issues.apache.org/jira/browse/AMBARI-26530
             Project: Ambari
          Issue Type: Improvement
          Components: ambari-server
    Affects Versions: 3.0.0
         Environment: Rocky 8

JDK 17

Python 3.11

 
            Reporter: Dahyun Ko
             Fix For: 3.0.0


h3. Summary

With the recent upgrade to Jetty 11 from the following commit AMBARI-26288, 
Ambari is no longer be able to access mpack installation scripts that are 
symlinked. This is due to Jetty 11 disallows serving files through symbolic 
links by default.
h3. Steps to reproduce the issue
 # Install an Ambari mpack.
 # Attempt to trigger mpack installation on Ambari UI web.

h3. Expected Behavior
 * Observe the mpack installation failure with following error message:

{code:java}
WARNING 2025-07-16 01:34:12,850 FileCache.py:229 - Error occurred during cache 
update. Error tolerate setting is set to true, so ignoring this error and 
continuing with current cache. Error details: Can not download file from url 
https://rocky8tpl:8446/resources/common-services/AIRFLOW/2.8.3/package/.hash : 
HTTP Error 404: Not Found {code}
h3. Proposed Solution
 * Explicitly enable symlink usage with SymlinkAllowedResourceAliasChecker.

{code:java}
import org.eclipse.jetty.server.SymlinkAllowedResourceAliasChecker;
import org.eclipse.jetty.util.resource.Resource;  

File resourcesDirectory = new File(configs.getResourceDirPath());
Resource baseResource = 
Resource.newResource(resourcesDirectory.getParentFile().getAbsolutePath());
root.addAliasCheck(new SymlinkAllowedResourceAliasChecker(root, baseResource)); 
{code}
 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to