pgadmin-org / pgadmin4

pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.
https://www.pgadmin.org
Other
2.43k stars 638 forks source link

Backup with incorrect path stays in broken state (RM #3232) #1748

Closed dpage closed 2 years ago

dpage commented 6 years ago

Issue migrated from Redmine: https://redmine.postgresql.org/issues/3232 Originally created by Joao Pereira at 2018-03-27 19:22:01 UTC.

When you set the binary folder incorrectly and it cannot find the pg_dumpall file throws an exception in python. The waiting box never ends informing the user that the backup ended.

How to reproduce:

  1. Set a binary folder that is incorrect
  2. Try to execute a backup on a database

Check server log:

2018-03-27 15:09:42,351: INFO   pgadmin:    Executing the process executor with the arguments: ['/home/pivotal/.pyenv/versions/python36/bin/python', '/home/pivotal/workspace/pgadmin4/web/pgadmin/misc/bgprocess/process_executor.py', '/usr/share/postgresql-common/pg_dumpall', '--file', '/home/pivotal/somedump', '--host', 'localhost', '--port', '5432', '--username', 'postgres', '--no-password', '--database', 'postgres', '--verbose']
2018-03-27 15:09:42,364: INFO   werkzeug:   127.0.0.1 - - [27/Mar/2018 15:09:42] "POST /backup/job/2 HTTP/1.1" 200 -
Traceback (most recent call last):
  File "/home/pivotal/workspace/pgadmin4/web/pgadmin/misc/bgprocess/process_executor.py", line 322, in execute
    command, stdout=PIPE, stderr=PIPE, stdin=None, **kwargs
  File "/home/pivotal/.pyenv/versions/3.6.4/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/home/pivotal/.pyenv/versions/3.6.4/lib/python3.6/subprocess.py", line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/postgresql-common/pg_dumpall': '/usr/share/postgresql-common/pg_dumpall'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pivotal/workspace/pgadmin4/web/pgadmin/misc/bgprocess/process_executor.py", line 544, in 
    execute()
  File "/home/pivotal/workspace/pgadmin4/web/pgadmin/misc/bgprocess/process_executor.py", line 359, in execute
    info = _log_exception()
  File "/home/pivotal/workspace/pgadmin4/web/pgadmin/misc/bgprocess/process_executor.py", line 72, in _log_exception
    fp.write('EXCEPTION::\n{0}'.format(res))
TypeError: a bytes-like object is required, not 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pivotal/workspace/pgadmin4/web/pgadmin/misc/bgprocess/process_executor.py", line 546, in 
    _log_exception()
  File "/home/pivotal/workspace/pgadmin4/web/pgadmin/misc/bgprocess/process_executor.py", line 72, in _log_exception
    fp.write('EXCEPTION::\n{0}'.format(res))
TypeError: a bytes-like object is required, not 'str'
dpage commented 6 years ago

Image migrated from Redmine: https://redmine.postgresql.org/attachments/download/2946 Originally created by Joao Pereira at 2018-03-27 19:17:32 UTC.

Screenshot_from_2018-03-27_15-17-17.png

Filename: Screenshot_from_2018-03-27_15-17-17.png

Description: Box waiting for the dump to end

dpage commented 6 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-2 Originally created by Akshay Joshi at 2018-05-04 10:43:14 UTC.

Redmine ticket header update:

Name Old Value New Value
Sprint changed Ready
dpage commented 6 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-3 Originally created by Aditya Toshniwal at 2018-08-17 10:52:19 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (duplicated) changed RM #3572
dpage commented 6 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-4 Originally created by Aditya Toshniwal at 2018-08-17 10:52:49 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (relates) changed RM #3233
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-5 Originally created by Akshay Joshi at 2018-09-28 10:26:27 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (relates) changed RM #3668
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-6 Originally created by Akshay Joshi at 2018-10-05 10:36:31 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (relates) changed RM #3668
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-7 Originally created by Akshay Joshi at 2018-10-05 10:36:33 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (duplicated) changed RM #3668
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-8 Originally created by Akshay Joshi at 2018-10-05 10:37:09 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (duplicated) changed RM #3678
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-9 Originally created by Akshay Joshi at 2018-10-05 10:37:55 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (relates) changed RM #3233
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-10 Originally created by Akshay Joshi at 2018-10-05 10:38:05 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (duplicated) changed RM #3233
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-11 Originally created by Akshay Joshi at 2018-10-05 10:38:46 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (duplicated) changed RM #3312
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-12 Originally created by Khushboo Vashi at 2018-10-10 09:35:21 UTC.

Redmine ticket header update:

Name Old Value New Value
Sprint changed Ready EDB Sprint 25
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-13 Originally created by Akshay Joshi at 2018-10-15 05:31:39 UTC.

Redmine ticket header update:

Name Old Value New Value
Status changed New In Progress
Assigned To changed Akshay Joshi
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-14 Originally created by Akshay Joshi at 2018-10-19 13:32:30 UTC.

Patch sent: https://www.postgresql.org/message-id/CANxoLDfA_ycCJaDrTve+5jDS3nc_Y9R+mXG_gQ1yPWqGFOxkyA@mail.gmail.com

dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-15 Originally created by Akshay Joshi at 2018-10-22 07:07:43 UTC.

Commit Id: 6bc6bc7f60dde83514a5d55fe0d5264071d947ae

Redmine ticket header update:

Name Old Value New Value
Status changed In Progress In Testing
Done Ratio changed 0 90
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3232#note-16 Originally created by Fahar Abbas at 2018-12-12 12:50:27 UTC.

This is resolved and verified https://www.postgresql.org/ftp/pgadmin/pgadmin4/snapshots/2018-12-12/

Redmine ticket header update:

Name Old Value New Value
Status changed In Testing Resolved
Done Ratio changed 90 100
dpage commented 2 years ago

Issue closed on Redmine.