Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
rename variables from DOCKER_ to MANTL_
Browse files Browse the repository at this point in the history
  • Loading branch information
avnik committed Mar 31, 2016
1 parent d7df323 commit 8c380f3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion roles/docker/files/20-ExecStart.conf.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon $OPTIONS \
$DOCKER_STORAGE_OPTIONS \
$MANTL_STORAGE_OPTIONS \
$DOCKER_NETWORK_OPTIONS \
$ADD_REGISTRY \
$BLOCK_REGISTRY \
Expand Down
4 changes: 2 additions & 2 deletions roles/docker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
- 12-network-options.conf
- 14-storage-options.conf
notify:
- reload docker
- reload systemd
tags:
- docker

Expand All @@ -95,7 +95,7 @@
src: 20-ExecStart.conf.j2
dest: /etc/systemd/system/docker.service.d/20-ExecStart.conf
notify:
- reload docker
- reload systemd
tags:
- docker

Expand Down
2 changes: 1 addition & 1 deletion roles/docker/templates/14-storage-options.conf.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# /etc/systemd/systemd/docker.service.d/14-storage-options.conf
[Service]
Environment='DOCKER_STORAGE_OPTIONS=--storage-driver={{ docker_storage_driver }}'
EnvironmentFile=/etc/sysconfig/mantl-storage
5 changes: 3 additions & 2 deletions roles/docker/templates/docker-volume.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ mount = {{ docker_volume_mount }}
required_by = docker-storage-setup.service docker.service

[write:config]
file = /etc/sysconfig/docker-storage
content = DOCKER_STORAGE_OPTIONS=--storage-driver {{ docker_storage_driver }}
file = /etc/sysconfig/mantl-storage
content = MANTL_STORAGE_OPTIONS=--storage-driver {{ docker_storage_driver }}
{% endif %}
{%if docker_lvm_backed|bool and docker_storage_driver == "devicemapper" %}
[thin:docker]
group = {{ volume_group_name }}
# Fixed volume name, to be compatible with docker-storage-setup
pool = docker-pool
size = {{ docker_lvm_data_volume_size }}
config = /etc/sysconfig/mantl-storage

{% endif %}
10 changes: 6 additions & 4 deletions roles/lvm/files/mantl-storage-setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,12 @@ def process_thin(sec, params):
with closing(open(dm_name, "r")) as f:
mapper_device = f.readline().strip()

DOCKER_STORAGE_CONF = "/etc/sysconfig/docker-storage"
print "--> Write {}".format(DOCKER_STORAGE_CONF)
with closing(open(DOCKER_STORAGE_CONF, "w")) as f:
f.write("""DOCKER_STORAGE_OPTIONS=--storage-driver devicemapper --storage-opt dm.thinpooldev=/dev/mapper/{mapper} {extra}""".format(mapper=mapper_device, extra=extra))
DOCKER_STORAGE_CONF = "/etc/sysconfig/mantl-storage"
conf = optional(params.get, sec, "config", DOCKER_STORAGE_CONF)
print "--> Write {}".format(conf)
with closing(open(conf, "w")) as f:
f.write("""MANTL_STORAGE_OPTIONS=--storage-driver devicemapper --storage-opt dm.thinpooldev=/dev/mapper/{mapper} {extra}""".format(mapper=mapper_device, extra=extra))
check_call(["systemctl", "daemon-reload"])



Expand Down

0 comments on commit 8c380f3

Please sign in to comment.