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

PostgreSQL has to run before upgrading legacy installation #91

Open
SebastienGardoll opened this issue Apr 26, 2019 · 3 comments
Open

Comments

@SebastienGardoll
Copy link

Describe the bug

Legacy installation makes esgf node starts at boot time, with the command esg-node.
So as to rely only on the start/stop recipes of esgf-ansible, we have to disable this feature.
But disable this feature, reboot and than upgrade the legacy installation makes the upgrade to fail with this message:

TASK [base : Create db super user] ******************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: socket Unix « /tmp/.s.PGSQL.5432 » ?
[WARNING]: Module remote_tmp /var/lib/pgsql/.ansible/tmp did not exist and was created with a mode of 0700,
this may cause issues when running as another user. To avoid this, create the remote_tmp dir with the correct
permissions manually
fatal: [vesgint-data.ipsl.upmc.fr]: FAILED! => {
"changed": false
}

MSG:

unable to connect to database: n'a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
Le serveur est-il actif localement et accepte-t-il les connexions sur la
socket Unix « /tmp/.s.PGSQL.5432 » ?

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: socket Unix « /tmp/.s.PGSQL.5432 » ?
fatal: [vesgint-idx.ipsl.upmc.fr]: FAILED! => {
"changed": false
}

MSG:

unable to connect to database: n'a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
Le serveur est-il actif localement et accepte-t-il les connexions sur la
socket Unix « /tmp/.s.PGSQL.5432 » ?

To Reproduce
Steps to reproduce the behavior:

  1. Disable esg-node start at boot time:

chmod -x /etc/init.d/zesgf
chmod -x /etc/init.d/esgf-httpd

  1. reboot the machine

  2. Upgrade a legacy installation

Expected behavior

esgf-ansible starts postgreSQL but it must start postgreSQL with the good configuration.

ESGF Node (please complete the following information):

  • Managed OS: CentOS 6
  • Host OS: CentOS 7
  • esgf-ansible Version: v4.0.2
  • Node type: a set of idp, index and data nodes

Additional context
legacy installation

@sashakames
Copy link
Contributor

sashakames commented Apr 26, 2019

While not necessarily the cause of this issue, starting esg-node at boot time, as I see done here with creating the daemon zesgf has never to my knowledge been considered a standard or recommended practice. It may have worked out fine for your site (IPSL) in the past, but must have been done manually.

@SebastienGardoll
Copy link
Author

SebastienGardoll commented Jul 3, 2019

esgf-ansible starts postgresql during the upgrading process and right after it tries to connect to it. I wonder if esgf-ansible is just too fast: I saw that rerun the installation recipe of esgf-ansible doesn't trigger the error. Only one time, I saw that the esgf-ansible succeeded to connect to the postgresql of the data node but not to the postgresql of the index node. Adding a pause after starting postgresql may solve this problem.

@SebastienGardoll
Copy link
Author

FYI, I still have this issue when upgrading from 4.0.3 to 4.0.4 .

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