Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
parse properties correctly for backup_manager
Browse files Browse the repository at this point in the history
Change-Id: Ib4e0e724be5fa624b8ea268eafc6fafbfa4fab7b
  • Loading branch information
EagleChen committed Jan 25, 2013
1 parent ea15b2e commit f35a6f0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions jobs/backup_manager/templates/backup_manager.yml.erb
Expand Up @@ -27,6 +27,6 @@ rotation:
postgresql:
version: "9.0"
token: <%= properties.postgresql_gateway.token %>
root: <%= properties.service_backup && properties.service_backup.mount_point ? properties.service_backup.mount_point : "/var/vcap/services_backup" %>
wakeup_interval: <%= properties.service_backup_manager ? properties.service_backup_manager.rotation_interval_secs : 43200 %>
enable: <%= properties.service_backup_manager && properties.service_backup && properties.service_backup.nfs_server ? properties.service_backup_manager.enable : "false" %>
root: <%= properties.service_backup && properties.service_backup.mount_point || "/var/vcap/services_backup" %>
wakeup_interval: <%= properties.service_backup_manager && properties.service_backup_manager.rotation_interval_secs || 43200 %>
enable: <%= properties.service_backup_manager && properties.service_backup && properties.service_backup.nfs_server && properties.service_backup_manager.enable || "false" %>
6 changes: 3 additions & 3 deletions jobs/backup_manager/templates/job_manager.yml.erb
Expand Up @@ -19,9 +19,9 @@ logging:
syslog: vcap.job_manager
<% end %>
job_cleanup:
max_days: <%= max_days ? max_days : 7 %>
wakeup_interval: <%= interval ? interval : 43200 %>
enable: <%= enable ? enable : "false" %>
max_days: <%= max_days || 7 %>
wakeup_interval: <%= interval || 43200 %>
enable: <%= enable || "false" %>
services_redis:
host: <%= lifecycle.resque.host %>
port: <%= lifecycle.resque.port %>
Expand Down
10 changes: 5 additions & 5 deletions jobs/backup_manager/templates/snapshot_manager.yml.erb
Expand Up @@ -14,8 +14,8 @@ logging:
<% end %>

cleanup:
max_days: <%= properties.service_snapshot_manager ? properties.service_snapshot_manager.cleanup_max_days : 7 %>
greedy_mark: <%= properties.service_snapshot_manager ? properties.service_snapshot_manager.cleanup_greedy_mark : "false"%>
max_days: <%= properties.service_snapshot_manager && properties.service_snapshot_manager.cleanup_max_days || 7 %>
greedy_mark: <%= properties.service_snapshot_manager && properties.service_snapshot_manager.cleanup_greedy_mark || "false" %>
cloud_controller_uri: <%= properties.cc.srv_api_uri %>
services:
mongodb:
Expand All @@ -30,6 +30,6 @@ cleanup:
postgresql:
version: "9.0"
token: <%= properties.postgresql_gateway.token %>
root: <%= properties.service_lifecycle && properties.service_lifecycle.mount_point ? properties.service_lifecycle.mount_point : "/var/vcap/services_snapshot" %>
wakeup_interval: <%= properties.service_snapshot_manager ? properties.service_snapshot_manager.cleanup_interval_secs : 43200 %>
enable: <%= properties.service_snapshot_manager && properties.service_lifecycle && properties.service_lifecycle.nfs_server ? properties.service_snapshot_manager.enable : "false" %>
root: <%= properties.service_lifecycle && properties.service_lifecycle.mount_point || "/var/vcap/services_snapshot" %>
wakeup_interval: <%= properties.service_snapshot_manager && properties.service_snapshot_manager.cleanup_interval_secs || 43200 %>
enable: <%= properties.service_snapshot_manager && properties.service_lifecycle && properties.service_lifecycle.nfs_server && properties.service_snapshot_manager.enable || "false" %>

0 comments on commit f35a6f0

Please sign in to comment.