Skip to content

Commit

Permalink
Downgrade psycopg2 due to OpenSSL inconsistency
Browse files Browse the repository at this point in the history
The wheel package for `psycopg2` is not compatible with the Python `ssl`
module due to their dependency on different versions of OpenSSL (the
wheel packages its own version, while `ssl` uses the system version).

Attempts to resolve by installing the dependency from source proved
challenging because we install `psycopg2` via Ansible
(`postgresql-support`) in a way that makes it difficult to supply the
`--no-binary` override for `pip`. Instead, we've downgraded to a version
prior to wheel support.

Lastly, the `libpq5` and `libpq-dev` dependencies needed to be
downgraded as well. This is because `psycopg2==2.6.2` is unable to make
sense of a `libpq` version greater than 9.

See: psycopg/psycopg2#543
  • Loading branch information
hectcastro committed Oct 12, 2018
1 parent d04aa32 commit 4b0f085
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion deployment/ansible/roles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
version: 0.1.0

- src: azavea.postgresql-support
version: 0.3.0
version: 0.4.0

- src: azavea.postgresql
version: 0.3.0
Expand Down
4 changes: 3 additions & 1 deletion deployment/ansible/roles/bee-pollinator.base/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ dependencies:
- { role: "azavea.ntp" }
- { role: "azavea.git" }
- { role: "azavea.daemontools" }
- { role: "azavea.postgresql-support" }
- role: "azavea.postgresql-support"
postgresql_support_libpq_version: "9.3.*"
postgresql_support_psycopg2_version: "2.6.*"
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@
- "libproj-dev=4.8.0*"
- "gdal-bin=1.10.1*"
- "libgdal1-dev=1.10.1*"
when: "['tile-servers'] | is_not_in(group_names)"

- name: Configure the main PostgreSQL APT repository
apt_repository: repo="deb http://apt.postgresql.org/pub/repos/apt/ {{ ansible_distribution_release}}-pgdg main"
state=present

- name: Install PostgreSQL client
apt: pkg=postgresql-client-{{ postgresql_version }}={{ postgresql_package_version }}
apt: pkg=postgresql-client-9.3

0 comments on commit 4b0f085

Please sign in to comment.