Module: OsCtld

Defined in:
ext/osctld/native.c,
lib/osctld.rb,
lib/osctld/cli.rb,
lib/osctld/lxc.rb,
lib/osctld/pool.rb,
lib/osctld/user.rb,
lib/osctld/event.rb,
lib/osctld/group.rb,
lib/osctld/assets.rb,
lib/osctld/cgroup.rb,
lib/osctld/daemon.rb,
lib/osctld/eventd.rb,
lib/osctld/id_map.rb,
lib/osctld/command.rb,
lib/osctld/console.rb,
lib/osctld/db/list.rb,
lib/osctld/history.rb,
lib/osctld/monitor.rb,
lib/osctld/version.rb,
lib/osctld/apparmor.rb,
lib/osctld/cli/exec.rb,
lib/osctld/db/pools.rb,
lib/osctld/id_range.rb,
lib/osctld/lockable.rb,
lib/osctld/prlimits.rb,
lib/osctld/utils/ip.rb,
lib/osctld/container.rb,
lib/osctld/db/groups.rb,
lib/osctld/etc_hosts.rb,
lib/osctld/mount/sys.rb,
lib/osctld/run_state.rb,
lib/osctld/attributes.rb,
lib/osctld/cli/daemon.rb,
lib/osctld/exceptions.rb,
lib/osctld/net_config.rb,
lib/osctld/osctl_repo.rb,
lib/osctld/repository.rb,
lib/osctld/assets/base.rb,
lib/osctld/assets/file.rb,
lib/osctld/console/tty.rb,
lib/osctld/dist_config.rb,
lib/osctld/manipulable.rb,
lib/osctld/mount/entry.rb,
lib/osctld/switch_user.rb,
lib/osctld/assets/entry.rb,
lib/osctld/cgroup/param.rb,
lib/osctld/db/id_ranges.rb,
lib/osctld/devices/lock.rb,
lib/osctld/devices/mode.rb,
lib/osctld/erb_template.rb,
lib/osctld/send_receive.rb,
lib/osctld/system_users.rb,
lib/osctld/user_control.rb,
lib/osctld/utils/assets.rb,
lib/osctld/cgroup/params.rb,
lib/osctld/commands/base.rb,
lib/osctld/lock_registry.rb,
lib/osctld/mount/manager.rb,
lib/osctld/net_interface.rb,
lib/osctld/routing/route.rb,
lib/osctld/routing/table.rb,
lib/osctld/system_limits.rb,
lib/osctld/thread_reaper.rb,
lib/osctld/ugid_registry.rb,
lib/osctld/utils/devices.rb,
lib/osctld/assets/dataset.rb,
lib/osctld/assets/symlink.rb,
lib/osctld/cli/supervisor.rb,
lib/osctld/container/hook.rb,
lib/osctld/db/pooled_list.rb,
lib/osctld/devices/device.rb,
lib/osctld/execution_plan.rb,
lib/osctld/generic/server.rb,
lib/osctld/monitor/master.rb,
lib/osctld/auto_start/plan.rb,
lib/osctld/commands/logged.rb,
lib/osctld/console/console.rb,
lib/osctld/container/hooks.rb,
lib/osctld/db/repositories.rb,
lib/osctld/devices/manager.rb,
lib/osctld/monitor/process.rb,
lib/osctld/utils/container.rb,
lib/osctld/assets/base_file.rb,
lib/osctld/assets/directory.rb,
lib/osctld/dist_config/arch.rb,
lib/osctld/dist_config/base.rb,
lib/osctld/dist_config/void.rb,
lib/osctld/mount/shared_dir.rb,
lib/osctld/prlimits/manager.rb,
lib/osctld/prlimits/prlimit.rb,
lib/osctld/repository/image.rb,
lib/osctld/send_receive/log.rb,
lib/osctld/assets/definition.rb,
lib/osctld/auto_start/config.rb,
lib/osctld/commands/pool/set.rb,
lib/osctld/commands/user/set.rb,
lib/osctld/console/container.rb,
lib/osctld/container/builder.rb,
lib/osctld/dist_config/nixos.rb,
lib/osctld/utils/switch_user.rb,
lib/osctld/assets/unix_socket.rb,
lib/osctld/commands/group/set.rb,
lib/osctld/commands/pool/list.rb,
lib/osctld/commands/pool/show.rb,
lib/osctld/commands/self/ping.rb,
lib/osctld/commands/user/list.rb,
lib/osctld/commands/user/show.rb,
lib/osctld/container/importer.rb,
lib/osctld/dist_config/alpine.rb,
lib/osctld/dist_config/centos.rb,
lib/osctld/dist_config/debian.rb,
lib/osctld/dist_config/devuan.rb,
lib/osctld/dist_config/fedora.rb,
lib/osctld/dist_config/gentoo.rb,
lib/osctld/dist_config/redhat.rb,
lib/osctld/dist_config/ubuntu.rb,
lib/osctld/net_interface/base.rb,
lib/osctld/net_interface/veth.rb,
lib/osctld/commands/group/list.rb,
lib/osctld/commands/group/show.rb,
lib/osctld/commands/pool/unset.rb,
lib/osctld/commands/user/setup.rb,
lib/osctld/commands/user/unset.rb,
lib/osctld/continuous_executor.rb,
lib/osctld/send_receive/server.rb,
lib/osctld/utils/cgroup_params.rb,
lib/osctld/commands/group/unset.rb,
lib/osctld/commands/pool/assets.rb,
lib/osctld/commands/pool/export.rb,
lib/osctld/commands/pool/import.rb,
lib/osctld/commands/self/assets.rb,
lib/osctld/commands/user/assets.rb,
lib/osctld/commands/user/create.rb,
lib/osctld/commands/user/delete.rb,
lib/osctld/container/hooks/base.rb,
lib/osctld/container/lxc_config.rb,
lib/osctld/dist_config/opensuse.rb,
lib/osctld/net_interface/bridge.rb,
lib/osctld/net_interface/routed.rb,
lib/osctld/send_receive/command.rb,
lib/osctld/user_control/command.rb,
lib/osctld/commands/container/su.rb,
lib/osctld/commands/dataset/list.rb,
lib/osctld/commands/group/assets.rb,
lib/osctld/commands/group/create.rb,
lib/osctld/commands/group/delete.rb,
lib/osctld/commands/history/list.rb,
lib/osctld/commands/id_range/set.rb,
lib/osctld/commands/pool/install.rb,
lib/osctld/commands/send/key_gen.rb,
lib/osctld/devices/group_manager.rb,
lib/osctld/dist_config/slackware.rb,
lib/osctld/net_interface/manager.rb,
lib/osctld/commands/container/set.rb,
lib/osctld/commands/id_range/free.rb,
lib/osctld/commands/id_range/list.rb,
lib/osctld/commands/id_range/show.rb,
lib/osctld/commands/self/activate.rb,
lib/osctld/commands/self/shutdown.rb,
lib/osctld/commands/send/key_path.rb,
lib/osctld/commands/user/register.rb,
lib/osctld/commands/user/subugids.rb,
lib/osctld/generic/client_handler.rb,
lib/osctld/send_receive/key_chain.rb,
lib/osctld/cgroup/container_params.rb,
lib/osctld/commands/container/copy.rb,
lib/osctld/commands/container/exec.rb,
lib/osctld/commands/container/list.rb,
lib/osctld/commands/container/move.rb,
lib/osctld/commands/container/show.rb,
lib/osctld/commands/container/stop.rb,
lib/osctld/commands/dataset/create.rb,
lib/osctld/commands/dataset/delete.rb,
lib/osctld/commands/id_range/unset.rb,
lib/osctld/commands/pool/uninstall.rb,
lib/osctld/commands/repository/add.rb,
lib/osctld/commands/repository/set.rb,
lib/osctld/container/hooks/on_stop.rb,
lib/osctld/container/hooks/veth_up.rb,
lib/osctld/dist_config/unsupported.rb,
lib/osctld/user_control/supervisor.rb,
lib/osctld/commands/container/chgrp.rb,
lib/osctld/commands/container/chown.rb,
lib/osctld/commands/container/mount.rb,
lib/osctld/commands/container/start.rb,
lib/osctld/commands/container/unset.rb,
lib/osctld/commands/event/subscribe.rb,
lib/osctld/commands/id_range/assets.rb,
lib/osctld/commands/id_range/create.rb,
lib/osctld/commands/id_range/delete.rb,
lib/osctld/commands/repository/list.rb,
lib/osctld/commands/repository/show.rb,
lib/osctld/commands/user/idmap_list.rb,
lib/osctld/commands/user/unregister.rb,
lib/osctld/container/hooks/on_start.rb,
lib/osctld/container/hooks/pre_stop.rb,
lib/osctld/container_control/result.rb,
lib/osctld/container_control/runner.rb,
lib/osctld/commands/container/assets.rb,
lib/osctld/commands/container/attach.rb,
lib/osctld/commands/container/create.rb,
lib/osctld/commands/container/delete.rb,
lib/osctld/commands/container/export.rb,
lib/osctld/commands/container/import.rb,
lib/osctld/commands/container/passwd.rb,
lib/osctld/commands/group/device_add.rb,
lib/osctld/commands/repository/unset.rb,
lib/osctld/commands/user/lxc_usernet.rb,
lib/osctld/container/hooks/post_stop.rb,
lib/osctld/container/hooks/pre_mount.rb,
lib/osctld/container/hooks/pre_start.rb,
lib/osctld/container/hooks/veth_down.rb,
lib/osctld/container_control/command.rb,
lib/osctld/devices/container_manager.rb,
lib/osctld/id_range/allocation_table.rb,
lib/osctld/commands/container/console.rb,
lib/osctld/commands/container/restart.rb,
lib/osctld/commands/debug/thread_list.rb,
lib/osctld/commands/group/cgparam_set.rb,
lib/osctld/commands/group/device_list.rb,
lib/osctld/commands/id_range/allocate.rb,
lib/osctld/commands/net_interface/set.rb,
lib/osctld/commands/repository/assets.rb,
lib/osctld/commands/repository/delete.rb,
lib/osctld/commands/repository/enable.rb,
lib/osctld/commands/self/health_check.rb,
lib/osctld/container/hooks/post_mount.rb,
lib/osctld/container/hooks/post_start.rb,
lib/osctld/container_control/frontend.rb,
lib/osctld/send_receive/commands/base.rb,
lib/osctld/user_control/commands/base.rb,
lib/osctld/commands/container/send_now.rb,
lib/osctld/commands/group/cgparam_list.rb,
lib/osctld/commands/group/cgsubsystems.rb,
lib/osctld/commands/group/device_chmod.rb,
lib/osctld/commands/net_interface/list.rb,
lib/osctld/commands/net_interface/show.rb,
lib/osctld/commands/repository/disable.rb,
lib/osctld/commands/container/reinstall.rb,
lib/osctld/commands/container/runscript.rb,
lib/osctld/commands/container/send_sync.rb,
lib/osctld/commands/debug/lock_registry.rb,
lib/osctld/commands/debug/ugid_registry.rb,
lib/osctld/commands/group/cgparam_apply.rb,
lib/osctld/commands/group/cgparam_unset.rb,
lib/osctld/commands/group/device_delete.rb,
lib/osctld/commands/id_range/table_list.rb,
lib/osctld/commands/id_range/table_show.rb,
lib/osctld/commands/receive/authkey_add.rb,
lib/osctld/commands/receive/authkey_set.rb,
lib/osctld/commands/container/device_add.rb,
lib/osctld/commands/container/mount_list.rb,
lib/osctld/commands/container/send_state.rb,
lib/osctld/commands/group/device_inherit.rb,
lib/osctld/commands/group/device_promote.rb,
lib/osctld/commands/group/device_replace.rb,
lib/osctld/commands/net_interface/create.rb,
lib/osctld/commands/net_interface/delete.rb,
lib/osctld/commands/net_interface/ip_add.rb,
lib/osctld/commands/net_interface/ip_del.rb,
lib/osctld/commands/net_interface/rename.rb,
lib/osctld/commands/receive/authkey_list.rb,
lib/osctld/user_control/commands/veth_up.rb,
lib/osctld/commands/container/cgparam_set.rb,
lib/osctld/commands/container/device_list.rb,
lib/osctld/commands/container/prlimit_set.rb,
lib/osctld/commands/container/reconfigure.rb,
lib/osctld/commands/container/send_cancel.rb,
lib/osctld/commands/container/send_config.rb,
lib/osctld/commands/container/send_rootfs.rb,
lib/osctld/commands/group/cgparam_replace.rb,
lib/osctld/commands/net_interface/ip_list.rb,
lib/osctld/commands/pool/auto_start_queue.rb,
lib/osctld/commands/repository/image_list.rb,
lib/osctld/commands/container/cgparam_list.rb,
lib/osctld/commands/container/create_empty.rb,
lib/osctld/commands/container/device_chmod.rb,
lib/osctld/commands/container/mount_create.rb,
lib/osctld/commands/container/mount_delete.rb,
lib/osctld/commands/container/prlimit_list.rb,
lib/osctld/commands/container/send_cleanup.rb,
lib/osctld/commands/pool/auto_start_cancel.rb,
lib/osctld/commands/receive/authkey_delete.rb,
lib/osctld/container_control/commands/exec.rb,
lib/osctld/container_control/commands/stop.rb,
lib/osctld/user_control/commands/veth_down.rb,
lib/osctld/commands/container/cgparam_apply.rb,
lib/osctld/commands/container/cgparam_unset.rb,
lib/osctld/commands/container/config_reload.rb,
lib/osctld/commands/container/device_delete.rb,
lib/osctld/commands/container/mount_dataset.rb,
lib/osctld/commands/container/prlimit_unset.rb,
lib/osctld/commands/container/recover_state.rb,
lib/osctld/commands/net_interface/route_add.rb,
lib/osctld/commands/net_interface/route_del.rb,
lib/osctld/commands/pool/auto_start_trigger.rb,
lib/osctld/container_control/commands/mount.rb,
lib/osctld/container_control/commands/state.rb,
lib/osctld/user_control/commands/ct_autodev.rb,
lib/osctld/commands/container/config_replace.rb,
lib/osctld/commands/container/device_inherit.rb,
lib/osctld/commands/container/device_promote.rb,
lib/osctld/commands/container/device_replace.rb,
lib/osctld/commands/container/mount_activate.rb,
lib/osctld/commands/container/mount_register.rb,
lib/osctld/commands/group/device_set_inherit.rb,
lib/osctld/commands/net_interface/route_list.rb,
lib/osctld/container_control/commands/reboot.rb,
lib/osctld/container_control/commands/syscmd.rb,
lib/osctld/container_control/utils/runscript.rb,
lib/osctld/user_control/commands/ct_on_start.rb,
lib/osctld/commands/container/cgparam_replace.rb,
lib/osctld/commands/container/recover_cleanup.rb,
lib/osctld/container_control/commands/unmount.rb,
lib/osctld/send_receive/commands/receive_base.rb,
lib/osctld/send_receive/commands/receive_skel.rb,
lib/osctld/user_control/commands/ct_post_stop.rb,
lib/osctld/user_control/commands/ct_pre_mount.rb,
lib/osctld/user_control/commands/ct_pre_start.rb,
lib/osctld/commands/container/mount_deactivate.rb,
lib/osctld/commands/group/device_unset_inherit.rb,
lib/osctld/user_control/commands/ct_post_mount.rb,
lib/osctld/container_control/commands/runscript.rb,
lib/osctld/container_control/commands/veth_name.rb,
lib/osctld/send_receive/commands/receive_cancel.rb,
lib/osctld/commands/container/device_set_inherit.rb,
lib/osctld/send_receive/commands/receive_transfer.rb,
lib/osctld/user_control/commands/ct_wrapper_start.rb,
lib/osctld/commands/container/device_unset_inherit.rb,
lib/osctld/send_receive/commands/receive_incremental.rb

