A new application, with network mode HOST, created via PUT fails to define the PORT environment variable and set portMappings.
When you create a new application via PUT, the default portDefinitions are not populated. However, they are for POST. In marathon 1.4.X, this worked for both PUT and POST.
- Applications created with POST and HOST networking work correctly
- Working HOST networking applications that are updated (not created from scratch) with PUT continue to work correctly
- Regardless of POST/PUT methods, BRIDGE mode works correctly
- The issue exists whether or not the new 1.5.+ JSON format is used (container.docker.network or networks)
Sample JSON for quick testing (tomcat.json):
The following is a demonstration of the problem:
With Marathon 1.4.9, we see:
With Marathon 1.5.5, we see:
You'll notice that in 1.5.5, we don't have any portDefinitions.
• When we create an app with HOST networking mode via the PUT endpoint, the default portDefinitions must be populated.