diff --git a/src/Runner.Worker/JobRunner.cs b/src/Runner.Worker/JobRunner.cs index e4809559d74..a7ca1cf8d90 100644 --- a/src/Runner.Worker/JobRunner.cs +++ b/src/Runner.Worker/JobRunner.cs @@ -50,7 +50,7 @@ public async Task RunAsync(Pipelines.AgentJobRequestMessage message, var virtIpPath = Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Work), "ip"); var virtPidPath = Path.Combine(virtDir, "work", "qemu.pid"); var virtFileReadSuccess = true; - string virtIp = "", virtPid = ""; + string virtIp = "172.17.0.2", virtPid = ""; Trace.Info($"QEMU tools directory: {virtDir}"); @@ -66,10 +66,11 @@ public async Task RunAsync(Pipelines.AgentJobRequestMessage message, try { - using (StreamReader reader = new StreamReader(new FileStream(virtIpPath, FileMode.Open))) - { - virtIp = reader.ReadLine(); - } + // TODO: IMPLEMENT THIS PROPERLY ONCE MULTITHREADING IS IN PLACE! + //using (StreamReader reader = new StreamReader(new FileStream(virtIpPath, FileMode.Open))) + //{ + // virtIp = reader.ReadLine(); + //} using (StreamReader reader = new StreamReader(new FileStream(virtPidPath, FileMode.Open))) { @@ -84,6 +85,17 @@ public async Task RunAsync(Pipelines.AgentJobRequestMessage message, } + if (virtIp == "") + { + Trace.Error("virtIp is an empty string!"); + + } + + if (virtPid == "") + { + Trace.Error("virtPid is an empty string!"); + } + message.Variables["system.qemuDir"] = virtDir; message.Variables["system.qemuIp"] = virtIp;