Commit Graph

37 Commits

Author SHA1 Message Date
Cameron Diver
1b1e0ce2f3 Dont check config.gz for loaded i6tables module
We also dont fail the initialisation if we cannot load the module.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-17 17:48:59 +01:00
Cameron Diver
4e779608a3 Add debug build infrastructure and configuration
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-15 12:41:27 +01:00
Heds Simons
24ba07571c
avahi: Remove default service definitions
Removes default 'example' service definitions that
are included by Avahi 0.7+. These conflict with
our balenaOS advertised services, causing potential
issues.

Connects-to: #957
Change-type: patch
Signed-off-by: Heds Simons <heds@balena.io>
2019-04-05 13:33:45 +01:00
Pablo Carranza Velez
de05165316 Only modprobe ip6_tables if it's necessary
If the kernel was built with support for ip6tables, there's no need to load the module. This is the case when running
balenaOS in a container in Mac OS, which also can't do modprobes easily.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2019-03-28 11:12:10 -07:00
Cameron Diver
fae2548f27
Don't mount /lib/modules if it is already mounted
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-14 13:49:03 +00:00
Cameron Diver
93c24298ff
Symlink kernel modules and modprobe ip6_tables
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-13 20:57:05 +00:00
Cameron Diver
ec87d26be1
fix: Clear dbus pid file on startup
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-01-29 14:19:44 +00:00
Cameron Diver
15187a54c0
Remove node garbage collection flags
The introduction of these flags correlates with OOM issues on the
supervisor. More investigation is needed into these features
before adding them back into production.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-11-06 09:46:51 +00:00
Pablo Carranza Velez
67486146c4 entry.sh: Use symbolic link to link to legacy lock path
The lack of `-s` was a typo.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-10-23 15:43:59 -07:00
Pablo Carranza Velez
8003f25c3d Add /tmp/balena lock and handover paths and BALENA_ env vars
We change the lockfile to /tmp/balena/updates.lock, and the resin-kill-me file to /tmp/balena/handover-complete.
In the host, we change to use /tmp/balena-supervisor instead of /tmp/resin-supervisor.

We add BALENA_ env vars in addition to the RESIN_ env vars.

We keep backwards compatibility by using both paths for the lockfile and handover, and keeping the RESIN_ env vars.

Changelog-entry: Move the handover and lock files to /tmp/balena, rename them, and add BALENA_ env vars
Change-type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-10-16 15:12:04 +02:00
Mathew Heard
23013709b5
memory: Reduce memory usage by applying node command line flags
Change-type: patch
Closes: #690
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-09-04 12:52:22 -07:00
Heds Simons
f716624f89
network: Add MDNS support for .local domains
This requires the initialisation of both DBus and
Avahi in the `entry.sh` script to allow resolution
via libc.

Due to issues with Avahi's `init.d` script, the previous
PIDfile is explicitly removed.

Connects-to: #712
Change-type: minor
Signed-off-by: Heds Simons <heds@resin.io>
2018-08-23 18:41:55 +01:00
Heds Simons
d2442d107a Add ability to use self-signed CAs passed via config.json.
Connects-to: #601
Change-type: minor
2018-04-10 10:53:48 +01:00
Pablo Carranza Velez
348ff66cee
Replace the gosuper component with a node module that handles communication with systemd, and stop using an init system in the supervisor container
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-22 15:55:15 +00:00
Pablo Carranza Velez
4ca311edbd Ensure /var/run/resin exists before trying to mount it as tmpfs
Fixes issues on systems where mount files if the target doesn't exist (seems to happen on
boards that run docker on overlayfs).

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-08-18 13:45:42 -07:00
Pablo Carranza Velez
27690e0c30 Issue #20: Change the update lock to a temporary filesystem
The lock is now located at `/tmp/resin-supervisor/<appId>/` on the host, and `/tmp/resin/`
on the user container. The old lock location is supported only in Resin OS 1.X (and both locks are
taken in that case).

