Skip to content

Commit 6342dde

Browse files
committed
Merge branch 'rybushkindmitry-task--add-sysctls-feature'
2 parents 8a25c29 + 123db0a commit 6342dde

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/tasks.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ with the `bind` and `mode` keys, otherwise an exception is raised.
123123
* `extra_hosts`: a dictionary of additional hosts that should be added to the
124124
container's `/etc/hosts` file; the keys are the hostnames, and the values
125125
are the IP addresses;
126+
* `sysctls`: a dictionary of kernel sysctl parameters to add to the container;
127+
keys are the names of the kernel parameters and values are their values;
126128

127129
You can find the specific settings for each task type in their corresponding
128130
file in the [tasks](tasks) directory.

sipssert/task.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def __init__(self, test_dir, configuration):
5858
self.healthcheck = self.config.get("healthcheck", {"test": []})
5959
self.checklogs = self.get_checklogs()
6060
self.extra_hosts = self.config.get("extra_hosts", {})
61+
self.sysctls = self.config.get("sysctls", {})
6162
self.deps = dependencies.parse_dependencies(self.config.get("require"))
6263
# keep this for backwards compatibility
6364
self.delay_start = self.config.get("delay_start", 0)
@@ -169,7 +170,8 @@ def create(self, controller, prefix=None):
169170
'environment': env,
170171
'stop_signal': self.stop_signal,
171172
'network_mode': self.host_network,
172-
'extra_hosts': self.extra_hosts
173+
'extra_hosts': self.extra_hosts,
174+
'sysctls': self.sysctls
173175
}
174176

175177
self.log.info("container {} prepared".format(self.container_name))

0 commit comments

Comments
 (0)