Commit Graph

61 Commits

Author SHA1 Message Date
Hannes Mehnert 65693ea188 revise the "--net=yyy" argument to (optionally) contain a service:bridge
it used to only contain service, and used the same string for the bridge. This
is not flexible enough to run off-the-shelf unikernels (configured for bridge
"service" and "management" on multi-homed servers). The old behaviour is the
new default (i.e. "--net=service" creates and attaches a tap device to bridge
"service", and passes "--net:service=tapYY" to the solo5 tender). But it is more
flexible now: "--net=service:other-bridge" will create a tap device attached to
"other-bridge" and pass "--net:service=tapYY" to the tender. This way, there's
no need to match bridge names on the actual server with network device names of
the unikernels.

NB: this is (mostly) backwards-compatible: the on-disk data structures are
versioned (and the version is bumped with this PR), an old albatross client can
send "create" commands to a new server. But a new client will get a parse error
from an old server - which is fine taking into consideration the deployment
base.
2020-03-25 16:09:23 +01:00
Hannes Mehnert 6206e8681a make dbdir and tmpdir platform-specific and overwritable by all command line utilities 2019-11-27 11:27:55 +01:00
Hannes Mehnert 057dbbf147 revise naming freedom: multiple labels are allowed in certificate common names
influx may drop topmost label (if --drop-label provided)
2019-11-09 20:36:32 +01:00
Hannes Mehnert 1d33c17b53 use a variant for uname result, not strings 2019-10-27 19:43:54 +01:00
Hannes Mehnert 5b187999f1 restart: range 60..64 no restart, document all the exits 2019-10-14 11:05:22 +02:00
Hannes Mehnert a579a8e143 root name is "." instead of "" 2019-10-13 13:40:17 +02:00
Hannes Mehnert 866cd9041a move conn_metrics to Vmm_core 2019-10-12 02:15:44 +02:00
Hannes Mehnert c9820f3106 deterministic mac addresses! 2019-10-12 02:06:45 +02:00
Hannes Mehnert 0808c20583 restart on failure: add optional integer set which exit codes to restart on 2019-10-12 02:06:45 +02:00
Hannes Mehnert 6be9ebbc8b revise tag and compression in unikernel config 2019-10-12 02:06:45 +02:00
Hannes Mehnert 58c3490782 restart on failure 2019-10-12 02:06:45 +02:00
Hannes Mehnert f81a12bc4d initial metrics 2019-10-12 02:06:38 +02:00
Hannes Mehnert 94912c21e4 changes for solo5 0.6
-- this is a breaking change in the wire protocol
2019-10-12 02:06:27 +02:00
Hannes Mehnert 4ce52daea8 gather more statistics from kinfo_user (sys/user.h) on FreeBSD
- real time runtime information (in microsecs) ki_runtime
- start timeval ki_start
- count of copy-on-write fauls ki_cow
2019-10-12 02:04:44 +02:00
Hannes Mehnert 4b4d1208db vmmd_stats: remove ifname, use bridge (overwrite bridge in gather) 2019-01-27 22:31:04 +01:00
Hannes Mehnert d30e118c76 Vmm_core.Name: use 'vm:' instead of 'name' as literal string to print 2019-01-20 20:31:40 +01:00
Hannes Mehnert 7b8f8fafbd close fd early, no need to carry file descriptors around 2019-01-20 17:43:44 +01:00
Hannes Mehnert 58bd77bc5f stats: pass bridge device through, vmm device name as well to allow arbitrary bhyve statistics, vmmc_local: add stats_add and stats_remove subcommands 2019-01-15 00:25:59 +01:00
Hannes Mehnert fd4a5a5e22 inspect kinfo_proc structure for information about:
- virtual size
- resident size (in pages)
- text size (in pages)
- data size (in pages)
- stack size (in pages)

