Skip to content
Permalink
Branch: master
Commits on Mar 25, 2020
  1. Fix delete script to work with containerd

    Brian Woods authored and sstabellini committed Mar 25, 2020
    It seems that containerd first has to kill the container process (xl
    destroy in runX's case) before it can delete (gets rid of the container
    FS).   So change running the delete script to when kill is called.  Also
    use a PID for recvtty so that we can kill it as well.
    
    Signed-off-by: Brian Woods <brian.woods@xilinx.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
  2. Move xl create to runX create

    Brian Woods authored and sstabellini committed Mar 25, 2020
    Move xl create to runX create but create the VM paused, then when
    runX start is executed, unpause the VM.  This allows for removing one
    of the socat instances.  xl create takes place after the passthrough of
    runc's create so functionally it should be the same.
    
    Signed-off-by: Brian Woods <brian.woods@xilinx.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Commits on Mar 19, 2020
  1. On build.sh clean, clean the go build directory too

    sstabellini committed Mar 19, 2020
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
  2. Update arm64 kernel config

    sstabellini committed Mar 19, 2020
    The current kernel config is for an older version. Update the config to
    match the kernel version we currently use. Take the opportunity to make
    the config smaller still.
    
    The ARM32 config still needs to be updated.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
  3. Use "$(getconf _NPROCESSORS_ONLN)" for make -j

    sstabellini committed Mar 18, 2020
    To detect the number of physical processors on the system, rather than
    hardcoding 4.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
  4. Add more information to DEPENDENCIES for cross-builds

    sstabellini committed Mar 18, 2020
    Add more details on how to cross-compile runX, including the need for
    setting GOROOT and CROSS_COMPILE.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
  5. Use a variable to define the busybox binary to use

    sstabellini committed Mar 18, 2020
    The busybox binary to use with runX needs to be statically built for the
    target architecture. However, it is also run at built time by
    make-initrd to create links inside the initrd. If runX is been
    cross-compiled, a QEMU user binary needs to be installed on the build
    host.
    
    No functional changes.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Commits on Mar 18, 2020
  1. Don't rebuild kernel & initrd unnecessarily every time

    sstabellini committed Mar 18, 2020
    Check whether the related output binary is already present under target/
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
  2. Move the initrd build to a new top level directory

    sstabellini committed Mar 18, 2020
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Commits on Mar 10, 2020
  1. Rework networking for containerd

    Brian Woods authored and sstabellini committed Mar 10, 2020
    Since docker/rocket handles networking noticeably different from
    containerd, there needs to be a rework with how networking is handled.
    From experimentation, the label option doesn't work with containerd, so
    we use env and add our networking arguments through that.  A containerd
    example:
    ... --env "NETCONF=/etc/cni/net.d/net.conf,mynet,10.0.42.168" ...
    Where,
        NETCONF is the env var we hijack
        /etc/cni/net.d/net.conf is the cni file we read various info from
        mynet is the cni name
        10.0.42.168 is the optional IP address (otherwise, DHCP)
    
    Signed-off-by: Brian Woods <brian.woods@xilinx.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
  2. Don't assume runc has been renamed

    sstabellini committed Mar 10, 2020
    Instead, document how to choose a different runtime with containerd.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Commits on Mar 6, 2020
  1. Fix deletion of unused tmp directories

    Brian Woods authored and sstabellini committed Mar 6, 2020
    Eerroneously, basename was used rather than dirname. This leaves extra
    unused directories in /tmp.  Correcting it to dirname solves the issue.
    
    Fixes: 397319c ("Add console support for runX")
    Signed-off-by: Brian Woods <brian.woods@xilinx.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
  2. Fix missing domid in state

    Brian Woods authored and sstabellini committed Mar 6, 2020
    After create is run but before start is run, containerd checks the state
    but there's no domid yet, which is used for the pid.  Simply guess by
    taking the largest domid and then adding one to it.
    
    Signed-off-by: Brian Woods <brian.woods@xilinx.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
    Tested-by: Stefano Stabellini <sstabellini@kernel.org>
Commits on Mar 5, 2020
  1. Add DEPENDENCIES file

    Brian Woods authored and sstabellini committed Mar 5, 2020
    Suggested-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
    Signed-off-by: Brian Woods <brian.woods@xilinx.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
  2. Switch from docker to containerd

    Brian Woods authored and sstabellini committed Mar 5, 2020
    From: Stefano Stabellini <stefano.stabellini@xilinx.com>
    
    Paths, json variable names, argument parsing, etc all need to be changed
    in order for runX to be used with containerd rather than docker.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
    Signed-off-by: Brian Woods <brian.woods@xilinx.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
  3. Add console support for runX

    Brian Woods authored and sstabellini committed Mar 5, 2020
    Add support for console redirect from Xen to containerd in the runX
    scripts.  This does introduce a new outside dependency on daemonize but
    that is needed to get socat to work (other wise socat kills itself).  A
    basic timeline of what happens is below:
      ...
       |
       v
    create <- we need to create a tty to give to containerd but Xen hasn't
       |      started yet so we create a fake with socat and pass that off
       |      with serial_fd_handler.  Also, we use recvtty to trick runc
       |      into thinking it's connected to containerd.
       v
    start  <- after Xen creates the VM, we use socat again to connect the
       |      pts xenstore gives us to a unix socket that was created with
       |      the create usage of socat.  This connects Xen's console to
       |      containerd and is available to docker or other software.
       V
      ...
    
    Signed-off-by: Brian Woods <brian.woods@xilinx.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
  4. Add helper programs for console support

    Brian Woods authored and sstabellini committed Mar 5, 2020
    recvtty is needed to trick runc into thinking it has a console and
    doesn't err out and serial_fd_handler passes off the tty fd to
    containerd.  Both support being cross compiled.
    
    Signed-off-by: Brian Woods <brian.woods@xilinx.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
  5. Add helper scripts for adding console support

    Brian Woods authored and sstabellini committed Mar 5, 2020
    In preparation of adding console support for runX, add some helper
    socat scripts for connecting Xen to containerd.
    
    Signed-off-by: Brian Woods <brian.woods@xilinx.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Commits on Nov 7, 2019
  1. Add README.md with goals and architecture

    sstabellini committed Oct 29, 2019
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Commits on Oct 22, 2019
  1. Remove debug code

    sstabellini committed Mar 21, 2018
    Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
  2. Update kernel config for x86

    sstabellini committed Mar 21, 2018
    Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
  3. Update kernel to 4.15

    sstabellini committed Mar 21, 2018
    Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
  4. Initial commit

    sstabellini committed Mar 21, 2018
    Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
  5. Initial commit

    rvs committed Oct 22, 2019
    Signed-off-by: Roman Shaposhnik <rvs@zededa.com>
You can’t perform that action at this time.