gvalmon
gvalmon

Reputation: 958

Wal-e: unable to to push backups - permission error

We get the following error when we try to push backup using wal-e:

2020-07-16T21:18:55Z <Greenlet at 0x7f2a59fadc48: <wal_e.worker.upload.PartitionUploader object at 0x7f2a59f96cc0>([ExtendedTarInfo(submitted_path='/var/lib/postgres)> failed with PermissionError

wal_e.operator.backup WARNING  MSG: blocking on sending WAL segments
  DETAIL: The backup was not completed successfully, but we have to wait anyway.  See README: TODO about pg_cancel_backup
  STRUCTURED: time=2020-07-16T21:18:55.651073-00 pid=19697
wal_e.main   CRITICAL MSG: An unprocessed exception has avoided all error handling
  DETAIL: Traceback (most recent call last):
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/operator/backup.py", line 197, in database_backup
      **kwargs)
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/operator/backup.py", line 500, in _upload_pg_cluster_dir
      pool.put(tpart)
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/worker/upload_pool.py", line 108, in put
      self._wait()
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/worker/upload_pool.py", line 65, in _wait
      raise val
    File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/worker/upload.py", line 96, in __call__
      gpg_key=self.gpg_key) as pl:
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/pipeline.py", line 92, in __enter__
      self.stdin = pipebuf.NonBlockBufferedWriter(stdin)
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/pipebuf.py", line 225, in __init__
      _setup_fd(self._fd)
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/pipebuf.py", line 62, in _setup_fd
      set_buf_size(fd)
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/pipebuf.py", line 53, in set_buf_size
      fcntl.fcntl(fd, fcntl.F_SETPIPE_SZ, OS_PIPE_SZ)
  PermissionError: [Errno 1] Operation not permitted

It's not clear why fcntl call may lead to PermissionError.

PostgreSQL version: 9.6, Python: 3.5, Wal-e : 1.1.1 (tried also 1.0.3 and 1.1.0).

It was working previously and stopped working at some point (without any noticeable changes).

Upvotes: 1

Views: 373

Answers (1)

Alec Kloss
Alec Kloss

Reputation: 41

Well, I'm late to the game. See https://github.com/wal-e/wal-e/issues/270

I've worked around it by patching wal-e to not set this.

Upvotes: 1

Related Questions