daemon_solaris.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. // +build solaris,cgo
  2. package daemon
  3. import (
  4. "fmt"
  5. "net"
  6. "strconv"
  7. "github.com/docker/docker/api/types"
  8. containertypes "github.com/docker/docker/api/types/container"
  9. "github.com/docker/docker/container"
  10. "github.com/docker/docker/daemon/config"
  11. "github.com/docker/docker/image"
  12. "github.com/docker/docker/pkg/containerfs"
  13. "github.com/docker/docker/pkg/fileutils"
  14. "github.com/docker/docker/pkg/idtools"
  15. "github.com/docker/docker/pkg/parsers/kernel"
  16. "github.com/docker/docker/pkg/sysinfo"
  17. "github.com/docker/libnetwork"
  18. nwconfig "github.com/docker/libnetwork/config"
  19. "github.com/docker/libnetwork/drivers/solaris/bridge"
  20. "github.com/docker/libnetwork/netlabel"
  21. "github.com/docker/libnetwork/netutils"
  22. lntypes "github.com/docker/libnetwork/types"
  23. specs "github.com/opencontainers/runtime-spec/specs-go"
  24. "github.com/opencontainers/selinux/go-selinux/label"
  25. "github.com/pkg/errors"
  26. "github.com/sirupsen/logrus"
  27. )
  28. //#include <zone.h>
  29. import "C"
  30. const (
  31. platformSupported = true
  32. solarisMinCPUShares = 1
  33. solarisMaxCPUShares = 65535
  34. )
  35. func getMemoryResources(config containertypes.Resources) specs.CappedMemory {
  36. memory := specs.CappedMemory{
  37. DisableOOMKiller: config.OomKillDisable,
  38. }
  39. if config.Memory > 0 {
  40. memory.Physical = strconv.FormatInt(config.Memory, 10)
  41. }
  42. if config.MemorySwap != 0 {
  43. memory.Swap = strconv.FormatInt(config.MemorySwap, 10)
  44. }
  45. return memory
  46. }
  47. func getCPUResources(config containertypes.Resources) specs.CappedCPU {
  48. cpu := specs.CappedCPU{}
  49. if config.CpusetCpus != "" {
  50. cpu.Ncpus = config.CpusetCpus
  51. }
  52. return cpu
  53. }
  54. func (daemon *Daemon) cleanupMountsByID(id string) error {
  55. return nil
  56. }
  57. func (daemon *Daemon) parseSecurityOpt(container *container.Container, hostConfig *containertypes.HostConfig) error {
  58. return parseSecurityOpt(container, hostConfig)
  59. }
  60. func parseSecurityOpt(container *container.Container, config *containertypes.HostConfig) error {
  61. //Since hostConfig.SecurityOpt is specifically defined as a "List of string values to
  62. //customize labels for MLs systems, such as SELinux"
  63. //until we figure out how to map to Trusted Extensions
  64. //this is being disabled for now on Solaris
  65. var (
  66. labelOpts []string
  67. err error
  68. )
  69. if len(config.SecurityOpt) > 0 {
  70. return errors.New("Security options are not supported on Solaris")
  71. }
  72. container.ProcessLabel, container.MountLabel, err = label.InitLabels(labelOpts)
  73. return err
  74. }
  75. func setupRemappedRoot(config *config.Config) (*idtools.IDMappings, error) {
  76. return nil, nil
  77. }
  78. func setupDaemonRoot(config *config.Config, rootDir string, rootIDs idtools.IDPair) error {
  79. return nil
  80. }
  81. func (daemon *Daemon) getLayerInit() func(containerfs.ContainerFS) error {
  82. return nil
  83. }
  84. func checkKernel() error {
  85. // solaris can rely upon checkSystem() below, we don't skew kernel versions
  86. return nil
  87. }
  88. func (daemon *Daemon) getCgroupDriver() string {
  89. return ""
  90. }
  91. func (daemon *Daemon) adaptContainerSettings(hostConfig *containertypes.HostConfig, adjustCPUShares bool) error {
  92. if hostConfig.CPUShares < 0 {
  93. logrus.Warnf("Changing requested CPUShares of %d to minimum allowed of %d", hostConfig.CPUShares, solarisMinCPUShares)
  94. hostConfig.CPUShares = solarisMinCPUShares
  95. } else if hostConfig.CPUShares > solarisMaxCPUShares {
  96. logrus.Warnf("Changing requested CPUShares of %d to maximum allowed of %d", hostConfig.CPUShares, solarisMaxCPUShares)
  97. hostConfig.CPUShares = solarisMaxCPUShares
  98. }
  99. if hostConfig.Memory > 0 && hostConfig.MemorySwap == 0 {
  100. // By default, MemorySwap is set to twice the size of Memory.
  101. hostConfig.MemorySwap = hostConfig.Memory * 2
  102. }
  103. if hostConfig.ShmSize != 0 {
  104. hostConfig.ShmSize = container.DefaultSHMSize
  105. }
  106. if hostConfig.OomKillDisable == nil {
  107. defaultOomKillDisable := false
  108. hostConfig.OomKillDisable = &defaultOomKillDisable
  109. }
  110. return nil
  111. }
  112. // UsingSystemd returns true if cli option includes native.cgroupdriver=systemd
  113. func UsingSystemd(config *config.Config) bool {
  114. return false
  115. }
  116. // verifyPlatformContainerSettings performs platform-specific validation of the
  117. // hostconfig and config structures.
  118. func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes.HostConfig, config *containertypes.Config, update bool) ([]string, error) {
  119. fixMemorySwappiness(resources)
  120. warnings := []string{}
  121. sysInfo := sysinfo.New(true)
  122. // NOTE: We do not enforce a minimum value for swap limits for zones on Solaris and
  123. // therefore we will not do that for Docker container either.
  124. if hostConfig.Memory > 0 && !sysInfo.MemoryLimit {
  125. warnings = append(warnings, "Your kernel does not support memory limit capabilities. Limitation discarded.")
  126. logrus.Warnf("Your kernel does not support memory limit capabilities. Limitation discarded.")
  127. hostConfig.Memory = 0
  128. hostConfig.MemorySwap = -1
  129. }
  130. if hostConfig.Memory > 0 && hostConfig.MemorySwap != -1 && !sysInfo.SwapLimit {
  131. warnings = append(warnings, "Your kernel does not support swap limit capabilities, memory limited without swap.")
  132. logrus.Warnf("Your kernel does not support swap limit capabilities, memory limited without swap.")
  133. hostConfig.MemorySwap = -1
  134. }
  135. if hostConfig.Memory > 0 && hostConfig.MemorySwap > 0 && hostConfig.MemorySwap < hostConfig.Memory {
  136. return warnings, fmt.Errorf("Minimum memoryswap limit should be larger than memory limit, see usage.")
  137. }
  138. // Solaris NOTE: We allow and encourage setting the swap without setting the memory limit.
  139. if hostConfig.MemorySwappiness != nil && !sysInfo.MemorySwappiness {
  140. warnings = append(warnings, "Your kernel does not support memory swappiness capabilities, memory swappiness discarded.")
  141. logrus.Warnf("Your kernel does not support memory swappiness capabilities, memory swappiness discarded.")
  142. hostConfig.MemorySwappiness = nil
  143. }
  144. if hostConfig.MemoryReservation > 0 && !sysInfo.MemoryReservation {
  145. warnings = append(warnings, "Your kernel does not support memory soft limit capabilities. Limitation discarded.")
  146. logrus.Warnf("Your kernel does not support memory soft limit capabilities. Limitation discarded.")
  147. hostConfig.MemoryReservation = 0
  148. }
  149. if hostConfig.Memory > 0 && hostConfig.MemoryReservation > 0 && hostConfig.Memory < hostConfig.MemoryReservation {
  150. return warnings, fmt.Errorf("Minimum memory limit should be larger than memory reservation limit, see usage.")
  151. }
  152. if hostConfig.KernelMemory > 0 && !sysInfo.KernelMemory {
  153. warnings = append(warnings, "Your kernel does not support kernel memory limit capabilities. Limitation discarded.")
  154. logrus.Warnf("Your kernel does not support kernel memory limit capabilities. Limitation discarded.")
  155. hostConfig.KernelMemory = 0
  156. }
  157. if hostConfig.CPUShares != 0 && !sysInfo.CPUShares {
  158. warnings = append(warnings, "Your kernel does not support CPU shares. Shares discarded.")
  159. logrus.Warnf("Your kernel does not support CPU shares. Shares discarded.")
  160. hostConfig.CPUShares = 0
  161. }
  162. if hostConfig.CPUShares < 0 {
  163. warnings = append(warnings, "Invalid CPUShares value. Must be positive. Discarding.")
  164. logrus.Warnf("Invalid CPUShares value. Must be positive. Discarding.")
  165. hostConfig.CPUQuota = 0
  166. }
  167. if hostConfig.CPUShares > 0 && !sysinfo.IsCPUSharesAvailable() {
  168. warnings = append(warnings, "Global zone default scheduling class not FSS. Discarding shares.")
  169. logrus.Warnf("Global zone default scheduling class not FSS. Discarding shares.")
  170. hostConfig.CPUShares = 0
  171. }
  172. // Solaris NOTE: Linux does not do negative checking for CPUShares and Quota here. But it makes sense to.
  173. if hostConfig.CPUPeriod > 0 && !sysInfo.CPUCfsPeriod {
  174. warnings = append(warnings, "Your kernel does not support CPU cfs period. Period discarded.")
  175. logrus.Warnf("Your kernel does not support CPU cfs period. Period discarded.")
  176. if hostConfig.CPUQuota > 0 {
  177. warnings = append(warnings, "Quota will be applied on default period, not period specified.")
  178. logrus.Warnf("Quota will be applied on default period, not period specified.")
  179. }
  180. hostConfig.CPUPeriod = 0
  181. }
  182. if hostConfig.CPUQuota != 0 && !sysInfo.CPUCfsQuota {
  183. warnings = append(warnings, "Your kernel does not support CPU cfs quota. Quota discarded.")
  184. logrus.Warnf("Your kernel does not support CPU cfs quota. Quota discarded.")
  185. hostConfig.CPUQuota = 0
  186. }
  187. if hostConfig.CPUQuota < 0 {
  188. warnings = append(warnings, "Invalid CPUQuota value. Must be positive. Discarding.")
  189. logrus.Warnf("Invalid CPUQuota value. Must be positive. Discarding.")
  190. hostConfig.CPUQuota = 0
  191. }
  192. if (hostConfig.CpusetCpus != "" || hostConfig.CpusetMems != "") && !sysInfo.Cpuset {
  193. warnings = append(warnings, "Your kernel does not support cpuset. Cpuset discarded.")
  194. logrus.Warnf("Your kernel does not support cpuset. Cpuset discarded.")
  195. hostConfig.CpusetCpus = ""
  196. hostConfig.CpusetMems = ""
  197. }
  198. cpusAvailable, err := sysInfo.IsCpusetCpusAvailable(hostConfig.CpusetCpus)
  199. if err != nil {
  200. return warnings, fmt.Errorf("Invalid value %s for cpuset cpus.", hostConfig.CpusetCpus)
  201. }
  202. if !cpusAvailable {
  203. return warnings, fmt.Errorf("Requested CPUs are not available - requested %s, available: %s.", hostConfig.CpusetCpus, sysInfo.Cpus)
  204. }
  205. memsAvailable, err := sysInfo.IsCpusetMemsAvailable(hostConfig.CpusetMems)
  206. if err != nil {
  207. return warnings, fmt.Errorf("Invalid value %s for cpuset mems.", hostConfig.CpusetMems)
  208. }
  209. if !memsAvailable {
  210. return warnings, fmt.Errorf("Requested memory nodes are not available - requested %s, available: %s.", hostConfig.CpusetMems, sysInfo.Mems)
  211. }
  212. if hostConfig.BlkioWeight > 0 && !sysInfo.BlkioWeight {
  213. warnings = append(warnings, "Your kernel does not support Block I/O weight. Weight discarded.")
  214. logrus.Warnf("Your kernel does not support Block I/O weight. Weight discarded.")
  215. hostConfig.BlkioWeight = 0
  216. }
  217. if hostConfig.OomKillDisable != nil && !sysInfo.OomKillDisable {
  218. *hostConfig.OomKillDisable = false
  219. // Don't warn; this is the default setting but only applicable to Linux
  220. }
  221. if sysInfo.IPv4ForwardingDisabled {
  222. warnings = append(warnings, "IPv4 forwarding is disabled. Networking will not work.")
  223. logrus.Warnf("IPv4 forwarding is disabled. Networking will not work")
  224. }
  225. // Solaris NOTE: We do not allow setting Linux specific options, so check and warn for all of them.
  226. if hostConfig.CapAdd != nil || hostConfig.CapDrop != nil {
  227. warnings = append(warnings, "Adding or dropping kernel capabilities unsupported on Solaris.Discarding capabilities lists.")
  228. logrus.Warnf("Adding or dropping kernel capabilities unsupported on Solaris.Discarding capabilities lists.")
  229. hostConfig.CapAdd = nil
  230. hostConfig.CapDrop = nil
  231. }
  232. if hostConfig.GroupAdd != nil {
  233. warnings = append(warnings, "Additional groups unsupported on Solaris.Discarding groups lists.")
  234. logrus.Warnf("Additional groups unsupported on Solaris.Discarding groups lists.")
  235. hostConfig.GroupAdd = nil
  236. }
  237. if hostConfig.IpcMode != "" {
  238. warnings = append(warnings, "IPC namespace assignment unsupported on Solaris.Discarding IPC setting.")
  239. logrus.Warnf("IPC namespace assignment unsupported on Solaris.Discarding IPC setting.")
  240. hostConfig.IpcMode = ""
  241. }
  242. if hostConfig.PidMode != "" {
  243. warnings = append(warnings, "PID namespace setting unsupported on Solaris. Running container in host PID namespace.")
  244. logrus.Warnf("PID namespace setting unsupported on Solaris. Running container in host PID namespace.")
  245. hostConfig.PidMode = ""
  246. }
  247. if hostConfig.Privileged {
  248. warnings = append(warnings, "Privileged mode unsupported on Solaris. Discarding privileged mode setting.")
  249. logrus.Warnf("Privileged mode unsupported on Solaris. Discarding privileged mode setting.")
  250. hostConfig.Privileged = false
  251. }
  252. if hostConfig.UTSMode != "" {
  253. warnings = append(warnings, "UTS namespace assignment unsupported on Solaris.Discarding UTS setting.")
  254. logrus.Warnf("UTS namespace assignment unsupported on Solaris.Discarding UTS setting.")
  255. hostConfig.UTSMode = ""
  256. }
  257. if hostConfig.CgroupParent != "" {
  258. warnings = append(warnings, "Specifying Cgroup parent unsupported on Solaris. Discarding cgroup parent setting.")
  259. logrus.Warnf("Specifying Cgroup parent unsupported on Solaris. Discarding cgroup parent setting.")
  260. hostConfig.CgroupParent = ""
  261. }
  262. if hostConfig.Ulimits != nil {
  263. warnings = append(warnings, "Specifying ulimits unsupported on Solaris. Discarding ulimits setting.")
  264. logrus.Warnf("Specifying ulimits unsupported on Solaris. Discarding ulimits setting.")
  265. hostConfig.Ulimits = nil
  266. }
  267. return warnings, nil
  268. }
  269. // reloadPlatform updates configuration with platform specific options
  270. // and updates the passed attributes
  271. func (daemon *Daemon) reloadPlatform(conf *config.Config, attributes map[string]string) error {
  272. return nil
  273. }
  274. // verifyDaemonSettings performs validation of daemon config struct
  275. func verifyDaemonSettings(conf *config.Config) error {
  276. if conf.DefaultRuntime == "" {
  277. conf.DefaultRuntime = stockRuntimeName
  278. }
  279. if conf.Runtimes == nil {
  280. conf.Runtimes = make(map[string]types.Runtime)
  281. }
  282. stockRuntimeOpts := []string{}
  283. conf.Runtimes[stockRuntimeName] = types.Runtime{Path: DefaultRuntimeBinary, Args: stockRuntimeOpts}
  284. return nil
  285. }
  286. // checkSystem validates platform-specific requirements
  287. func checkSystem() error {
  288. // check OS version for compatibility, ensure running in global zone
  289. var err error
  290. var id C.zoneid_t
  291. if id, err = C.getzoneid(); err != nil {
  292. return fmt.Errorf("Exiting. Error getting zone id: %+v", err)
  293. }
  294. if int(id) != 0 {
  295. return fmt.Errorf("Exiting because the Docker daemon is not running in the global zone")
  296. }
  297. v, err := kernel.GetKernelVersion()
  298. if kernel.CompareKernelVersion(*v, kernel.VersionInfo{Kernel: 5, Major: 12, Minor: 0}) < 0 {
  299. return fmt.Errorf("Your Solaris kernel version: %s doesn't support Docker. Please upgrade to 5.12.0", v.String())
  300. }
  301. return err
  302. }
  303. // configureMaxThreads sets the Go runtime max threads threshold
  304. // which is 90% of the kernel setting from /proc/sys/kernel/threads-max
  305. func configureMaxThreads(config *config.Config) error {
  306. return nil
  307. }
  308. // configureKernelSecuritySupport configures and validates security support for the kernel
  309. func configureKernelSecuritySupport(config *config.Config, driverNames []string) error {
  310. return nil
  311. }
  312. func (daemon *Daemon) initNetworkController(config *config.Config, activeSandboxes map[string]interface{}) (libnetwork.NetworkController, error) {
  313. netOptions, err := daemon.networkOptions(config, daemon.PluginStore, activeSandboxes)
  314. if err != nil {
  315. return nil, err
  316. }
  317. controller, err := libnetwork.New(netOptions...)
  318. if err != nil {
  319. return nil, fmt.Errorf("error obtaining controller instance: %v", err)
  320. }
  321. // Initialize default network on "null"
  322. if _, err := controller.NewNetwork("null", "none", "", libnetwork.NetworkOptionPersist(false)); err != nil {
  323. return nil, fmt.Errorf("Error creating default 'null' network: %v", err)
  324. }
  325. if !config.DisableBridge {
  326. // Initialize default driver "bridge"
  327. if err := initBridgeDriver(controller, config); err != nil {
  328. return nil, err
  329. }
  330. }
  331. return controller, nil
  332. }
  333. func initBridgeDriver(controller libnetwork.NetworkController, config *config.Config) error {
  334. if n, err := controller.NetworkByName("bridge"); err == nil {
  335. if err = n.Delete(); err != nil {
  336. return fmt.Errorf("could not delete the default bridge network: %v", err)
  337. }
  338. }
  339. bridgeName := bridge.DefaultBridgeName
  340. if config.bridgeConfig.Iface != "" {
  341. bridgeName = config.bridgeConfig.Iface
  342. }
  343. netOption := map[string]string{
  344. bridge.BridgeName: bridgeName,
  345. bridge.DefaultBridge: strconv.FormatBool(true),
  346. netlabel.DriverMTU: strconv.Itoa(config.Mtu),
  347. bridge.EnableICC: strconv.FormatBool(config.bridgeConfig.InterContainerCommunication),
  348. }
  349. // --ip processing
  350. if config.bridgeConfig.DefaultIP != nil {
  351. netOption[bridge.DefaultBindingIP] = config.bridgeConfig.DefaultIP.String()
  352. }
  353. var ipamV4Conf *libnetwork.IpamConf
  354. ipamV4Conf = &libnetwork.IpamConf{AuxAddresses: make(map[string]string)}
  355. nwList, _, err := netutils.ElectInterfaceAddresses(bridgeName)
  356. if err != nil {
  357. return errors.Wrap(err, "list bridge addresses failed")
  358. }
  359. nw := nwList[0]
  360. if len(nwList) > 1 && config.bridgeConfig.FixedCIDR != "" {
  361. _, fCIDR, err := net.ParseCIDR(config.bridgeConfig.FixedCIDR)
  362. if err != nil {
  363. return errors.Wrap(err, "parse CIDR failed")
  364. }
  365. // Iterate through in case there are multiple addresses for the bridge
  366. for _, entry := range nwList {
  367. if fCIDR.Contains(entry.IP) {
  368. nw = entry
  369. break
  370. }
  371. }
  372. }
  373. ipamV4Conf.PreferredPool = lntypes.GetIPNetCanonical(nw).String()
  374. hip, _ := lntypes.GetHostPartIP(nw.IP, nw.Mask)
  375. if hip.IsGlobalUnicast() {
  376. ipamV4Conf.Gateway = nw.IP.String()
  377. }
  378. if config.bridgeConfig.IP != "" {
  379. ipamV4Conf.PreferredPool = config.bridgeConfig.IP
  380. ip, _, err := net.ParseCIDR(config.bridgeConfig.IP)
  381. if err != nil {
  382. return err
  383. }
  384. ipamV4Conf.Gateway = ip.String()
  385. } else if bridgeName == bridge.DefaultBridgeName && ipamV4Conf.PreferredPool != "" {
  386. logrus.Infof("Default bridge (%s) is assigned with an IP address %s. Daemon option --bip can be used to set a preferred IP address", bridgeName, ipamV4Conf.PreferredPool)
  387. }
  388. if config.bridgeConfig.FixedCIDR != "" {
  389. _, fCIDR, err := net.ParseCIDR(config.bridgeConfig.FixedCIDR)
  390. if err != nil {
  391. return err
  392. }
  393. ipamV4Conf.SubPool = fCIDR.String()
  394. }
  395. if config.bridgeConfig.DefaultGatewayIPv4 != nil {
  396. ipamV4Conf.AuxAddresses["DefaultGatewayIPv4"] = config.bridgeConfig.DefaultGatewayIPv4.String()
  397. }
  398. v4Conf := []*libnetwork.IpamConf{ipamV4Conf}
  399. v6Conf := []*libnetwork.IpamConf{}
  400. // Initialize default network on "bridge" with the same name
  401. _, err = controller.NewNetwork("bridge", "bridge", "",
  402. libnetwork.NetworkOptionDriverOpts(netOption),
  403. libnetwork.NetworkOptionIpam("default", "", v4Conf, v6Conf, nil),
  404. libnetwork.NetworkOptionDeferIPv6Alloc(false))
  405. if err != nil {
  406. return fmt.Errorf("Error creating default 'bridge' network: %v", err)
  407. }
  408. return nil
  409. }
  410. // registerLinks sets up links between containers and writes the
  411. // configuration out for persistence.
  412. func (daemon *Daemon) registerLinks(container *container.Container, hostConfig *containertypes.HostConfig) error {
  413. return nil
  414. }
  415. func (daemon *Daemon) cleanupMounts() error {
  416. return nil
  417. }
  418. // conditionalMountOnStart is a platform specific helper function during the
  419. // container start to call mount.
  420. func (daemon *Daemon) conditionalMountOnStart(container *container.Container) error {
  421. return daemon.Mount(container)
  422. }
  423. // conditionalUnmountOnCleanup is a platform specific helper function called
  424. // during the cleanup of a container to unmount.
  425. func (daemon *Daemon) conditionalUnmountOnCleanup(container *container.Container) error {
  426. return daemon.Unmount(container)
  427. }
  428. func driverOptions(config *config.Config) []nwconfig.Option {
  429. return []nwconfig.Option{}
  430. }
  431. func (daemon *Daemon) stats(c *container.Container) (*types.StatsJSON, error) {
  432. return nil, nil
  433. }
  434. // setDefaultIsolation determine the default isolation mode for the
  435. // daemon to run in. This is only applicable on Windows
  436. func (daemon *Daemon) setDefaultIsolation() error {
  437. return nil
  438. }
  439. func rootFSToAPIType(rootfs *image.RootFS) types.RootFS {
  440. return types.RootFS{}
  441. }
  442. func setupDaemonProcess(config *config.Config) error {
  443. return nil
  444. }
  445. func (daemon *Daemon) setupSeccompProfile() error {
  446. return nil
  447. }
  448. func getRealPath(path string) (string, error) {
  449. return fileutils.ReadSymlinkedDirectory(path)
  450. }