Skip to content

Commit

Permalink
acu114464 - [db_postgres] - providers/default.rb - coding style cosme…
Browse files Browse the repository at this point in the history
…tic changes
  • Loading branch information
Lopaka Delp committed Aug 14, 2013
1 parent eacd750 commit 3757a12
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions cookbooks/db_postgres/providers/default.rb
Expand Up @@ -152,14 +152,11 @@
@db = init(new_resource)
@db.pre_backup_check

# Remove old/stale archivedir files
# Removes old/stale archivedir files.
bash "remove_archivedir_files_before_backup" do
flags "-ex"
code <<-EOH
rm -rf #{node[:db_postgres][:datadir]}/archivedir/*
EOH
code "rm -rf #{node[:db_postgres][:datadir]}/archivedir/*"
end

end

# Cleans up instance after backup
Expand All @@ -172,7 +169,6 @@

# Sets database privileges
action :set_privileges do

# Privileges should not be set if this is an initialized slave.
if node[:db][:init_status].to_sym == :initialized &&
node[:db][:this_is_master] == false
Expand All @@ -193,7 +189,6 @@
database priv_database
end
end

end

# Installs database client
Expand Down Expand Up @@ -499,22 +494,19 @@
else
log " archivedir not empty - backup was from master."

# Remove old/stale xlog files.
# Removes old/stale xlog files.
bash "wipe_existing_xlog_files" do
not_if { current_restore_process == :no_restore }
flags "-ex"
code <<-EOH
rm -rf #{node[:db_postgres][:datadir]}/pg_xlog/*
code "rm -rf #{node[:db_postgres][:datadir]}/pg_xlog/*"
EOH
end

# After removing old/stale xlog files, copy archived xlog files.
# After removing old/stale xlog files, copies archived xlog files.
bash "copy_archived_xlog_files" do
not_if { current_restore_process == :no_restore }
flags "-ex"
code <<-EOH
cp -a #{node[:db_postgres][:datadir]}/archivedir/* #{node[:db_postgres][:datadir]}/pg_xlog/
EOH
code "cp -a #{node[:db_postgres][:datadir]}/archivedir/* #{node[:db_postgres][:datadir]}/pg_xlog/"
end
end

Expand Down

1 comment on commit 3757a12

@flexera-ci
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RS-COMPLIANCE: COMPLIANCE-COMMITMESSAGE-PASS Build: #38079(2013-08-15_07-05-54), repo: rightscale_cookbooks, branch/tag: release13.05, sha: 3757a12, status: PASS, reason: Acunote ID is specified, not checking if it is valid because this is not a head commit. (https://rightscale.acunote.com/projects/2091/tasks/114464)

Please sign in to comment.