(This is a translation of a [Japanese [Content removed] by Kokawa Takashi.)
When requesting a distributed build using UBA via HordeServer, I noticed that the same machine as the requester is selected.
Looking into the code, I confirmed that around line 418 of the following file, a condition has been added to avoid assigning work to the same machine as the requester:
Engine\Source\Programs\Horde\Plugins\Compute\HordeServer.Compute\Compute\ComputeService.cs
When investigating the cause in the debug execution environment described in the reproduction steps, which is described in the following post, I noticed that requesterIp contained an IPv6-mapped IPv4 address such as “::ffff:127.0.0.1”. The comparison condition was ComputeIp != ‘::ffff:127.0.0.1’, which caused the comparison with the IPv4 ComputeIp to fail.
I also noticed the following in the related areas:
■ HordeServer side
In Engine\Source\Programs\Horde\HordeServer\Commands\ServerCommand.cs, the KestrelServer is started using the ListenAnyIP method. In this configuration, listening on IPv6 is the default behavior. In the HordeServer execution log where I noticed the issue, I also confirmed from the following log entry that it was listening on IPv6:
Now listening on: [http://[::]:13340](http://[::]:13340)
Then, in Engine\Source\Programs\Horde\Plugins\Compute\HordeServer.Compute\Compute\ComputeController.cs, the requester IP address obtained via
RequesterIp = HttpContext.Connection.RemoteIpAddress seems to be returned as an IPv6-mapped IPv4 address in the environment, and it is then passed to the comparison condition that causes the issue.
■ HordeAgent side
In Engine\Source\Programs\Horde\HordeAgent\Services\CapabilitiesService.cs, the ComputeIp value is set, and appears to be handled as an IPv4 address.
ComputeIp can also be set in the HordeAgent configuration file (Agent.json). So, I tried specifying IPv6 addresses and IPv6-mapped IPv4 addresses there as well, but it did not work. The issue were not resolved.
== Questions ==
(1) Is there a configuration-based workaround for this issue (environment configuration or adjustments to the HordeServer / HordeAgent settings)?
(2) What network configuration is expected for Horde?
- Is HordeServer expected to listen on IPv4 or IPv6?
- What value is expected for HordeAgent ComputeIp?
(3) In what situations should ComputeIp be adjusted manually?
== Request ==
I have confirmed that the issue can be resolved by modifying the code so that the handling of IPv6/v4 matches our environment.
So, as a fundamental solution, I would like to request that Epic Games consider implementing support in favor of such network environment patterns.
== Other related information ==
The following discussion appears to be relevant:
[Content removed]
> A) When a compute resource (agent) is requested, it will not assign work to an agent matching requesting user’s IP
I guess the issue occurs because the above mechanism does not work.
Thanks.
[Attachment Removed]