pgdump plugin does not handle missing commands gracefully

Bug #1206202 reported by Andrew Garner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
holland-backup
Fix Committed
High
Andrew Garner

Bug Description

Like most holland plugins, pg_dump runs commands through subprocess rather than via a shell. If a command is not found, subprocess raises an OSError with errno = ENOENT. This results in a messy and confusing failure message.

These invocations should be wrapped around a try/except to detect these cases and fail cleanly.

This particular case is common with Postgres on RHEL/Cent as newer versions installed from yum.postgresql.org are probably going to put their tools in /usr/pgsql-{version}/bin/ and not necessarily be in the path. holland's default path doesn't pick these up automatically.

Andrew Garner (muzazzi)
Changed in holland-backup:
milestone: none → 1.0.12
Andrew Garner (muzazzi)
Changed in holland-backup:
importance: Undecided → High
Revision history for this message
Andrew Garner (muzazzi) wrote :

Improved the error handling for these cases so it's a little less ugly when these fail.

Featured branch here for inclusion in holland 1.0.12: https://github.com/holland-backup/holland/tree/feature/lp_1206202_handle_pgdump_missing_cmd

Changed in holland-backup:
status: New → Fix Committed
assignee: nobody → Andrew Garner (muzazzi)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.