Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .travis-ci.sh

This file was deleted.

6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
language: c
script: bash -ex .travis-ci.sh
install: wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/master/.travis-opam.sh
script: bash -ex .travis-opam.sh
sudo: true
env:
- OCAML_VERSION=4.01.0 OPAM_VERSION=1.1.0
- OCAML_VERSION=4.01 PACKAGE=xapi-storage-script FORK_USER=djs55 EXTRA_REMOTE=git://github.com/xapi-project/opam-repo-dev
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
0.2.0 (4-Apr-2015)
- Update to SMAPIv2 with o_direct, o_direct_reason
- Update to using json marshalling for exception backtraces
- Use modern travis configuration
- Add opam file for development

0.1.2 (19-Oct-2014)
- Treat VDI.epoch_{begin,end} as no-ops
- Write the pidfile when daemonizing
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.2.0
20 changes: 7 additions & 13 deletions main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,10 @@ let backend_error name args =
Exception.rpc_of_exnty exnty

let backend_backtrace_error name args error =
match List.zip error.files error.lines with
| None -> backend_error "SCRIPT_FAILED" [ "malformed backtrace in error output" ]
| Some pairs ->
let backtrace =
pairs
|> List.map ~f:(fun (filename, line) -> { B.Interop.filename; line })
|> B.Interop.to_backtrace
|> B.sexp_of_t
|> Sexplib.Sexp.to_string in
let open Storage_interface in
let exnty = Exception.Backend_error_with_backtrace(name, backtrace :: args) in
Exception.rpc_of_exnty exnty
let error = rpc_of_error error |> Jsonrpc.to_string in
let open Storage_interface in
let exnty = Exception.Backend_error_with_backtrace(name, error :: args) in
Exception.rpc_of_exnty exnty

let missing_uri () =
backend_error "MISSING_URI" [ "Please include a URI in the device-config" ]
Expand Down Expand Up @@ -361,7 +353,9 @@ let process root_dir name x =
| Storage.D.Types.Tapdisk3 p -> "vbd3", p in
let attach_info = {
params;
xenstore_data = [ "backend-kind", backend ]
xenstore_data = [ "backend-kind", backend ];
o_direct = true;
o_direct_reason = "";
} in
Deferred.Result.return (R.success (Args.VDI.Attach.rpc_of_response attach_info))
| { R.name = "VDI.activate"; R.params = [ args ] } ->
Expand Down
17 changes: 17 additions & 0 deletions opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
opam-version: "1"
maintainer: "dave.scott@citrix.com"
build: [
[make]
[make "install" "BINDIR=%{bin}%" "MANDIR=%{man}%"]
]
remove: [
[make "uninstall" "BINDIR=%{bin}%" "MANDIR=%{man}%"]
]
depends: [
"xapi-idl" {>= "0.10.0" }
"xapi-storage"
"async" {= "111.25.00" }
"async_inotify" {= "111.28.00" }
"core"
"message-switch"
]