Commit Graph

315 Commits

Author SHA1 Message Date
Reynir Björnsson 8e2b7cce46 Acquire create_lock in self_destruct
We need to acquire the lock for updating the state.
2020-12-01 12:25:12 +01:00
Reynir Björnsson 472e42717e Implement killall waiting 2020-11-30 15:26:29 +01:00
Reynir Björnsson 91ba8be8ab
Merge pull request #47 from reynir/query-manifest
Verify devices with manifest
2020-11-30 12:15:39 +01:00
Reynir Björnsson 353284bd49 Reword bridge detection error message 2020-11-30 11:54:42 +01:00
Reynir Björnsson b4a4a28634 Use ip link show to detect bridge
ip tuntap show lists all tuntap devices and ignores the rest of the
arguments, annoyingly. It will always return with exit code 0.

We do not detect if the interface is a bridge.
2020-11-30 11:37:34 +01:00
Hannes Mehnert bc71e26756 check that bridges with the provided names exist before creating tap devices 2020-11-27 22:40:15 +01:00
Hannes Mehnert 466e2d52b8 check manifest with provided device arguments 2020-11-27 22:24:52 +01:00
Reynir Björnsson 5cad5b00ea Verify devices with manifest 2020-11-26 15:28:57 +01:00
Hannes Mehnert c91ce00030 This repository moved to roburio organization
Adapt CI: use GitHub actions instead of travis for Linux testing, only a single
cirrus runner
2020-11-26 13:16:15 +01:00
Reynir Björnsson 33f7b6bcee
Systemd socket activation (#43)
* Use systemd socket activation
* Pass a new command line argument --systemd-socket-activation to the daemons if running on Linux
* Install .socket files
* Systemd services depend on their sockets
* Implement sd_listen_fds in OCaml
* Set FD_CLOEXEC in sd_listen_fds
* README: add comment about socket paths
* Linux systemd scripts: Rename albatross_stat -> albatross_stats
2020-11-26 12:06:28 +01:00
Hannes Mehnert 930775b256
Merge pull request #46 from reynir/pp-time
Fix pretty printing of time
2020-11-26 12:02:56 +01:00
Reynir Björnsson 3de997a7c1
Linux /proc/ stats (#45)
resource usage statistics on linux

- Parse /proc/<pid>/stat{,m}
- Divide {s,u}time by _SC_CLK_TCK
- Compute runtime from {s,u}time

Co-authored-by: Hannes Mehnert <hannes@mehnert.org>
2020-11-26 12:02:21 +01:00
Reynir Björnsson f7e7c63c6f Fix pretty printing of time 2020-11-25 20:04:06 +01:00
Hannes Mehnert 7dc2e33ef0 depend on conf-pkg-config for build (now that dune-configurator uses this for stats on linux 2020-11-25 14:42:57 +01:00
Reynir Björnsson f597921b44
Linux network stats (#44)
* Add libnl-3 and libnl-route-3 dependency if Linux (libnl-3-dev on ubuntu)
* Add libnl-3 flags, refactor stats/dune

Use dune-configurtator to get C flags. In the dune-configurator script,
we detect whether we're running on Linux or FreeBSD.
2020-11-25 14:39:10 +01:00
Hannes Mehnert 96b2f39798 travis & cirrus: refresh CI setting (include 4.11) 2020-11-14 22:29:04 +01:00
Reynir Björnsson f954955dd0
Ergonomics (#41)
The info subcommands for {unikernel,block,policy} never error

Before, running the commands block, info or policy when no block
devices, unikernels or policies respectively were set up the command
would report an error and give the user a dangerous-looking WARNING
saying the command failed:

    $ albatross-client-local block
    albatross-client-local: [WARNING] host [vm: ]: command failed block: not found

Now instead the commands will report success with a message stating
there are no objects.

Co-authored-by: Hannes Mehnert <hannes@mehnert.org>
2020-11-14 22:27:55 +01:00
Hannes Mehnert 1986ca2a1d travis: use ubuntu-lts 2020-11-14 21:43:48 +01:00
Hannes Mehnert 7030b1a3fa
Merge pull request #40 from reynir/linux-packaging
Update Linux packaging
2020-11-10 15:46:28 +01:00
Reynir Björnsson 910c842448 Update Linux packaging
* Update README: Names of binaries have changed, CLI interface as well,
  add instructions for installing tenders...
* Install an empty log
* Add assertion in albatross_log.service that the log file exists
2020-11-10 11:02:17 +01:00
Hannes Mehnert 3f36fe6382
Merge pull request #38 from hannesm/old-logs
albatross_log: skip unknown entries
2020-07-29 15:55:57 +02:00
Hannes Mehnert a5265c9a44 albatross_log: skip unknown entries 2020-07-29 15:22:05 +02:00
Hannes Mehnert 1b1164166b
Merge pull request #36 from hannesm/more
enhancements in tooling
2020-07-29 14:14:53 +02:00
Hannes Mehnert f7881e24e5 FreeBSD packaging: add albatross_client_inspect_dump to package 2020-07-29 12:26:46 +02:00
Hannes Mehnert c7ee9dd908 vmm_asn: document versioning 2020-07-14 18:32:25 +02:00
Hannes Mehnert da8b71cd2e bash is needed now (for parsexp 0.14) 2020-07-05 21:28:59 +02:00
Hannes Mehnert c7b468fe09 new command: get which downloads a unikernel and dumps it into a file 2020-07-05 21:27:44 +02:00
Hannes Mehnert 5adc2f0a8a vmm_asn: instead of potentially losing information, be honest and fail if requested to encode older versions of unikernel configuration 2020-07-05 20:53:57 +02:00
Hannes Mehnert 125711ac6d further rng cleanups (remove deps from dune); albatross-client-inspect-dump which reads a state file (for cautious upgrades) 2020-07-05 20:39:29 +02:00
Hannes Mehnert d93a683d94 tls: no need to initialize rng (tls.lwt does this for us) 2020-06-23 20:03:59 +02:00
Hannes Mehnert c98ac0494d retry-connections now defaults to 0
this makes it much easier to reason about the initialization.

for production, init scripts should enforce the dependency order
for testing, provide your own if desired

//cc MagnusS

also move enable_stats and retry_connections up (before exit codes)
2020-06-16 11:45:47 +02:00
Hannes Mehnert 21406965e7 require OCaml 4.08.0 since mirage-crypto depends on 4.08 2020-06-15 18:17:12 +02:00
Hannes Mehnert b07f09ba12 remove superfluous and outdated .ocamlinit 2020-06-15 16:48:59 +02:00
Hannes Mehnert a4c4331b71 TLS applications: initialize RNG 2020-06-15 16:33:11 +02:00
Hannes Mehnert ceafacbd2a require tls 1.3, avoid renegotiation (client certificate is now already encrypted) 2020-05-19 21:07:39 +02:00
Hannes Mehnert ccf3cae68c albatrossd: style cleanups 2020-05-19 21:00:37 +02:00
Magnus Skjegstad 50958a32f5
Albatrossd: --enable-stats and --retry-connections (#33)
* Make albatrossd wait for other sockets to appear if --retry-connections is specified
* Connect to log/console before creating main socket
* Disable stats by default unless --enable stats is specified
2020-05-19 20:51:32 +02:00
Hannes Mehnert 604f3ec52e Bos.OS.Cmd.run_out needs to check the exit status (using Bos.OS.Cmd.success) 2020-05-11 13:26:35 +02:00
Hannes Mehnert ab76e1ef89 metrics got released, no longer pin-depend 2020-05-09 22:47:54 +02:00
Hannes Mehnert 0920ae142e on cirrus, watermark (dune subst) and build with release profile before packaging and uploading 2020-05-02 22:08:59 +02:00
Hannes Mehnert 7cad9bd08d on linux, be a bit smarter which network device name to use 2020-04-25 19:59:19 +02:00
Hannes Mehnert 0c5af23848 vmmd: unikernel_info no longer transfers the unikernel image
regression introduced in dfd22be62b
(which prepared dumping to a file, and restart-on-failure)
this is not desired from a bandwidth point of view, if it is
considered to be a useful feature, there should be a separate
command for it
2020-04-25 17:12:41 +02:00
Hannes Mehnert 1fbec307ab update FreeBSD in cirrus to 12.1 2020-04-25 16:42:39 +02:00
Hannes Mehnert 0932d06c41 client: provide exit code depending on failure
fixes #31, piggy-backs on the 'a in type 'a result = [ `Ok of 'a | ... ]
the code uses Ok Albatross_cli.Remote_command_failed to signal "exit 123"
2020-04-25 16:28:48 +02:00
Hannes Mehnert 9bc4d478d5 albatross_cli: fix docstring of dbdir location on linux 2020-04-21 11:19:12 +02:00
Hannes Mehnert c0f093d39c add ISC license (fixes #13, re-requested by Poulpe on discord) 2020-04-21 11:10:46 +02:00
Hannes Mehnert 4c9faf4262 adapt to x509 0.11.0 API changes 2020-04-21 11:10:39 +02:00
Hannes Mehnert b7747a2547 linux tap device discovery: redirect stderr of run to /dev/null 2020-04-21 11:07:57 +02:00
Hannes Mehnert 03c9948526 avoid brctl on Linux, use ip instead 2020-04-09 17:02:17 +02:00
Hannes Mehnert be83686a22 Vmm_unix: fix ip tuntap command (provide tap name earlier), also set link up 2020-04-03 17:44:21 +02:00