Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add logging for ssh error and stop conn resets during reboot command #1028

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions core/lib/common/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ module.exports = class Worker {
try {
result = await utils.executeCommandOverSSH(command, config);
} catch (err) {
console.log(`Failed to execute command: ${command}`)
console.error(err.message);
throw new Error(err);
}
Expand Down Expand Up @@ -467,7 +468,7 @@ module.exports = class Worker {
`tcp-listen:${workerPort},reuseaddr,fork "system:ssh ${ip} -p 22222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${this.dutSshKey} /usr/bin/nc localhost ${dutPort}"`,
]);

let tunnelProWorker = spawn(`ssh`, argsWorker);
let tunnelProWorker = spawn(`ssh`, argsWorker, {stdio: 'inherit'});

// setup a listener from this host to worker must be a sub process...
// we must give map the same port on this host and the DUT - so the cli can use it
Expand All @@ -477,7 +478,7 @@ module.exports = class Worker {
`system:ssh ${this.workerUser}@${this.workerHost} -p ${this.workerPort} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${this.sshKey} ${this.sshPrefix}/usr/bin/nc localhost ${workerPort}`,
];

let tunnelProcClient = spawn(`socat`, argsClient);
let tunnelProcClient = spawn(`socat`, argsClient, {stdio: 'inherit'});
}

// create tunnels to relevant DUT ports to we can access them remotely
Expand Down