(rpcOpts *criurpc.CriuOpts)
| 147 | } |
| 148 | |
| 149 | func (c *Container) handleCriuConfigurationFile(rpcOpts *criurpc.CriuOpts) { |
| 150 | // CRIU will evaluate a configuration starting with release 3.11. |
| 151 | // Settings in the configuration file will overwrite RPC settings. |
| 152 | // Look for annotations. The annotation 'org.criu.config' |
| 153 | // specifies if CRIU should use a different, container specific |
| 154 | // configuration file. |
| 155 | configFile, exists := utils.SearchLabels(c.config.Labels, "org.criu.config") |
| 156 | if exists { |
| 157 | // If the annotation 'org.criu.config' exists and is set |
| 158 | // to a non-empty string, tell CRIU to use that as a |
| 159 | // configuration file. If the file does not exist, CRIU |
| 160 | // will just ignore it. |
| 161 | if configFile != "" { |
| 162 | rpcOpts.ConfigFile = mkPtr(configFile) |
| 163 | } |
| 164 | // If 'org.criu.config' exists and is set to an empty |
| 165 | // string, a runc specific CRIU configuration file will |
| 166 | // be not set at all. |
| 167 | } else { |
| 168 | // If the mentioned annotation has not been found, specify |
| 169 | // a default CRIU configuration file. |
| 170 | rpcOpts.ConfigFile = mkPtr("/etc/criu/runc.conf") |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | func (c *Container) criuSupportsExtNS(t configs.NamespaceType) bool { |
| 175 | var minVersion int |
no test coverage detected