-
Notifications
You must be signed in to change notification settings - Fork 6
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
use ssh to send image instead of http to avoid timeouts #1087
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flashing looks so much cleaner and it makes sense. Comments inline
) | ||
} | ||
|
||
// note: for the qemu case, we are assuming a shared volume between core and worker - this means that any image we want to flash must be in this volume - is it in all our cases? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who is this question for?
If you are asking me then yeah why not. The docker-compose will define the volumes once for QEMU and that should be the case everywhere no?
async () => { | ||
this.logger.log(`Sending image ${imagePath}`); | ||
try{ | ||
// arrives at worker as /data/os.img.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// arrives at worker as /data/os.img.gz | |
// Sends image to worker at TARGET_PATH |
); | ||
|
||
let TARGET_PATH = imagePath; | ||
// if using remote worker i.e autokit/testbot, send the image over ssh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// if using remote worker i.e autokit/testbot, send the image over ssh | |
// if autokit/testbot, send the image over ssh |
Clarity++, saying remote worker
adds another shade of terminology
// Wrap sending of image in a retry - hopefully the --partial arguement in the rsync command means it will resume | ||
// in the case of an error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Wrap sending of image in a retry - hopefully the --partial arguement in the rsync command means it will resume | |
// in the case of an error | |
// Send image with rsync command, retry if error |
console.log(e); | ||
throw new Error(`Rysnc error: ${e.message}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log(e); | |
throw new Error(`Rysnc error: ${e.message}`) | |
throw new Error(`Rysnc error: ${e}`) |
}, | ||
); | ||
|
||
let TARGET_PATH = imagePath; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let TARGET_PATH = imagePath; | |
let targetPath = imagePath; |
Can we change this everywhere to follow the same naming conventions.
0117693
to
0b88e1c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement. Re-inventing SSH over HTTP was always a bit of a head scratcher.
Change-type: patch Signed-off-by: Ryan Cooke <[email protected]>
Change-type: patch Signed-off-by: Ryan Cooke <[email protected]>
Change-type: patch Signed-off-by: Ryan Cooke <[email protected]>
Change-type: patch Signed-off-by: Ryan Cooke <[email protected]>
Change-type: patch Signed-off-by: Ryan Cooke <[email protected]>
0b88e1c
to
59c152c
Compare
Change-type: patch Signed-off-by: Ryan Cooke <[email protected]>
use with worker balena-os/leviathan-worker#93