Added retries for db_sync

If db sync fails, it is never retried leading to errors. So, this
patch adds retries for db_sync to avoid sync fails.

Change-Id: I784ca2fc0a9a906633ad60d1338c4b4b73c376c7
Closes-Bug: #1628580
This commit is contained in:
ZhongShengping 2018-03-16 11:21:20 +08:00
parent 00b06cfb43
commit c13a788dd9
4 changed files with 12 additions and 0 deletions

View File

@ -19,6 +19,8 @@ class watcher::db::create_schema(
path => '/usr/bin',
user => 'watcher',
refreshonly => true,
try_sleep => 5,
tries => 10,
logoutput => on_failure,
subscribe => [
Anchor['watcher::install::end'],

View File

@ -20,6 +20,8 @@ class watcher::db::upgrade(
path => '/usr/bin',
user => 'watcher',
refreshonly => true,
try_sleep => 5,
tries => 10,
logoutput => on_failure,
subscribe => [
Anchor['watcher::install::end'],

View File

@ -10,6 +10,8 @@ describe 'watcher::db::create_schema' do
:path => '/usr/bin',
:user => 'watcher',
:refreshonly => 'true',
:try_sleep => 5,
:tries => 10,
:logoutput => 'on_failure',
:subscribe => [
'Anchor[watcher::install::end]',
@ -34,6 +36,8 @@ describe 'watcher::db::create_schema' do
:path => '/usr/bin',
:user => 'watcher',
:refreshonly => 'true',
:try_sleep => 5,
:tries => 10,
:logoutput => 'on_failure',
:subscribe => [
'Anchor[watcher::install::end]',

View File

@ -10,6 +10,8 @@ describe 'watcher::db::upgrade' do
:path => '/usr/bin',
:user => 'watcher',
:refreshonly => 'true',
:try_sleep => 5,
:tries => 10,
:logoutput => 'on_failure',
:subscribe => [
'Anchor[watcher::install::end]',
@ -34,6 +36,8 @@ describe 'watcher::db::upgrade' do
:path => '/usr/bin',
:user => 'watcher',
:refreshonly => 'true',
:try_sleep => 5,
:tries => 10,
:logoutput => 'on_failure',
:subscribe => [
'Anchor[watcher::install::end]',