
Swift should mirror other roles and use a list instead of a dictionary for it's filtered_services. This patch makes that change. Change-Id: Ie6bf282a36ed63d73996447a88c3c5f6056465a7
43 lines
1.2 KiB
Django/Jinja
43 lines
1.2 KiB
Django/Jinja
# {{ ansible_managed }}
|
|
[Unit]
|
|
Description=swift openstack service
|
|
After=syslog.target
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User={{ swift_system_user_name }}
|
|
Group={{ swift_system_group_name }}
|
|
LimitNOFILE={{ swift_soft_open_file_limits }}:{{ swift_hard_open_file_limits }}
|
|
|
|
{% if swift_pypy_enabled %}
|
|
{% if swift_pypy_gc_min is defined %}
|
|
Environment=PYPY_GC_MIN={{ swift_pypy_gc_min }}
|
|
{% endif %}
|
|
{% if swift_pypy_gc_max is defined %}
|
|
Environment=PYPY_GC_MAX={{ swift_pypy_gc_max }}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if item.program_override is defined %}
|
|
ExecStart={{ item.program_override }} {{ item.program_config_options|default('') }}
|
|
{% else %}
|
|
ExecStart={{ swift_bin }}/{{ item.program_binary | default(item.program_name) }} {{ item.program_config_options|default('') }}
|
|
{% endif %}
|
|
|
|
# Give a reasonable amount of time for the server to start up/shut down
|
|
TimeoutSec=120
|
|
Restart=on-failure
|
|
RestartSec=2
|
|
|
|
# This creates a specific slice which all services will operate from
|
|
# The accounting options give us the ability to see resource usage through
|
|
# the `systemd-cgtop` command.
|
|
Slice=swift.slice
|
|
CPUAccounting=true
|
|
BlockIOAccounting=true
|
|
MemoryAccounting=false
|
|
TasksAccounting=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|