This fixes the race condition when the app is started before the supervisor, and takes a lock that is
cleared on supervisor startup.

Change-Type: major
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-03-10 01:19:35 +02:00
Petros Angelatos
eee400f39f integrate with busybox init system
busybox's init uses /etc/inittab for configuration just like sysvinit,
however it doesn't use any runlevels.

the tty part of inittab is appended to "/dev/", and it becomes connected
to the stdout of the spawned process

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-09-14 01:38:35 +00:00
Pagan Gazzard
07fdc55546 Fix entry.sh when DOCKER_ROOT isn't set 2016-06-23 11:37:59 -07:00
Petros Angelatos
af32a48db4 symlink docker root to default path if not already there
docker-delta uses the docker API to query the docker root location.
However, docker returns the path in the host, not the path that it
happens to be bind mounted in the supervisor container. So in order for
the deltas to work properly, these paths must be the same.

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-06-09 05:50:51 +00:00
Kostas Lekkas
6193ebe1df Log useful supervisor info to stdout/stderr 2016-05-30 16:51:27 +03:00
Pagan Gazzard
f910ec11a8 Remove even more old terminal related stuff. 2016-04-18 18:13:23 +01:00
Praneeth Bodduluri
1bc53ebc8d Add protection for connman and openvpn every 5 minutes 2016-01-08 18:30:14 +05:30
Praneeth Bodduluri
396fe7d619 Initialize DOCKER_SOCKET in entry.sh 2016-01-08 18:30:14 +05:30
Pablo Carranza Vélez
8585ad718f Use go-systemd/login1 for Reboot/Shutdown 2015-10-13 13:45:04 -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
Pablo Carranza Vélez
53668647c8 Integration test is now working.
* More work on the integration test
* Correctly get supervisor IP
* Use Fatal for test errors
* test-integration working separate from run-supervisor
* Use jenkins' JOB_NAME to identify and remove containers with their volumes
* Document testing procedure
* Document the assume-unchanged tip
* Use /mnt/root for data path
* Nicer secret assignment
2015-10-13 13:43:36 -03:00
Pablo Carranza Vélez
513cc24d1c Purge restarts app, and first attempt at integration testing
* Restart app when purging
* Use log.Fatal to exit with status 1
* Quotes in entry.sh
* Use JSON for request body
* Handle errors for parseJsonBody
* Better error printing in main
* First attempt at testing nodesuper from Go
* Cleaner build
* Use ARCH to differentiate concurrent tests/builds
* Use --rm to autoremove containers
2015-10-13 13:43:36 -03:00
Pablo Carranza Vélez
dd53bbd1db Call the gosuper from node via unix socket + http. 2015-10-13 13:43:36 -03:00
Pablo Carranza Vélez
30ce6f77c4 Gosuper Integration into supervisor image and Jenkins 2015-10-13 13:43:36 -03:00
Pablo Carranza Vélez
e3264effe3 Mount tmpfs for supervisor sockets 2015-10-13 13:43:36 -03:00
Praneeth Bodduluri
d300ec6baf User Supervisord for logging 2015-10-13 13:28:00 -03:00
Praneeth Bodduluri
497ecc90a8 Log Supervisor to file and mount the /var/log from host to the supervisor 2015-10-13 13:28:00 -03:00
Pagan Gazzard
fb18d1f3d9 Bash doesn't use set to set variables.. 2015-10-13 13:19:44 -03:00
Pagan Gazzard
0630d8051b Only try to copy the enter.sh if there is a /data directory. 2015-10-13 13:10:12 -03:00
Praneeth Bodduluri
7aa66b5cb6 x86 support + Change localImage variable to SUPERVISOR_IMAGE 2015-10-13 13:09:58 -03:00
Petros Angelatos
9325b258ae Combine scripts 2015-10-13 13:03:16 -03:00
Petros Angelatos
31e8e7c0c6 Use buildstep to build the supervisor just like a normal resin app 2015-10-13 13:02:49 -03:00