Commit 0df50dc1 authored by jan.koester's avatar jan.koester
Browse files

test

parent 057e0391
Loading
Loading
Loading
Loading
+2 −1
Changes for include/containerd/api.h: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -109,7 +109,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *   ListContainers -> per container: container (name), image, state
 *       (stopped|starting|running|stopping|exited|failed), pid (host PID of
 *       its PID 1), started, exit_code, restarts, error?, network,
 *       address?, lease? (the address DHCP gave it), autostart, restart,
 *       address?, veth? (the host's end of its veth pair, in the
 *       bridge), lease? (the address DHCP gave it), autostart, restart,
 *       memory (current bytes), tasks
 *   GetContainer {name} -> container (name), state & co. as in the list,
 *       then all settings
+4 −1
Changes for src/containers.cpp: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -384,7 +384,10 @@ void addRecord(Result &out, const std::string &name, const Settings &s) {
    out.add("restarts", (long long)r.restarts);
    if (!r.error.empty() && (r.state == "failed" || r.state == "exited")) out.add("error", r.error);
    out.add("network", s.network);
    if (s.network == "bridge") out.add("address", s.address);
    if (s.network == "bridge") {
        out.add("address", s.address);
        out.add("veth", hostVeth(name));  // its end on the host, while it runs
    }
    if (isDhcp(s) && active(r)) {
        auto lease = keyValues(runFile(name, ".lease"));
        if (!lease["address"].empty()) out.add("lease", lease["address"]);