-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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_db dump does not fail on FATAL error when using compression #39412
Labels
affects_2.5
This issue/PR affects Ansible v2.5
bug
This issue/PR relates to a bug.
module
This issue/PR relates to a module.
postgresql
PostgreSQL community
support:community
This issue/PR relates to code supported by the Ansible community.
Comments
Files identified in the description: If these files are inaccurate, please update the |
ansibot
added
affects_2.5
This issue/PR affects Ansible v2.5
bug
This issue/PR relates to a bug.
module
This issue/PR relates to a module.
needs_triage
Needs a first human triage before being processed.
support:community
This issue/PR relates to code supported by the Ansible community.
labels
Apr 27, 2018
Akasurde
removed
the
needs_triage
Needs a first human triage before being processed.
label
Apr 27, 2018
Closing this issue as PR #39483 is merged. If issue persists, please feel free to re-open. |
mjmayer
pushed a commit
to mjmayer/ansible
that referenced
this issue
Nov 30, 2018
* postgresql_db dump does not fail on FATAL error when using compression
Glandos
added a commit
to Glandos/ansible
that referenced
this issue
Mar 5, 2019
'dump' and 'restore' state only need pg_dump and pg_restore. These tools don't use psycopg2 so this change tries to avoid the use of it in these cases. The db_exists test was replaced with an error detection when piping to compression program, using a FIFO file. This effectively reverts ansible#39483, that was a fix for ansible#39412.
gundalow
pushed a commit
that referenced
this issue
Mar 11, 2019
* Remove dependency to psycopg2 with dump/restore 'dump' and 'restore' state only need pg_dump and pg_restore. These tools don't use psycopg2 so this change tries to avoid the use of it in these cases. The db_exists test was replaced with an error detection when piping to compression program, using a FIFO file. This effectively reverts #39483, that was a fix for #39412. * Fix typo * Add changelog fragment * Add note for dump and restore not requiring psycopg2 * Fix YAML syntax * Update lib/ansible/modules/database/postgresql/postgresql_db.py Co-Authored-By: Glandos <bugs-github@antipoul.fr>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.5
This issue/PR affects Ansible v2.5
bug
This issue/PR relates to a bug.
module
This issue/PR relates to a module.
postgresql
PostgreSQL community
support:community
This issue/PR relates to code supported by the Ansible community.
ISSUE TYPE
COMPONENT NAME
postgresql_db
ANSIBLE VERSION
CONFIGURATION
ANSIBLE_NOCOWS(/home/xxx/ansible/ansible.cfg) = True
ANSIBLE_PIPELINING(/home/xxx/ansible/ansible.cfg) = True
DEFAULT_FORKS(/home/xxx/ansible/ansible.cfg) = 50
DEFAULT_HOST_LIST(/home/xxx/ansible/ansible.cfg) = [u'/home/xxx/ansible/inventories']
DEFAULT_MODULE_PATH(/home/xxx/ansible/ansible.cfg) = [u'/home/xxx/ansible/library']
DEFAULT_MODULE_UTILS_PATH(/home/xxx/ansible/ansible.cfg) = [u'/home/xxx/ansible/module_utils']
DEFAULT_ROLES_PATH(/home/xxx/ansible/ansible.cfg) = [u'/home/xxx/ansible/roles']
INVENTORY_IGNORE_EXTS(/home/xxx/ansible/ansible.cfg) = ['~', '.orig', '.bak', '.ini', '.cfg', '.retry', '.pyc', '.pyo', '.cache']
OS / ENVIRONMENT
N/A
postgresql 9.5
SUMMARY
When using the dump state to dump a database, with compression like
.gz
, if an error occurs, it's not propagated to ansible. It seems thatrc
contains only the return code of the gzip program.STEPS TO REPRODUCE
EXPECTED RESULTS
The playbook should fail and stop right after the failed dump
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: