diff options
author | Zuul <zuul@review.openstack.org> | 2017-11-09 03:21:14 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-11-09 03:21:14 +0000 |
commit | 9ed6fff5d6bf09cb21e3dfea1efb5e1ce047b014 (patch) | |
tree | a364ce06da05853c39c70a73f0cfa277daf477b1 | |
parent | 4ccebee06614d2791b2cb82acfa8b5244e8b3942 (diff) | |
parent | 59c410e6dd74b2bf4aaa36f36f172fd10481ea7c (diff) |
Merge "Unset MountFlags in docker.service systemd directives" into stable/pike
-rw-r--r-- | manifests/profile/base/docker.pp | 16 | ||||
-rw-r--r-- | spec/classes/tripleo_profile_base_docker_spec.rb | 7 |
2 files changed, 23 insertions, 0 deletions
diff --git a/manifests/profile/base/docker.pp b/manifests/profile/base/docker.pp index 73731ad..d3f6fe7 100644 --- a/manifests/profile/base/docker.pp +++ b/manifests/profile/base/docker.pp @@ -83,6 +83,22 @@ class tripleo::profile::base::docker ( ensure => installed, } + $docker_unit_override="[Service]\nMountFlags=\n" + + file {'/etc/systemd/system/docker.service.d': + ensure => directory, + require => Package['docker'], + } + -> file {'/etc/systemd/system/docker.service.d/99-unset-mountflags.conf': + content => $docker_unit_override, + } + ~> exec { 'systemd daemon-reload': + command => 'systemctl daemon-reload', + path => ['/usr/bin', '/usr/sbin'], + refreshonly => true, + notify => Service['docker'] + } + service { 'docker': ensure => 'running', enable => true, diff --git a/spec/classes/tripleo_profile_base_docker_spec.rb b/spec/classes/tripleo_profile_base_docker_spec.rb index 328948e..1b05b87 100644 --- a/spec/classes/tripleo_profile_base_docker_spec.rb +++ b/spec/classes/tripleo_profile_base_docker_spec.rb @@ -26,6 +26,7 @@ describe 'tripleo::profile::base::docker' do it { is_expected.to contain_class('tripleo::profile::base::docker') } it { is_expected.to contain_package('docker') } it { is_expected.to contain_service('docker') } + it { is_expected.to contain_file('/etc/systemd/system/docker.service.d/99-unset-mountflags.conf') } it { is_expected.to contain_augeas('docker-sysconfig-options').with_changes([ "set OPTIONS '\"--log-driver=journald --signature-verification=false --iptables=false\"'", @@ -43,6 +44,7 @@ describe 'tripleo::profile::base::docker' do it { is_expected.to contain_class('tripleo::profile::base::docker') } it { is_expected.to contain_package('docker') } it { is_expected.to contain_service('docker') } + it { is_expected.to contain_file('/etc/systemd/system/docker.service.d/99-unset-mountflags.conf') } it { is_expected.to contain_augeas('docker-sysconfig-registry').with_changes([ "set INSECURE_REGISTRY '\"--insecure-registry foo:8787\"'", @@ -81,6 +83,7 @@ describe 'tripleo::profile::base::docker' do it { is_expected.to contain_class('tripleo::profile::base::docker') } it { is_expected.to contain_package('docker') } it { is_expected.to contain_service('docker') } + it { is_expected.to contain_file('/etc/systemd/system/docker.service.d/99-unset-mountflags.conf') } it { is_expected.to contain_augeas('docker-daemon.json').with_changes( ['set dict/entry[. = "registry-mirrors"] "registry-mirrors', @@ -99,6 +102,7 @@ describe 'tripleo::profile::base::docker' do it { is_expected.to contain_class('tripleo::profile::base::docker') } it { is_expected.to contain_package('docker') } it { is_expected.to contain_service('docker') } + it { is_expected.to contain_file('/etc/systemd/system/docker.service.d/99-unset-mountflags.conf') } it { is_expected.to contain_augeas('docker-daemon.json').with_changes( ['rm dict/entry[. = "registry-mirrors"]', @@ -117,6 +121,7 @@ describe 'tripleo::profile::base::docker' do it { is_expected.to contain_class('tripleo::profile::base::docker') } it { is_expected.to contain_package('docker') } it { is_expected.to contain_service('docker') } + it { is_expected.to contain_file('/etc/systemd/system/docker.service.d/99-unset-mountflags.conf') } it { is_expected.to contain_augeas('docker-sysconfig-options').with_changes([ "set OPTIONS '\"--log-driver=syslog\"'", @@ -133,6 +138,7 @@ describe 'tripleo::profile::base::docker' do it { is_expected.to contain_class('tripleo::profile::base::docker') } it { is_expected.to contain_package('docker') } it { is_expected.to contain_service('docker') } + it { is_expected.to contain_file('/etc/systemd/system/docker.service.d/99-unset-mountflags.conf') } it { is_expected.to contain_augeas('docker-sysconfig-storage').with_changes([ "set DOCKER_STORAGE_OPTIONS '\" #{params[:storage_options]}\"'", @@ -149,6 +155,7 @@ describe 'tripleo::profile::base::docker' do it { is_expected.to contain_class('tripleo::profile::base::docker') } it { is_expected.to contain_package('docker') } it { is_expected.to contain_service('docker') } + it { is_expected.to contain_file('/etc/systemd/system/docker.service.d/99-unset-mountflags.conf') } it { is_expected.to contain_augeas('docker-sysconfig-storage').with_changes([ "rm DOCKER_STORAGE_OPTIONS", |