Skip to content

Commit

Permalink
etcd: exclude performance tuning (nice/ionice) for containers
Browse files Browse the repository at this point in the history
etcd: exclude performance tuning (nice/ionice) for containers ('docker', 'lxc', 'podman') to prevent test failures in CI.

Fixed:

Mar 01 13:22:40 dcs-node01 systemd[1]: Starting Etcd Server...
Mar 01 13:22:40 dcs-node01 systemd[2273]: etcd.service: Failed to set up IO scheduling priority: Operation not permitted
Mar 01 13:22:40 dcs-node01 systemd[2273]: etcd.service: Failed at step IOPRIO spawning /bin/bash: Operation not permitted
Mar 01 13:22:40 dcs-node01 systemd[1]: etcd.service: Main process exited, code=exited, status=211/IOPRIO
Mar 01 13:22:40 dcs-node01 systemd[1]: etcd.service: Failed with result 'exit-code'.
Mar 01 13:22:40 dcs-node01 systemd[1]: Failed to start Etcd Server.

previous commit:

2f41e80
  • Loading branch information
vitabaks committed Mar 1, 2023
1 parent 827458b commit cc2bd54
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions roles/etcd/templates/etcd.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Description=Etcd Server
After=network.target
After=network-online.target
Wants=network-online.target

[Service]
Type=notify
WorkingDirectory={{ etcd_data_dir }}
Expand All @@ -13,9 +13,12 @@ User=etcd
ExecStart=/bin/bash -c "GOMAXPROCS=$(nproc) /usr/local/bin/etcd"
Restart=on-failure
LimitNOFILE=65536

{% if ansible_virtualization_type not in ['docker', 'lxc', 'podman'] %}
IOSchedulingClass=realtime
IOSchedulingPriority=0
Nice=-20

{% endif %}

[Install]
WantedBy=multi-user.target

0 comments on commit cc2bd54

Please sign in to comment.