Set tcp_tw_reuse for swift storage hosts

For swift storage hosts we are seeing a lot of connections in TIME WAIT
status, violating nf_conntrack. Setting tcp_tw_reuse should help
alleviate this.

Additionally, in order for tcp_tw_reuse to be set safely we need to
ensure nf_conntrack is loaded.

Change-Id: I4392c4022a9a5a884d07eb6fbf27093f0b16f914
Closes-Bug: #1441363
This commit is contained in:
Andy McCrae 2015-04-24 11:34:02 +01:00 committed by Kevin Carter
parent 3360e5f2a8
commit d1cd6a9617

View File

@ -13,6 +13,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: "Enable nf_conntrack"
modprobe:
name: "nf_conntrack"
state: present
- name: "Set sysctl tcp_tw_reuse"
sysctl:
name: "net.ipv4.tcp_tw_reuse"
state: present
value: "1"
sysctl_set: yes
# We need swift_vars to exist for the "swift_vars.drives is defined check" to work
- name: "Set swift_vars if undefined"
set_fact: