Pablo Carranza Velez
71bd742dfe
Remove quotes in OS version
2016-02-15 19:03:06 +00:00
Pablo Carranza Velez
27e8e3c027
Update docker-progress and drop default port from repo tag
2016-01-28 11:08:42 -03:00
Pablo Carranza Velez
78f0df281b
Replace dockersync.sh with node and dockerode stuff. Don't install docker. Add Dockerfile changes for armel.
2016-01-28 11:08:42 -03:00
Pablo Carranza Velez
676f6699fe
Nicer use of spawn
2016-01-28 11:08:42 -03:00
Pablo Carranza Velez
9dd1fa2408
Catch out of sync errors falling back to scratch. Make update retries more dependent on number of failures
2016-01-28 11:08:42 -03:00
Pablo Carranza Velez
d3fea26c11
Send both source tag and Id to delta server
2016-01-28 11:08:42 -03:00
Pablo Carranza Velez
b9eb6836be
Better check for source image.
...
Don't use config.supervisorImage, and use image Id's instead of tags.
Also, change the RESIN_DELTA var into the RESIN_SUPERVISOR_ namespace.
2016-01-28 11:08:42 -03:00
Pablo Carranza Vélez
5b48856c9a
Bring back request - and show an error when talking to delta server fails
2016-01-28 11:08:42 -03:00
Pablo Carranza Vélez
1a5a9b0e23
findSimilarImage should always return an array, and test the repoTag[0]
2016-01-28 11:08:42 -03:00
Pablo Carranza Vélez
8e4e844cfa
JSON.parse env before checking for delta, and use progress.percentage
2016-01-28 11:08:42 -03:00
Petros Angelatos
1bc149866d
deltas: sync() after running rsync on the new subvolume
2016-01-28 11:08:42 -03:00
Petros Angelatos
f7a2668c4f
config: change default delta endpoint to https and production
...
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-01-28 11:08:42 -03:00
Petros Angelatos
f6f88941eb
delta: only use deltas when RESIN_DELTA is set
...
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-01-28 11:08:42 -03:00
Petros Angelatos
582e3322ec
Set a 5 min timeout to delta requests
2016-01-28 11:08:42 -03:00
Petros Angelatos
88f0e4e229
Fix typo
2016-01-28 11:08:42 -03:00
Petros Angelatos
a12ebf884b
Increase rsync timeout to 5 mins
2016-01-28 11:08:42 -03:00
Petros Angelatos
83931a0915
Add timeout to prevent rsync from hanging
2016-01-28 11:08:42 -03:00
Petros Angelatos
071ee3dcf4
Ignore output from dockersync.sh
2016-01-28 11:08:42 -03:00
Petros Angelatos
79d638f4f5
Pass the --delete parameter to rsync
2016-01-28 11:08:42 -03:00
Petros Angelatos
f6eafb7b96
Always send the final progress event
2016-01-28 11:08:42 -03:00
Petros Angelatos
004286a07e
Tag the target image at the last step
2016-01-28 11:08:42 -03:00
Petros Angelatos
595f80e031
Fix rsync stream resumption
2016-01-28 11:08:42 -03:00
Petros Angelatos
7eefee77d0
Fix config var typo
2016-01-28 11:08:42 -03:00
Petros Angelatos
8c7964684a
Return the supervisor tag containing the git commit
2016-01-28 11:08:42 -03:00
Petros Angelatos
d0b6ba1721
Switch to http default transport
2016-01-28 11:08:42 -03:00
Petros Angelatos
bd2f31624b
Delete unused functions
2016-01-28 11:08:42 -03:00
Petros Angelatos
10e166020e
Speed up rsync diff application
2016-01-28 11:08:42 -03:00
Petros Angelatos
c13e16c96a
Remove fallback to docker pull
2016-01-28 11:08:42 -03:00
Petros Angelatos
9adbd81bc0
Avoid shadowing the config variable
2016-01-28 11:08:42 -03:00
Petros Angelatos
11dfbd1687
Don't timeout while waiting for delta
2016-01-28 11:08:42 -03:00
Petros Angelatos
cbde944565
Implement rsync diff fetching method
2016-01-28 11:08:42 -03:00
Pablo Carranza Velez
3e3e2a8d99
Quickfix again: Cast buffer to string when getting OS version. (Sorry)
2016-01-27 17:17:53 +00:00
Pablo Carranza Vélez
94e34ee990
Quickfix: use String .split instead of _.split
...
lodash 3 doesn't have the _.split function :S
2016-01-26 20:56:19 -03:00
Pablo Carranza Velez
8a4514ac00
Report Host OS version to the API
2016-01-26 10:20:04 -03:00
Pablo Carranza Velez
0f20251a8b
Use _.defaults instead of _.extend to ensure internal env vars are not overwritten
2016-01-22 12:40:41 -03:00
Pablo Carranza Velez
11b5e0abc9
Expose resin API key to apps
2016-01-21 17:50:47 -03:00
Pablo Carranza Velez
5961be6ffb
Set status to Idle when download is over
2016-01-21 10:52:36 -03:00
Pablo Carranza Velez
7d31ae9b24
Set download_progress to 0 when beginning download
2016-01-15 16:59:55 +00:00
Praneeth Bodduluri
fb47f73907
Add missing container filtering + Address PR Comments by removing regexp and making more idiomatic choices
2016-01-12 17:58:07 +05:30
Praneeth Bodduluri
396fe7d619
Initialize DOCKER_SOCKET in entry.sh
2016-01-08 18:30:14 +05:30
Pablo Carranza Vélez
17deb53c7c
Revert "Make config.json writes atomic"
2016-01-07 21:01:12 -03:00
Pablo Carranza Velez
c29f54b08c
Make config.json writes atomic
2015-12-19 02:14:07 +00:00
Praneeth Bodduluri
89abff57f6
Fix: Duplicated exports.connectivityCheck in utils.coffee
2015-12-10 20:30:04 +05:30
Pablo Carranza Velez
50137c163d
Bugfix: assign app.containerId before attaching logger
2015-12-04 23:27:45 +00:00
Pablo Carranza Velez
f0afdb9b2a
Only save the app if starting the container was successful
2015-12-02 11:37:47 -08:00
Pablo Carranza Velez
ac0917b114
Quick-fix: knex.select doesn't have .get()
2015-12-01 09:51:06 -08:00
Pablo Carranza Velez
10350c3d4a
Remove volumes when removing a container
2015-11-25 15:00:45 -08:00
Pablo Carranza Vélez
cbb3e2f461
Improve the update strategies:
...
* On handover, fetch old app from DB before starting the new app (and overwriting the DB record)
* Tidy up the logging
* Fix waitToKill so that it actually works
* Several other fixups
2015-11-23 10:02:19 -08:00
Pablo Carranza Vélez
1d6811a423
Implement waitToKill, keep RESIN_OVERRIDE_LOCK, and changelog for update strategies
2015-11-16 19:03:37 +00:00
Pablo Carranza Vélez
13dce75a21
Implement several update strategies
...
* Break up the update function into manageable parts
* Refactor the special variables into the RESIN_SUPERVISOR_ namespace
* Use three update strategies: normal, kill before download, hand over
TO-DO: implement waitToKill in the hand over case.
2015-11-16 19:03:36 +00:00