From a74c4fad37f95e6a1f575d1ba452a4c501a0a03e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 18 May 2020 19:13:28 +0000 Subject: [PATCH] Use python 3 for the planet notes dump --- cookbooks/planet/recipes/notes.rb | 5 +++-- cookbooks/planet/templates/default/planet-notes-dump.erb | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cookbooks/planet/recipes/notes.rb b/cookbooks/planet/recipes/notes.rb index 3b22af739..68a548b15 100644 --- a/cookbooks/planet/recipes/notes.rb +++ b/cookbooks/planet/recipes/notes.rb @@ -23,8 +23,9 @@ db_passwords = data_bag_item("db", "passwords") package %w[ pbzip2 - python-psycopg2 - python-lxml + python3 + python3-psycopg2 + python3-lxml ] directory "/opt/planet-notes-dump" do diff --git a/cookbooks/planet/templates/default/planet-notes-dump.erb b/cookbooks/planet/templates/default/planet-notes-dump.erb index 92ca8b375..77c73348f 100644 --- a/cookbooks/planet/templates/default/planet-notes-dump.erb +++ b/cookbooks/planet/templates/default/planet-notes-dump.erb @@ -33,7 +33,7 @@ if [ \! -d ${planet_dir}/notes/ ] if [ \! -d ${planet_dir}/notes/${cur_year}/ ]; then mkdir ${planet_dir}/notes/${cur_year}/; fi cd ${planet_dir}/notes/${cur_year}/ -/usr/bin/python /opt/planet-notes-dump/dump.py --quiet --database openstreetmap --host <%= node[:web][:readonly_database_host] %> --user planetdump --password '<%= @password %>' .${cur_planet_notes} +/usr/bin/python3 /opt/planet-notes-dump/dump.py --quiet --database openstreetmap --host <%= node[:web][:readonly_database_host] %> --user planetdump --password '<%= @password %>' .${cur_planet_notes} pbzip2 -p6 -9 .${cur_planet_notes} planet_notes_size=$(du -sb .${cur_planet_notes}.bz2 | awk '{ print $1 }') -- 2.43.2