Skip to content
This repository has been archived by the owner on Nov 28, 2017. It is now read-only.

Commit

Permalink
Merge pull request #22 from MagnusS/master
Browse files Browse the repository at this point in the history
Prepare release + cleanup
  • Loading branch information
MagnusS committed Aug 17, 2015
2 parents b600366 + bbadee0 commit 95ad5da
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 18 deletions.
47 changes: 37 additions & 10 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions src/jitsu.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ->
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 95ad5da

Please sign in to comment.