Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chef: Uplift to python3 (python2.7 still in use) #468

Open
duttonw opened this issue Oct 18, 2024 · 2 comments
Open

Chef: Uplift to python3 (python2.7 still in use) #468

duttonw opened this issue Oct 18, 2024 · 2 comments
Assignees

Comments

@duttonw
Copy link
Member

duttonw commented Oct 18, 2024

Remove python2.7 install, uplift to use latest psycogpg2 as postgres 15 enforces ssl and python2 (last version) does not support it.

https://github.com/qld-gov-au/opswx-ckan-cookbook/blob/master/templates/default/installdatastore.py.erb#L7

sys.path.append("/usr/lib/ckan/default/lib/python2.7/site-packages")
import psycopg2
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT

try:
    conn = psycopg2.connect("dbname='postgres' user='ckan_dba' host='<%= node['datashades']['version'] %>pg.<%= node['datashades']['tld'] %>' password='<%= node['datashades']['postgres']['password'] %>'")
except:
    sys.exit(1)
@ThrawnCA
Copy link
Contributor

We don't run the installdatastore recipe.

@duttonw
Copy link
Member Author

duttonw commented Oct 18, 2024

https://github.com/search?q=repo%3Aqld-gov-au%2Fopswx-ckan-cookbook%20python2.7&type=code
Also

sys.path.append("/usr/lib/ckan/default/lib/python2.7/site-packages")

and
sys.path.append("/usr/lib/ckan/default/lib/python2.7/site-packages")

ThrawnCA added a commit that referenced this issue Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants