Make sure redis urls are hidden
This makes sure that the parameters which accept redis url are hidden from logs, because redis url can contain password as a URL element. example: redis://:password@127.0.0.1:6379 Closes-Bug: #2012246 Change-Id: Ief97f9e28ed7e318b56b27f03214ecc76de6798e
This commit is contained in:
parent
37049a867d
commit
a8fc8c9722
@ -40,6 +40,6 @@ class gnocchi (
|
|||||||
manage_config => false,
|
manage_config => false,
|
||||||
}
|
}
|
||||||
gnocchi_config {
|
gnocchi_config {
|
||||||
'DEFAULT/coordination_url' : value => $coordination_url;
|
'DEFAULT/coordination_url' : value => $coordination_url, secret => true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,8 @@ class gnocchi::storage::incoming::redis(
|
|||||||
include gnocchi::deps
|
include gnocchi::deps
|
||||||
|
|
||||||
gnocchi_config {
|
gnocchi_config {
|
||||||
'incoming/driver': value => 'redis';
|
'incoming/driver': value => 'redis';
|
||||||
'incoming/redis_url': value => $redis_url;
|
'incoming/redis_url': value => $redis_url, secret => true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ describe 'gnocchi' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'does not configure coordination_url' do
|
it 'does not configure coordination_url' do
|
||||||
is_expected.to contain_gnocchi_config('DEFAULT/coordination_url').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_gnocchi_config('DEFAULT/coordination_url').with_value('<SERVICE DEFAULT>').with_secret(true)
|
||||||
is_expected.to contain_oslo__coordination('gnocchi_config').with(
|
is_expected.to contain_oslo__coordination('gnocchi_config').with(
|
||||||
:backend_url => '<SERVICE DEFAULT>',
|
:backend_url => '<SERVICE DEFAULT>',
|
||||||
:manage_config => false,
|
:manage_config => false,
|
||||||
@ -49,7 +49,7 @@ describe 'gnocchi' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'configures coordination' do
|
it 'configures coordination' do
|
||||||
is_expected.to contain_gnocchi_config('DEFAULT/coordination_url').with_value('redis://localhost:6379')
|
is_expected.to contain_gnocchi_config('DEFAULT/coordination_url').with_value('redis://localhost:6379').with_secret(true)
|
||||||
is_expected.to contain_oslo__coordination('gnocchi_config').with(
|
is_expected.to contain_oslo__coordination('gnocchi_config').with(
|
||||||
:backend_url => 'redis://localhost:6379',
|
:backend_url => 'redis://localhost:6379',
|
||||||
:manage_config => false,
|
:manage_config => false,
|
||||||
|
@ -17,7 +17,7 @@ describe 'gnocchi::storage::incoming::redis' do
|
|||||||
context 'with redis' do
|
context 'with redis' do
|
||||||
it 'configures gnocchi incoming driver with redis' do
|
it 'configures gnocchi incoming driver with redis' do
|
||||||
is_expected.to contain_gnocchi_config('incoming/driver').with_value('redis')
|
is_expected.to contain_gnocchi_config('incoming/driver').with_value('redis')
|
||||||
is_expected.to contain_gnocchi_config('incoming/redis_url').with_value('http://localhost:6378')
|
is_expected.to contain_gnocchi_config('incoming/redis_url').with_value('http://localhost:6378').with_secret(true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user