Commit Graph

435 Commits

Author SHA1 Message Date
Pablo Carranza Velez
c9968f7bbc Improve logging, plus some style fixes 2016-03-23 12:21:15 -03:00
Pablo Carranza Velez
eddc58ee86 Finish log to display setting. Add logging to host config. Save host config before rebooting. Allow applying boot config to RPi3. 2016-03-23 12:21:15 -03:00
Pablo Carranza Velez
2c5bc8b90a Add nodejs side of enabling/disabling log to display 2016-03-23 12:21:14 -03:00
Alexios Theodoros Brezas
3d082aaaa8 mount to /host dir 2016-03-23 04:15:02 +00:00
Alexios Theodoros Brezas
84d42ca6de Bind mount /var/lib/connman to application containers.
This allows application containers to interface with host connman.

Host /var/lib/connman is bind mounted to /host_var/lib/connman to avoid
collisions with connman installations inside the container.
2016-03-23 04:15:01 +00:00
Pablo Carranza Velez
f29bab0b9d Add RESIN_SUPERVISOR_DELTA to special list so that app is not restarted when it changes 2016-03-09 10:53:48 -03:00
Kostas Lekkas
fcaafd9033 Reduce noise in logs 2016-03-07 13:16:38 +02:00
Pablo Carranza Velez
a4b08e389e Add more update-related fields to the GET /v1/device endpoint 2016-02-18 16:53:15 +00:00
Pablo Carranza Velez
d0c76aec0f Use a closure for device state and also report in GET /v1/device whether there's a pending update 2016-02-18 16:53:15 +00:00
Pablo Carranza Velez
670f318c39 Add endpoint to get device state 2016-02-18 16:53:15 +00:00
Pablo Carranza Velez
b088612ddd Check for valid strings or ints in all config values 2016-02-18 12:52:00 -03:00
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