use ssh to send image instead of http to avoid timeouts#1087
use ssh to send image instead of http to avoid timeouts#1087rcooke-warwick wants to merge 6 commits into
Conversation
vipulgupta2048
left a comment
There was a problem hiding this comment.
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.
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.
| // 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.
| // 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.
| // 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.
| 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.
| let TARGET_PATH = imagePath; | |
| let targetPath = imagePath; |
Can we change this everywhere to follow the same naming conventions.
0117693 to
0b88e1c
Compare
jakogut
left a comment
There was a problem hiding this comment.
Nice improvement. Re-inventing SSH over HTTP was always a bit of a head scratcher.
Change-type: patch Signed-off-by: Ryan Cooke <ryan@balena.io>
Change-type: patch Signed-off-by: Ryan Cooke <ryan@balena.io>
Change-type: patch Signed-off-by: Ryan Cooke <ryan@balena.io>
Change-type: patch Signed-off-by: Ryan Cooke <ryan@balena.io>
0b88e1c to
59c152c
Compare
Change-type: patch Signed-off-by: Ryan Cooke <ryan@balena.io>
use with worker balena-os/leviathan-worker#93