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>
cli: Make cat command use cwd

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Handle non-decodable API output

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Pass console size to Lua

To have output formatted nicely in the console we need to know its dimensions.

This patch adds support for both inside and outside OSv. Inside we use some
ANSI escape codes, thanks to Nadav (@nyh), and outside we use ioctl with
TIOCGWINSZ and signals for size changes.

It also binds these details to be used from Lua (as cli_console_dim()).

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Add method to print lists to console

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