GithubHelp home page GithubHelp logo

akhileshbhople / agent Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kata-containers/agent

0.0 1.0 0.0 6.21 MB

Virtual Machine agent for hardware virtualized containers

License: Apache License 2.0

Shell 1.59% Go 96.73% Makefile 1.14% Dockerfile 0.54%

agent's Introduction

Build Status codecov

Kata Containers Agent

This project implements an agent called kata-agent that runs inside a virtual machine (VM).

The agent manages container processes inside the VM, on behalf of the runtime running on the host.

Debug mode

To enable agent debug output, add the agent.log=debug option to the guest kernel command line.

See the developer guide for further details.

Developer mode

Add agent.devmode to the guest kernel command line to allow the agent process to coredump (disabled by default). Specifying this option implicitly enables debug mode.

Enable trace support

See the tracing guide.

Enable debug console

Add agent.debug_console to the guest kernel command line to allow the agent process to start a debug console. Debug console is only available if bash or sh is installed in the rootfs or initrd image. Developers can connect to the virtual machine using the debug console

Enable debug console for firecracker

Firecracker doesn't have a UNIX socket connected to /dev/console, hence the kernel command line option agent.debug_console will not work for firecracker. Fortunately, firecracker supports hybrid vsocks, and they can be used to communicate processes in the guest with processes in the host. The kernel command line option agent.debug_console_vport was added to allow developers specify on which vsock port the debugging console should be connected.

In firecracker, the UNIX socket that is connected to the vsock end is created at /var/lib/vc/firecracker/$CID/root/kata.hvsock, where $CID is the container ID.

Run the following commands to have a debugging console in firecracker.

$ conf="/usr/share/defaults/kata-containers/configuration.toml"
$ sudo sed -i 's/^kernel_params.*/kernel_params="agent.debug_console_vport=1026"/g' "${conf}"
$ sudo su -c 'cd /var/lib/vc/firecracker/08facf/root/ && socat stdin unix-connect:kata.hvsock'
CONNECT 1026

NOTE: Ports 1024 and 1025 are reserved for communication with the agent and gathering of agent logs respectively

cpuset cgroup details

See the cpuset cgroup documentation.

Hotplug Timeout

When hot plugging devices into the Kata VM, the agent will wait by default for 3 seconds for the device to be plugged in and the corresponding add uevent for the device. If the timeout is reached without the above happening, the hot plug action will fail.

The length of the timeout can be increased by specifying the agent.hotplug_timeout to the guest kernel command line. For example, agent.hotplug_timeout=10s will increase the timeout to 10 seconds. The value of the option is in the Go duration format.

Any invalid values used for agent.hotplug_timeout will fall back to the default of 3 seconds.

agent's People

Contributors

akhileshbhople avatar amshinde avatar awprice avatar bergwolf avatar caoruidong avatar cedriccchen avatar chavafg avatar gabyct avatar gnawux avatar grahamwhaley avatar jcvenegas avatar jodh-intel avatar jshachm avatar katacontainersbot avatar laijs avatar lifupan avatar linzichang avatar marcov avatar mcastelino avatar nitkon avatar pennyzct avatar stefanharh avatar teawater avatar vbmade2000 avatar vijaydhanraj avatar weizhang555 avatar ychauwang avatar zeromagic avatar zhabinecho avatar zklei avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.