From ee5301929877a5330b93f99e1ca5958ca5963eb5 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Thu, 22 Jun 2017 13:38:46 +0200 Subject: Split docker options and insecure registry Use augeas to modify only parameters' dedicated configuration. Split options from insecure registry. Overlapping those params may unschedule the docker service restarts for some cases, ending up with a split brain state for the docker service run-time config vs changed /etc/sysconfig/options config. Change-Id: Ic5640061837b022f7175f0db0dc269f9a61e6023 Signed-off-by: Bogdan Dobrelya --- spec/classes/tripleo_profile_base_docker_spec.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'spec/classes') diff --git a/spec/classes/tripleo_profile_base_docker_spec.rb b/spec/classes/tripleo_profile_base_docker_spec.rb index bb21055..dc5efa7 100644 --- a/spec/classes/tripleo_profile_base_docker_spec.rb +++ b/spec/classes/tripleo_profile_base_docker_spec.rb @@ -27,8 +27,7 @@ describe 'tripleo::profile::base::docker' do it { is_expected.to contain_package('docker') } it { is_expected.to contain_service('docker') } it { - is_expected.to contain_augeas('docker-sysconfig').with_changes([ - 'rm INSECURE_REGISTRY', + is_expected.to contain_augeas('docker-sysconfig-options').with_changes([ "set OPTIONS '\"--log-driver=journald --signature-verification=false\"'", ]) } @@ -45,9 +44,8 @@ describe 'tripleo::profile::base::docker' do it { is_expected.to contain_package('docker') } it { is_expected.to contain_service('docker') } it { - is_expected.to contain_augeas('docker-sysconfig').with_changes([ + is_expected.to contain_augeas('docker-sysconfig-registry').with_changes([ "set INSECURE_REGISTRY '\"--insecure-registry foo:8787\"'", - "set OPTIONS '\"--log-driver=journald --signature-verification=false\"'", ]) } end @@ -85,8 +83,7 @@ describe 'tripleo::profile::base::docker' do it { is_expected.to contain_package('docker') } it { is_expected.to contain_service('docker') } it { - is_expected.to contain_augeas('docker-sysconfig').with_changes([ - "rm INSECURE_REGISTRY", + is_expected.to contain_augeas('docker-sysconfig-options').with_changes([ "set OPTIONS '\"--log-driver=syslog\"'", ]) } -- cgit 1.2.3-korg