From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx> When a guest uses trace-cmd record to connect to the agent proxy on the host, it needs to set its role to "GUEST" when initializing the time synchronization protocols. Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> --- tracecmd/trace-record.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c index b43f3272dfc6..ce20402af7c2 100644 --- a/tracecmd/trace-record.c +++ b/tracecmd/trace-record.c @@ -3905,7 +3905,11 @@ static void connect_to_agent(struct common_record_context *ctx, die("Failed to connect to host %s:%u", instance->name, instance->port); } else { - role = TRACECMD_TIME_SYNC_ROLE_HOST; + /* If connecting to a proxy, then this is the guest */ + if (is_proxy(ctx->instance)) + role = TRACECMD_TIME_SYNC_ROLE_GUEST; + else + role = TRACECMD_TIME_SYNC_ROLE_HOST; sd = trace_vsock_open(instance->cid, instance->port); if (sd < 0) die("Failed to connect to vsocket @%u:%u", -- 2.35.1