lxd: github.com/lxc/lxd/lxd Files | Directories

Command lxd

forkdns provides a specialised DNS server designed for relaying A and PTR queries.

*

* 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.

Package Files

api.go api_1.0.go api_cluster.go api_internal.go api_project.go backup.go certificates.go cgo.go cgroup.go daemon.go daemon_config.go daemon_images.go daemon_storage.go devices.go devlxd.go events.go images.go init.go instance.go instance_backup.go instance_console.go instance_delete.go instance_exec.go instance_file.go instance_get.go instance_instance_types.go instance_logs.go instance_metadata.go instance_patch.go instance_post.go instance_put.go instance_snapshot.go instance_state.go instances.go instances_get.go instances_post.go logging.go main.go main_activateifneeded.go main_callhook.go main_checkfeature.go main_cluster.go main_daemon.go main_forkconsole.go main_forkdns.go main_forkexec.go main_forkfile.go main_forklimits.go main_forkmigrate.go main_forkmount.go main_forknet.go main_forkproxy.go main_forkstart.go main_forksyscall.go main_forkuevent.go main_forkzfs.go main_import.go main_init.go main_init_auto.go main_init_dump.go main_init_interactive.go main_init_preseed.go main_manpage.go main_migratedumpsuccess.go main_netcat.go main_nsexec.go main_shutdown.go main_sql.go main_version.go main_waitready.go migrate.go migrate_instance.go migrate_storage_volumes.go networks.go networks_config.go networks_utils.go operations.go patches.go patches_utils.go profiles.go profiles_utils.go resources.go response.go storage.go storage_migration.go storage_pools.go storage_pools_config.go storage_pools_utils.go storage_volumes.go storage_volumes_snapshot.go storage_volumes_utils.go

Directories

PathSynopsis
apparmor
backup
cgroup
cluster
cluster/raftPackage raft contains the subset of hashicorp/raft needed to perform data migrations to dqlite 1.0.
config
daemon
db
db/cluster
db/node
db/queryPackage query implements helpers around database/sql to execute various kinds of very common SQL queries.
db/schemaPackage schema offers utilities to create and maintain a database schema.
device
device/config
dnsmasq
endpoints
events
filter
firewall
firewall/drivers
instance
instance/drivers
instance/drivers/qmp
instance/instancetype
instance/operationlock
maas
migrationPackage migration is a generated protocol buffer package.
network
node
operations
project
rbac
resources
response
revert
rsync
seccomp
state
storage
storage/drivers
storage/locking
storage/memorypipe
storage/quota
sys
task
template
ucred
util
vsock

Package main imports 122 packages (graph). Updated 2020-07-06. Refresh now. Tools for package owners.