#6235 Pushing to a brand new dist-git repository emits IOError
Closed: Fixed 6 years ago Opened 6 years ago by psabata.

I've just created a new module dist-git repository in Pagure-over-dist-git (modules/atomic) and attempted to push new content to this empty repository. While the action ultimately succeeded, git push emitted an ugly Python traceback:

% git push
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 833 bytes | 416.00 KiB/s, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: Traceback (most recent call last):
remote:   File "./hooks/post-receive.default", line 19, in <module>
remote:     import pagure  # noqa: E402
remote:   File "/usr/lib/python2.7/site-packages/pagure/__init__.py", line 60, in <module>
remote:     APP.config.from_envvar('PAGURE_CONFIG')
remote:   File "/usr/lib/python2.7/site-packages/flask/config.py", line 108, in from_envvar
remote:     return self.from_pyfile(rv, silent=silent)
remote:   File "/usr/lib/python2.7/site-packages/flask/config.py", line 128, in from_pyfile
remote:     with open(filename) as config_file:
remote: IOError: [Errno 13] Unable to load configuration file (Permission denied): '/etc/pagure/pagure.cfg'
remote: Hook ./hooks/post-receive.default failed with error code 1
To ssh://pkgs.fedoraproject.org/modules/atomic
 * [new branch]      master -> master

@pingou says this is an infra issue, hence filing it here.


Metadata Update from @pingou:
- Issue tagged with: src.fp.o

6 years ago

The hook need to query the DB but not to write to it, so I think the best approach would be to have a hook specific configuration file that contains read-only access credential.

I'm getting same error when pushing to a newly created package repo - tpm2-abrmd:

[test@SKLS02 tpm2-abrmd]$ fedpkg push 
/usr/lib/python2.7/site-packages/fedora/client/bodhi.py:48: DeprecationWarning: fedora.client.bodhi has been deprecated. Please use bodhi.client.bindings instead.
  DeprecationWarning)
Counting objects: 3, done.
Writing objects: 100% (2/2), 210 bytes | 0 bytes/s, done.
Total 2 (delta 0), reused 0 (delta 0)
remote: Traceback (most recent call last):
remote:   File "./hooks/post-receive.default", line 19, in <module>
remote:     import pagure  # noqa: E402
remote:   File "/usr/lib/python2.7/site-packages/pagure/__init__.py", line 62, in <module>
remote:     APP.config.from_envvar('PAGURE_CONFIG')
remote:   File "/usr/lib/python2.7/site-packages/flask/config.py", line 108, in from_envvar
remote:     return self.from_pyfile(rv, silent=silent)
remote:   File "/usr/lib/python2.7/site-packages/flask/config.py", line 128, in from_pyfile
remote:     with open(filename) as config_file:
remote: IOError: [Errno 13] Unable to load configuration file (Permission denied): '/etc/pagure/pagure.cfg'
remote: Hook ./hooks/post-receive.default failed with error code 1
To ssh://yunyings@pkgs.fedoraproject.org/rpms/tpm2-abrmd
   4665bdc..5a800a2  master -> master

Would like know if there's any plan of fixing such issue.

Would like know if there's any plan of fixing such issue.

Yes there is but since this is not blocking any work it was not a priority.

This being said, it should be fixed now :)

@pingou this seems to work ok in staging.

I am going to close this ticket, please re-open if you think it is not fixed.

Thanks :)

Metadata Update from @pingou:
- Issue close_status updated to: Fixed

6 years ago

Login to comment on this ticket.

Metadata