Commit Graph

58 Commits

Author SHA1 Message Date
Pablo Carranza Velez
1706afa7a2 Remove deprecated and broken OOM protection from gosuper, and clean up its dependencies and unused files
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-06 10:32:28 -08:00
Pablo Carranza Velez
7ae7ceab73 gosuper: add internal endpoints to get VPN and log-to-display status, and remove purge and IP address endpoints
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-06 10:32:27 -08:00
Pablo Carranza Velez
cff789ebfa Implement an API for proxy and hostname configuration, and centralize management of config.json
Change-Type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-01-17 14:05:40 -03:00
Pablo Carranza Velez
c34454bbe1 gosuper: When getting IP addresses, ignore balena and the resin-dns bridge
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-12-12 00:36:27 -08:00
Trong Nghia Nguyen
01c39f33b5 Fixes #511, add support for new supervisor image for x86 with quark cpu
boards.

Change-Type: minor
Signed-off-by: Trong Nghia Nguyen <nghiant2710@gmail.com>
2017-11-01 03:33:43 -07:00
Pablo Carranza Velez
8d84facff5 Add a single Dockerfile to build the supervisor as a multi-stage build
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
848184e9a6 Update gosuper to go 1.8.3
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-30 23:46:17 -07:00
Pablo Carranza Velez
af41632075 Install upx 3.94 from github to support aarch64
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-30 23:46:17 -07:00
Pablo Carranza Velez
84062565c4 When testing gosuper formatting, don't check the vendor directory
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-30 23:46:17 -07:00
Pablo Carranza Velez
d21c7faf4e Update gosuper to go 1.7.6
Adapting Petros' x86 patches to the new version

Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-30 23:46:17 -07:00
Pablo Carranza Velez
fc4b9656cd Switch to glide for Go dependencies
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-30 23:46:16 -07:00
Petros Angelatos
c7a7ba93fb gosuper: support i386 platforms without MMX instructions
The intel quark and the gallileo have an x86 CPU that does not have MMX
extensions. Use a patched go that does not require those instructions for
atomics, and also enable the GO386=387 flag.

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-10-20 20:52:33 -07:00
Pablo Carranza Velez
3cbe56c978 Fix disabling logs to display on newer OS with different service name 2016-10-05 19:04:47 +00:00
Praneeth Bodduluri
81cb27a876 Add resin-vpn interface IP filtering to gosupervisor 2016-09-23 18:46:28 +05:30
Petros Angelatos
ca91fd179b compress gosuper with upx
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-09-14 01:38:37 +00:00
Petros Angelatos
83393c04e3 switch to golang 1.6 to make the binary upx-able
https://github.com/golang/go/issues/13974
5e7110b92b

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-09-14 01:38:36 +00:00
Petros Angelatos
488ca41621 build: implement multi-Dockerfile build process
This build strategy lends itself to how Rockerfiles work. In the build
Dockerfile all the build utilities (e.g gcc, python) are installed and
run the build process to produce some build artifacts. There are two
build Dockerfiles, one for the nodejs part and one for the golang part.
The build artifacts of these are combined into the runtime Dockerfile.
For all this to work there is some minimal glue implemented in the
Makefile.

