Add executables and autogen files to .gitignore

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CA-47802: fe daemon will not log successful exits any more

This was causing too much logspam and I've not been finding it especially useful either.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add simple thread queue implementation.

The library

  * gives user the oppotunities to tweak the global scheduling policy and the schedule of a particular thread
  * is compatible, and can be mixed use, with standard Thread module, add/remove "open Threadext" to switch

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Use thread queue.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
CA-61875: update the HTTP client/server interface so it's possible to (eg) make an HTTP proxy

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #25 from djs55/formerge/CA-61875

CA-61875: update the HTTP client/server interface so it's possible to (eg
Make the fe process flush its debug buffer when output to syslog

In practice, this makes no difference, as write_log is only called once. But it seems to make sense that the debug lines are only pritned once, should fe ever be changed to call write_log more than once.

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
CA-63225: Add fe option to output child process's stdout to syslog

When the syslog_stdout option is enabled, stdout from the child process is read line-by-line and output in real-time to syslog.

An optional argument (default: off) added to Forkhelpers.safe_close_and_exec and Forkhelpers.execute_command_get_output can be used to control this.

(Future work: This concept could be generalised to output any of the child process's open FDs to the syslog.)

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
CA-63225: add Unixext.lines_fold and lines_iter which are given in_channels directly, as opposed to file_lines_fold, file_lines_iter which are given a filesystem path.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-63225: update following code review feedback

See:
https://github.com/jjd27/xen-api-libs/commit/f0ab9b8f8c85c4671cc07715104c5911697afd98
https://github.com/xen-org/xen-api-libs/pull/27

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-63225: log the process name (not full path) and pid when logging via fe

This makes it possible to disambiguate log messages from different qemus, which seems pretty essential.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
There's no need to explicitly pass in syslog_stdout to Child.run: it's already part of the 'state' parameter

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
CA-65181: Allow arbitarary keys for syslog entries

Rather than just having a boolean indicating whether the output from stdout gets forwarded to the syslog, have an optional string providing the name of the key to be used in the syslog. If this string is not provided, use the process name and pid as the key.

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
Merge pull request #29 from jjd27/CA-65181

CA-65181: Allow arbitrary keys for syslog entries
CA-65202: Fix HTTP parser: strip "HTTP/" from the HTTP request version and avoid duplicating the "Connection:" header

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-64347: add per-URI performance counters to the webserver; add benchmarking tools

Also change the URI lookup to use a radix tree rather than an association list.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-64347: expand the HTTP performance test and allow the commandline switching of the HTTP "fastpath"

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-66148: fix broken HTTP version check

This caused HTTP/1.1 requests without a Connection: header to default to "close" rather than "keep-alive", breaking unupgraded slaves talking to an upgraded master.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Generate manifest after building source RPM.

Partial fix for CA-66143.

Signed-off-by: John Else <john.else@citrix.com>
CA-64347: add a new HTTP error (501 Method Not Implemented) for when we don't understand the HTTP method

SIgned-off-by: David Scott <dave.scott@eu.citrix.com>