Fix startup-crasher and simplify timeout handling.

* cgmanager-proxy.c:
  - setup_proxy(): Adding missing return -1.
  - main(): Ensure setup is complete before accepting connections
    (crasher).
* frontend.c:
  - timer_cmp_fn(): Return whole range of expected values.
  - timeout_remove(): Simplify.
  - timeout_reset(): Simplify.
  - timeout_add(): Use nih_alloc_set_destructor() for simplicity.

Signed-off-by: James Hunt <james.hunt@ubuntu.com>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Make cgm_release_agent depend on libcgmanager

to make sure that the library gets built first.  This should fix the
travis build failures.  Thanks to Çağlar for the line.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
cgmanager-proxy: wait up to 2 seconds for reply from server

We previously waited indefinately, which causes a hang if the server
crashes.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
release 0.25

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
accept that a slow vm might take awhile to fire remove helper

This will hopefully allow the test to pass in jenkins.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
add movepidabs to cgm

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Implement getpidcgroupabs

This returns the cgroup path of another task relative to the
cgproxy if used, or else the full path as seen by the cgmanager.

This path can then be fed to movepidabs.  This can be used by
lxc-attach to re-attach to a container's cgroup even if the
user's new login shell is in a different cgroup session than
that under which the container was started.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Undo the connection timeouts

They are wreak havoc on container proxies.

However do keep the increased nfiles rlimit (which came in with that
same commit).

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
test22: abort test if we're not allowed to move the cgroup mount

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
bump api version for getpidcgroupabs

So that lxc can detect whether that call is supported.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
test22: don't output to a debug file in cwd

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
get_controller_path: use the is_same_controller helper

Since we store 'systemd' rather than 'name=system', we need to
use the helper to account for this when the user requests an
action against name=systemd.  (Requiring the user to use 'system'
seems bogus)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>