develop independent vmmc_stat for testing (not installed)
2019-01-06 01:12:56 +01:00
Hannes Mehnert e28ea84548 Log: new event `Hup 2018-12-06 22:53:15 +01:00
Hannes Mehnert c8f1030403 rename Vm to Unikernel 2018-11-13 01:02:05 +01:00
Hannes Mehnert 85372b0c7e rework resources: now block, vms, and policies are in separate tries 2018-11-13 00:06:43 +01:00
Hannes Mehnert b5c9cdea6a cleanups 2018-11-12 22:19:39 +01:00
Hannes Mehnert 8ccda0e410 refactor bridge: use a string instead of a complicated thing 2018-11-12 22:07:45 +01:00
Hannes Mehnert 2e7f2730a2 move Vm to submodule 2018-11-11 03:24:50 +01:00
Hannes Mehnert 561ba5c5df put Policy in a submodule 2018-11-11 03:09:37 +01:00
Hannes Mehnert 89a1d30154 cleanups in respect to directories and scope 2018-11-11 02:33:00 +01:00
Hannes Mehnert 43379d6d9d rename Vmm_core.id to Vmm_core.Name.t and make it private - also check constructors to fit into 20 chars ldh (and in Vmm_tls max depth = 10) 2018-11-11 01:44:31 +01:00
Hannes Mehnert 6dcde8eb68 block device support 2018-11-11 00:01:56 +01:00
Hannes Mehnert 6945d21422 Vmm_core.drop_super / is_sub_id: fix function (used to assume reverse ordered labels) 2018-11-09 01:27:22 +01:00
Hannes Mehnert 7b8f2cf802 add policy does nothing when received policy is equal to stored one 2018-10-28 19:41:06 +01:00
Hannes Mehnert 5e921d7345 skip empty common names in vmm_tls 2018-10-28 19:04:24 +01:00
Hannes Mehnert 01f933702d move stuff around 2018-10-26 21:30:54 +02:00
Hannes Mehnert 04367421bf since argument for log_subscribe and console_subscribe 2018-10-26 21:29:59 +02:00
Hannes Mehnert d513269453 move stuff into vmm_commands 2018-10-26 21:29:59 +02:00
Hannes Mehnert ce0c42fa77 more cleanups 2018-10-26 21:29:59 +02:00
Hannes Mehnert 46548418cd minor cleanup: stats type 2018-10-26 21:29:59 +02:00
Hannes Mehnert f3c67f626a more cleanups 2018-10-26 21:29:59 +02:00
Hannes Mehnert f5ce2d8826 reuse commands from Vmm_asn.wire_commands for certificates 2018-10-26 21:29:59 +02:00
Hannes Mehnert d6c87bacde minor tweaks 2018-10-26 21:29:59 +02:00
Hannes Mehnert c399501a18 get rid of vm_config.vname 2018-10-26 21:29:59 +02:00
Hannes Mehnert 1d4d7509dc remove vmm_wire, use asn.1 2018-10-26 21:29:59 +02:00
Hannes Mehnert bcb280aa00 refactor commands into vmm_commands 2018-10-26 21:29:59 +02:00
Hannes Mehnert 182e2ae10c policies:
vmmc now has more subcommands
  - policy [-n name] returns all policies in name and below
  - add_policy [-n name] [--cpu cpuid] [--mem mem] [--bridge bridge] [--block size] adds a policy
  - remove [-n name] removes policy at name

policy is just the same which is in vmm_req_delegation, and vmm_resources now check them:
- you cannot insert a subpolicy violating the prefix
- you cannot insert a policy which would forbid current resource usage
- you cannot insert a policy with which any subpolicy would be invalid
- you can adjust (increase/decrease) a policy if the above invariants are kept

implement "force create" directly in vmmd: much nicer to
 - check resource constraints,
 - kill vm potentially,
 - and create a new vm,
all as single transaction.
2018-10-26 21:29:59 +02:00
Hannes Mehnert ea83013068 delegation -> policy 2018-10-26 21:29:59 +02:00
Hannes Mehnert e413b8c99a remove naming struggle in vm_config and Log.hdr 2018-10-26 21:29:59 +02:00
Stefan Grundmann 133884faf4 log, stats and console socket go in their own directory 2018-10-07 00:32:25 +00:00
Hannes Mehnert 38094a53e3 use vmm_trie in log and stat, cleanups 2018-09-28 22:44:38 +02:00
Hannes Mehnert 02f8d94db8 s/ukvm/hvt/ 2018-09-21 22:31:04 +02:00
Hannes Mehnert e7b4742964 less is more, also unify default socket paths
and vmmc console command
2018-09-19 21:53:18 +02:00