httpserver: Drop XML support from Swagger definitions

We don't support XML so stop telling everyone we do.

Reviewed-by: Tomasz Grabiec <tgrabiec@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
scripts: Add "redis-memonly" to VM images

This adds "redis-memonly" to VM images which will make Redis part of the
official OSv release.

Signed-off-by: Tzach Livyatan <tzach@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
add __syscall symbol

An alias of syscall, __syscall is also a valid symbol. I am not using the
weak_alias macro because this is not part of musl.

The only tricky part here is to get the headers right. Our syscall.h file
includes the one in sys/, that comes from musl - we don't want to change that.
I change unistd.h then, where the definition of syscall already lives, and
include that one in the main syscall header.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
linux: make close syscall available through syscall gate.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
httpserver::network.json API: fix the interface enumeration function

Fixes issue #470

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
zfs: initialize znode's z_vnode field

ZFS on OSv initializes a znode without necessarily having to associate
a vnode, e.g. on certain operations that don't involve looking up the
target node, such as unlink. Then, z_vnode should be initialized to
null to make it explicit that the znode has no vnode associated, and
it's also the correct thing to do.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
epoll: Check if fileref is valid

epoll_ctl can happpen while someone cloeses the fd concurrently.
Do nothing if fileref is empty.

Saw this happens in tomcat benchmark.

Signed-off-by: Asias He <asias@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
enhance symbol detection script

Our symbol script has problem detecting symbols that has the form GLIBCXX.
In particular, because they will be a match in the grep part of the expression
but won't be replaced in the sed part of the expression, there will be garbage
in the output, leading the script to incorrectly guess which symbols are missing

Expanding the regular expression to also match XX symbols fix this.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Cloud-init : use dependencies in Makefile

Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Cloud-init : generate httpserver.conf from YAML using YAML-cpp emit

More compatible, can handle arbitrary YAML-subnodes

Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Httpserver - allow specific CORS host(s) + use "Origin" header

Instead of just binary nothing or "*" (any), accept
a number of accepted hosts and match them against "Origin"
supplied by client.

"*" (or "true") will still accept anything.

Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
libc: Add gethostbyaddr

This is needed for MySQL.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
API: Return thread status in response

Signed-off-by: Daniel Zautner <daniel@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
tests: misc-concurrent-io: add option to measure reads from the same range

Some cleanup is done within this patch as well.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Lua: Fix build flags and libraries

The flag LUA_USE_LINUX implicitly sets LUA_USE_READLINE, which then makes the
build require 'readline.h'. We don't use readline, and readline headers might
not be available on the machine it's built with. LUA_USE_LINUX is a group of
other flags. Include this group, but exclude LUA_USE_READLINE.

LuaRocks requires POPEN support in Lua, so this flag was added as well.

Remove -ledit from the build as it is not needed.

I also took the chance to refactor the module Makefile.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Lua: Added LuaFileSystem and LuaPath

Used in CLI for path manipulation.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Add our ncurses build to includes

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Add CWD handler

This is basically an import from the previous shell.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Get the prompt from Lua code with CWD

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Add cd command

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>