Skip to content

Commit

Permalink
Merge branch 'master' into storage-api-py3
Browse files Browse the repository at this point in the history
Signed-off-by: Pau Ruiz Safont <[email protected]>
  • Loading branch information
psafont committed Jan 24, 2024
2 parents d24cb9b + e7e5b94 commit ec6b808
Show file tree
Hide file tree
Showing 134 changed files with 2,393 additions and 68 deletions.
35 changes: 34 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,41 @@ lint:
pylint --disable=line-too-long,too-few-public-methods,unused-argument,no-self-use,invalid-name,broad-except,protected-access,redefined-builtin,too-many-lines,wildcard-import,too-many-branches,too-many-arguments,unused-wildcard-import,raising-format-tuple,too-many-statements,duplicate-code _build/default/xapi-storage/python/xapi/storage/api/v5/*.py
pycodestyle --ignore=E501 _build/default/xapi-storage/python/xapi/storage/api/v5/*.py


# ulimit -S -t <N>
# Set a soft CPU time quota which will kill processes with SIGXCPU
# This will in preference kill children of dune that consume CPU time (e.g. a stuck test),
# and not dune itself (which should consume little CPU time when it just waits for subprocesses)
# However it won't kill idle processes (e.g. a test sleeping and waiting for an event that never arrives)

# sleep <N> && ps
# Prints a process tree once the timeout is reached to identify any sleeping processes that are stuck
# (if we send 'dune' a SIGINT or SIGTERM it'd kill all subprocesses but won't say which ones were running and since when!)
# -e: prints all processes
# -ww: disables line length restrictions
# -ly: prints additional columns, e.g. WCHAN which shows currently active syscall
# -F: prints process start time and CPU time, useful in identifying which test got started recently,
# and which one was running for a while
# --forest prints a process tree

# timeout --foreground <M> dune
# Sends a SIGTERM to dune after N seconds. This should print any pending buffered output, but won't tell us which processes were still running
# The timeout used here should be > timeout in ulimit && ps to allow time for subprocesses to terminate first

# ulimit -n <NFILES>
# By default the ulimit on some systems is very large (e.g. Fedora39 distrobox 1048576)
# which causes some tests to take very long to run (e.g. forkexec tests which loop through and close all fds up to limit)

TEST_TIMEOUT=600
TEST_TIMEOUT2=1200
test:
dune runtest --profile=$(PROFILE) --error-reporting=twice -j $(JOBS)

ulimit -S -t $(TEST_TIMEOUT); \
(sleep $(TEST_TIMEOUT) && ps -ewwlyF --forest)& \
PSTREE_SLEEP_PID=$$!; \
trap "kill $${PSTREE_SLEEP_PID}" SIGINT SIGTERM EXIT; \
timeout --foreground $(TEST_TIMEOUT2) \
dune runtest --profile=$(PROFILE) --error-reporting=twice -j $(JOBS)
dune build @runtest-python --profile=$(PROFILE)

stresstest:
Expand Down
2 changes: 2 additions & 0 deletions cohttp-posix.opam
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is generated by dune, edit dune-project instead
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
opam-version: "2.0"
maintainer: "[email protected]"
authors: "[email protected]"
Expand Down
22 changes: 22 additions & 0 deletions cohttp-posix.opam.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
opam-version: "2.0"
maintainer: "[email protected]"
authors: "[email protected]"
homepage: "https://xapi-project.github.io/"
bug-reports: "https://github.com/xapi-project/xen-api.git"
dev-repo: "git+https://github.com/xapi-project/xen-api.git"
build: [[ "dune" "build" "-p" name "-j" jobs ]]

available: [ os = "linux" ]
depends: [
"ocaml"
"dune"
"cohttp"
]
synopsis: "Library required by xapi"
description: """
These libraries are provided for backwards compatibility only.
No new code should use these libraries."""
url {
src:
"https://github.com/xapi-project/xen-api/archive/master.tar.gz"
}
254 changes: 253 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,3 +1,255 @@
(lang dune 2.0)

(formatting (enabled_for ocaml))

(generate_opam_files true)

(source (github xapi-project/xen-api))
(license "LGPL-2.1-only WITH OCaml-LGPL-linking-exception")
(authors "[email protected]")
(maintainers "Xapi project maintainers")
(homepage "https://xapi-project.github.io/")

(package
(name zstd)
)

(package
(name xapi-rrdd-plugin)
)

(package
(name xml-light2)
)

(package
(name xen-api-sdk)
)

(package
(name xen-api-client-lwt)
)


(package
(name xen-api-client-async)
)

(package
(name xen-api-client)
)

(package
(name xe)
)

(package
(name xapi-xenopsd-xc)
)

(package
(name xapi-xenopsd-simulator)
)

(package
(name xapi-xenopsd-cli)
)

(package
(name xapi-xenopsd)
)

(package
(name xapi-types)
)

(package
(name xapi-tracing)
)

(package
(name xapi-storage-script)
)

(package
(name xapi-storage-cli)
)

(package
(name xapi-storage)
)

(package
(name xapi-squeezed)
)

(package
(name xapi-schema)
)

(package
(name rrdd-plugin)
)

(package
(name xapi-rrdd)
)

(package
(name xapi-rrd-transport-utils)
)

(package
(name xapi-rrd-transport)
)

(package
(name xapi-open-uri)
)

(package
(name xapi-networkd)
)

(package
(name xapi-nbd)
)

(package
(name xapi-log)
)

(package
(name xapi-idl)
)

(package
(name xapi-forkexecd)
)

(package
(name xapi-expiry-alerts)
)

(package
(name xapi-datamodel)
)

(package
(name xapi-consts)
)

(package
(name xapi-compression)
)

(package
(name xapi-client)
)

(package
(name xapi-cli-protocol)
)

(package
(name xapi)
)

(package
(name wsproxy)
)

(package
(name vhd-tool)
)

(package
(name vhd-format)
)

(package
(name vhd-format-lwt)
)

(package
(name varstored-guard)
)

(package
(name uuid)
)

(package
(name stunnel)
)

(package
(name sexpr)
)

(package
(name safe-resources)
)

(package
(name rrddump)
)

(package
(name rrdd-plugins)
)

(package
(name rrd2csv)
)

(package
(name rrd-transport)
)

(package
(name pciutil)
)

(package
(name message-switch-async)
)

(package
(name message-switch-lwt)
)

(package
(name message-switch-core)
)

(package
(name message-switch-cli)
)

(package
(name message-switch-unix)
)

(package
(name message-switch)
)

(package
(name http-lib)
)

(package
(name gzip)
)

(package
(name forkexec)
)

(package
(name ezxenstore)
)

(package
(name cohttp-posix)
)
2 changes: 2 additions & 0 deletions ezxenstore.opam
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is generated by dune, edit dune-project instead

opam-version: "2.0"
maintainer: "xapi project maintainers"
authors: ["Jonathan Ludlam"]
Expand Down
27 changes: 27 additions & 0 deletions ezxenstore.opam.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
opam-version: "2.0"
maintainer: "xapi project maintainers"
authors: ["Jonathan Ludlam"]
license: "ISC"
homepage: "https://github.com/xapi-project/xen-api"
bug-reports: "https://github.com/xapi-project/xen-api/issues"
dev-repo: "git+https://github.com/xapi-project/xen-api.git"
build: [[ "dune" "build" "-p" name "-j" jobs ]]
depends: [
"ocaml"
"dune" {>= "1.4"}
"cmdliner" {with-test & >= "1.1.0"}
"logs"
"uuidm"
"xenctrl"
"xenstore"
"xenstore_transport"
]
synopsis:
"An easy-to-use interface to xenstore"
description: """
An easy-to-use xenstore library with a simplified interface geared
towards use within a daemon that maintains a single connection to
xenstored."""
url {
src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz"
}
2 changes: 2 additions & 0 deletions forkexec.opam
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is generated by dune, edit dune-project instead
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
opam-version: "2.0"
maintainer: "[email protected]"
authors: "[email protected]"
Expand Down
28 changes: 28 additions & 0 deletions forkexec.opam.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
opam-version: "2.0"
maintainer: "[email protected]"
authors: "[email protected]"
homepage: "https://github.com/xapi-project/"
bug-reports: "https://github.com/xapi-project/xen-api/issues"
dev-repo: "git+https://github.com/xapi-project/xen-api.git"
tags: [ "org:xapi-project" ]

build: [[ "dune" "build" "-p" name "-j" jobs ]]

depends: [
"ocaml"
"dune"
"base-threads"
"fd-send-recv"
"ppx_deriving_rpc"
"rpclib"
"uuid"
"xapi-log"
"xapi-stdext-pervasives"
"xapi-stdext-unix"
]
synopsis: "Sub-process control service for xapi"
description:
"This daemon creates and manages sub-processes on behalf of xapi."
url {
src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz"
}
Loading

0 comments on commit ec6b808

Please sign in to comment.