Part of this commit is a switch of the base image the runtime is based
on to the minimal OpenEmbedded one produced by #198

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-09-14 01:38:35 +00:00
Pablo Carranza Velez
164d565283 Make the data path configurable 2016-06-14 13:50:50 -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
Praneeth Bodduluri
6d391703e2 BugFix - OOMAdjust wrongly runs on all PIDs without a name match 2016-01-20 02:20:36 +05:30
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
b28e6c7648 Change the openvpn and connmand OOM adjust to only happen if existing value is 0 2016-01-08 18:30:14 +05:30
Praneeth Bodduluri
1bc53ebc8d Add protection for connman and openvpn every 5 minutes 2016-01-08 18:30:14 +05:30
Praneeth Bodduluri
34dcae78de Fix formatting tests to exclude Godeps 2016-01-08 18:30:14 +05:30
Praneeth Bodduluri
7ac0323de3 Move the OOM protection code to a function 2016-01-08 18:30:14 +05:30
Praneeth Bodduluri
6231b952bc Use psutils to set OOM adj score for this container to -800 2016-01-08 18:30:14 +05:30
Praneeth Bodduluri
53ebc1ef7f Use OOM Score Adjust 2016-01-08 18:30:14 +05:30
Praneeth Bodduluri
b0001c049f Initial helper functions for adjusting OOM adj value of process' and Docker containers 2016-01-08 18:30:14 +05:30
Pagan Gazzard
4a829b851f Ignore all godeps workspace diffs 2016-01-08 12:45:11 +00:00
Praneeth Bodduluri
1bab2c6a83 Do not report the tun addresses to API 2015-12-10 22:21:40 +05:30
Lorenzo Stoakes
849a8c848b Prevent non-fatal errors from closing the supervisor.
This patch fixes a couple of cases where `log.Fatalf` would cause the supervisor
to exit immediately when it's inappropriate to do so. `log.Fatalf` and
co. should not be used unless the supervisor utterly cannot run without
whatever's being checked being in place.

This patch also adjusts the code that relied on the module's values being
created here being available, they now check and send an appropriate error
message if they're not there.
2015-10-15 18:14:42 +01:00
Praneeth Bodduluri
96d4aebb76 Refactor api.go to use abstracted sendResponse and sendError - Also fix most go doc complaints 2015-10-13 13:45:08 -03:00
Praneeth Bodduluri
1890c0bc0d Refactor api.go and systemd.go based on PR comments 2015-10-13 13:45:08 -03:00
Praneeth Bodduluri
50a804683d Use Promises for requests+ Add better console logs 2015-10-13 13:45:08 -03:00
Praneeth Bodduluri
b91cb78eea Allow control of VPN + TCP check + Pub nub logs with Device Environment variables 2015-10-13 13:45:07 -03:00
Praneeth Bodduluri
cd9daa8a8b Add GO api for openvpn control 2015-10-13 13:45:07 -03:00
Praneeth Bodduluri
1848a819da Fix Typo in ipAddresses 2015-10-13 13:45:05 -03:00
Praneeth Bodduluri
391a141843 Change ipAddress to IPAddresses and add error message on unknown ip addr type 2015-10-13 13:45:05 -03:00
Praneeth Bodduluri
bc0afb0032 Catch all kind docker interfaces 2015-10-13 13:45:05 -03:00
Praneeth Bodduluri
ea0b058721 Change APIResponse to a struct with a Data Interface 2015-10-13 13:45:05 -03:00
Praneeth Bodduluri
feb4d74d28 Use regex to finely detect docker and rce interfaces and address style fixes 2015-10-13 13:45:05 -03:00
Praneeth Bodduluri
f86f5881d9 Implement and use golang endpoint for getting ipaddress' of the device 2015-10-13 13:45:05 -03:00
Pablo Carranza Vélez
94d8703eef Sleep before shutting down 2015-10-13 13:45:05 -03:00
Pablo Carranza Vélez
8585ad718f Use go-systemd/login1 for Reboot/Shutdown 2015-10-13 13:45:04 -03:00
Pablo Carranza Vélez
6f42fc2036 Try to do systemd calls in gosuper 2015-10-13 13:45:04 -03:00
Pablo Carranza Vélez
82f87527c8 Add godbus package 2015-10-13 13:45:04 -03:00
Praneeth Bodduluri
27a8ee2b19 Use golang 1.5.1 for compiling 2015-10-13 13:45:04 -03:00
Pablo Carranza Vélez
4aea117330 Purge handles strings and numbers, and is tested with a table 2015-10-13 13:45:03 -03:00
Pablo Carranza Vélez
c2496d30c2 Use Promise Disposer for lock, + cleanup 2015-10-13 13:43:36 -03:00
Pablo Carranza Vélez
685af77007 Reorganize files, and purge sends 404 when there's no directory.
* 404 when no directory
* fix go-supervisor.conf location
* Use /var/run/resin for gosuper socket
* Remove potential spurious gosuper binaries
2015-10-13 13:43:36 -03:00