Defined Under Namespace

Modules: Assets, AutoStart, CGroup, Cli, Commands, Console, ContainerControl, DB, Devices, DistConfig, Generic, Lockable, Lxc, Manipulable, Monitor, Mount, NetInterface, PrLimits, Routing, RunState, SendReceive, SwitchUser, UserControl, Utils Classes: AppArmor, Attributes, CGroupFileNotFound, CGroupParameterNotFound, CGroupSubsystemNotFound, Command, CommandFailed, Container, ContinuousExecutor, Daemon, DeadlockDetected, DeviceDescendantRequiresMode, DeviceInUse, DeviceModeInsufficient, DeviceNotAvailable, ErbTemplate, EtcHosts, Event, Eventd, ExecutionPlan, Group, GroupNotFound, History, HookFailed, IdMap, IdRange, ImageNotFound, ImageRepositoryUnavailable, LockRegistry, MountInvalid, MountNotFound, NetConfig, OsCtlRepo, Pool, PoolExists, PoolUpgradeError, Repository, ResourceLocked, SystemLimits, SystemUsers, ThreadReaper, UGidRegistry, UnmountError, User

Constant Summary collapse

VERSION =
'19.03.0'
SystemCommandFailed =
OsCtl::Lib::Exceptions::SystemCommandFailed

Class Method Summary collapse

Class Method Details

.bin(name) ⇒ Object



41
42
43
# File 'lib/osctld.rb', line 41

def self.bin(name)
  File.absolute_path(File.join(root, 'bin', name))
end

.hook_run(name, pool) ⇒ Object



49
50
51
# File 'lib/osctld.rb', line 49

def self.hook_run(name, pool)
  File.join(pool.hook_dir, name)
end

.hook_src(name) ⇒ Object



45
46
47
# File 'lib/osctld.rb', line 45

def self.hook_src(name)
  File.absolute_path(File.join(root, 'hooks', name))
end

.rootObject



37
38
39
# File 'lib/osctld.rb', line 37

def self.root
  File.join(File.dirname(__FILE__), '..')
end

.script(name) ⇒ Object



53
54
55
# File 'lib/osctld.rb', line 53

def self.script(name)
  File.absolute_path(File.join(root, 'scripts', name))
end

.tpl(name) ⇒ Object



57
58
59
# File 'lib/osctld.rb', line 57

def self.tpl(name)
  File.absolute_path(File.join(root, 'templates', "#{name}.erb"))
end