top

Package main is a generated protocol buffer package.

It is generated from these files:

lxd/migrate.proto

It has these top-level messages:

IDMapType
MigrationHeader
MigrationControl

*

* This file is a bit funny. The goal here is to use setns() to manipulate
* files inside the container, so we don't have to reason about the paths to
* make sure they don't escape (we can simply rely on the kernel for
* correctness). Unfortunately, you can't setns() to a mount namespace with a
* multi-threaded program, which every golang binary is. However, by declaring
* our init as an initializer, we can capture process control before it is
* transferred to the golang runtime, so we can then setns() as we'd like
* before golang has a chance to set up any threads. So, we implement two new
* lxd fork* commands which are captured here, and take a file on the host fs
* and copy it into the container ns.
*
* An alternative to this would be to move this code into a separate binary,
* which of course has problems of its own when it comes to packaging (how do
* we find the binary, what do we do if someone does file push and it is
* missing, etc.). After some discussion, even though the embedded method is
* somewhat convoluted, it was preferred.

Imports 19 package(s)

  1. gopkg.in/flosch/pongo2.v3
  2. github.com/coreos/go-systemd/activation
  3. gopkg.in/lxc/go-lxc.v2
  4. github.com/lxc/lxd/shared
  5. github.com/lxc/lxd/shared/logging
  6. gopkg.in/tomb.v2
  7. golang.org/x/crypto/scrypt
  8. github.com/dustinkirkland/golang-petname
  9. github.com/gorilla/websocket
  10. github.com/lxc/lxd/shared/gnuflag
  11. github.com/gorilla/mux
  12. github.com/syndtr/gocapability/capability
  13. gopkg.in/inconshreveable/log15.v2
  14. github.com/lxc/lxd
  15. github.com/mattn/go-sqlite3
  16. github.com/golang/protobuf/proto
  17. gopkg.in/yaml.v2
  18. github.com/pborman/uuid
  19. golang.org/x/crypto/ssh/terminal

Test imports 2 package(s)

  1. github.com/stretchr/testify/require
  2. github.com/stretchr/testify/suite