From 8287aa9fdd583fccb66604cc71a840e46e3f818b Mon Sep 17 00:00:00 2001 From: Magnus Skjegstad Date: Mon, 17 Aug 2015 16:40:05 +0100 Subject: [PATCH 1/3] try_lwt --- src/main.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ml b/src/main.ml index 5fb6e17..872d821 100644 --- a/src/main.ml +++ b/src/main.ml @@ -149,7 +149,7 @@ let or_warn msg f = | e -> (log (Printf.sprintf "Warning: Unhandled exception: %s" (Printexc.to_string e))); () let or_warn_lwt msg f = - try f () with + try_lwt f () with | Failure m -> (log (Printf.sprintf "Warning: %s\nReceived exception: %s" msg m)); Lwt.return_unit | e -> (log (Printf.sprintf "Warning: Unhandled exception: %s" (Printexc.to_string e))); Lwt.return_unit From 900bdfd795c6c71beccba6990677ad8e8cc97a75 Mon Sep 17 00:00:00 2001 From: Magnus Skjegstad Date: Mon, 17 Aug 2015 16:40:30 +0100 Subject: [PATCH 2/3] indent --- src/jitsu.ml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/jitsu.ml b/src/jitsu.ml index f9212ec..d2c3379 100644 --- a/src/jitsu.ml +++ b/src/jitsu.ml @@ -179,8 +179,8 @@ module Make (Vm_backend : Backends.VM_BACKEND) = struct let output_stats t ?vm_uuids:(vm_uuids=None) () = (match vm_uuids with - | None -> Irmin_backend.get_vm_list t.storage - | Some l -> Lwt.return l) >>= fun vm_uuids -> + | None -> Irmin_backend.get_vm_list t.storage + | Some l -> Lwt.return l) >>= fun vm_uuids -> let current_time = Unix.time () in let ip_option_to_string ip_option = match ip_option with @@ -202,9 +202,9 @@ module Make (Vm_backend : Backends.VM_BACKEND) = struct Irmin_backend.get_response_delay t.storage ~vm_uuid >>= fun response_delay -> Irmin_backend.get_wait_for_key t.storage ~vm_uuid >>= fun wait_for_key -> let response_delay_str = - match wait_for_key with - | None -> (string_of_float response_delay) - | Some _ -> (Printf.sprintf "wait+%s" (string_of_float response_delay)) + match wait_for_key with + | None -> (string_of_float response_delay) + | Some _ -> (Printf.sprintf "wait+%s" (string_of_float response_delay)) in Irmin_backend.get_start_timestamp t.storage ~vm_uuid >>= fun start_ts -> Irmin_backend.get_total_starts t.storage ~vm_uuid >>= fun total_starts -> @@ -327,7 +327,7 @@ module Make (Vm_backend : Backends.VM_BACKEND) = struct | None -> Lwt.return_none (* no ip, no result to return *) | Some ip -> start_vm t vm_uuid >>= fun () -> - Lwt.async ( fun () -> output_stats t ~vm_uuids:(Some [vm_uuid]) ()); + Lwt.async ( fun () -> output_stats t ~vm_uuids:(Some [vm_uuid]) ()); Lwt.return (Some ip) ) matching_vm_uuids >>= fun list_of_ips -> if (List.length list_of_ips) = 0 then begin From bbadee04f96c5e73f5708ee1a632681d56df8303 Mon Sep 17 00:00:00 2001 From: Magnus Skjegstad Date: Mon, 17 Aug 2015 16:40:58 +0100 Subject: [PATCH 3/3] Update CHANGES, README --- CHANGES.md | 47 +++++++++++++++++++++++++++++++++++++---------- README.md | 16 +++++++++++++++- 2 files changed, 52 insertions(+), 11 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 2b8b7c5..0cd9adc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,16 +1,43 @@ 0.2 -- Add --synjitsu command line parameter -- Support for optionally updating synjitsu with the MAC address of newly booted unikernels over vchan -- `Jitsu.create` now has two optional arguments: vm_count and use_synjitsu +General +- Add support for rumprun unikernels in libxl backend (rumprun_config option) +- New configuration syntax with key/value pairs +- VMs are now destroyed by default (was suspend, can be changed with -m) +- Support for waiting for a key in Xenstore before sending DNS reply (wait_for_key option) +- Support for setting fixed response delay per domain (response_delay option, overrides -d) +- Support more than one DNS name per VM + +Storage +- All storage functionality moved to separate storage module +- Irmin in-memory storage backend to store internal state +- Add --persistdb parameter to persist Irmin db to disk + +Synjitsu +- Add --synjitsu parameter to connect to Synjitsu +- Support for optionally updating synjitsu with the MAC address of newly booted unikernels +- Support for enabling/disabling synjitsu per domain (use_synjitsu option) + +VM backends: +- All VM management moved to backend modules that implement backends.mli +- Libvirt support now in separate module +- Add experimental XAPI backend support (from Masoud Koleini @koleini) +- Add experimental libxl backend support (from Dave Scott @djs55) +- Add disk support in libxl backend +- Add support for multiple network interfaces and configuration scripts in libxl backend + +Tests: +- Test framework based on alcotest added, but needs more tests +- Implemented tests for options.ml + +Bugfixes: +- Destroyed domains can now be restarted (fixes #8) + +Packaging: +- Removed version number from opam file in dev repo - libvirt-dev, libvirt-bin added as depext in Debian and Ubuntu - conduit, vchan, xen-api-client added as opam dependencies -- Removed version number from opam file in dev repo -- Destroyed domains can now be restarted (fixes #8) -- Update to ocaml-dns 0.15.0 -- Support more than one DNS name per VM -- Add irmin storage backend support -- Add *experimental* XAPI backend support (from Masoud Koleini) -- General cleanup +- Update to ocaml-dns 0.15.3 +- Enable Travis on Github repository 0.1 - First public release diff --git a/README.md b/README.md index 91909af..d68cd8e 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ If virsh is unable to connect to Virtualbox, you may have to adjust the connecti You should now be able to start Jitsu. Use '-m suspend' to set it to suspend the VM on inactivity. Example output: ``` -$ sudo ./jitsu www.example.com,127.0.0.1,Ubuntu -m suspend -c vbox:///session +$ sudo ./jitsu dns=www.example.com,ip=127.0.0.1,name=Ubuntu -m suspend -c vbox:///session Connecting to vbox:///session... Adding domain 'www.example.com' for VM 'Ubuntu' with ip 127.0.0.1 Adding SOA 'example.com' with ttl=60 @@ -275,6 +275,20 @@ After 2 minutes without DNS requests, Jitsu will suspend the domain automaticall supported. Xapi and libxl are less tested and should be considered experimental. +COMMON CONFIGURATION + response_delay + Override default DNS query response delay for this unikernel. See + also -d. + + wait_for_key + Wait for this key to appear in Xenstore before responding to the + DNS query. Sleeps for [response_delay] after the key appears. The + key should be relative to /local/domain/[domid]/. + + use_synjitsu + Enable Synjitsu for this domain if not 0 or absent (requires + Synjitsu support enabled) + LIBVIRT CONFIGURATION name Name of VM defined in libvirt (ignored if uuid is set)