Skip to content
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

distro info does not have any retry mecanism #4

Open
ssbarnea opened this issue Dec 12, 2019 · 0 comments
Open

distro info does not have any retry mecanism #4

ssbarnea opened this issue Dec 12, 2019 · 0 comments

Comments

@ssbarnea
Copy link

ssbarnea commented Dec 12, 2019

As seen on https://softwarefactory-project.io/logs/84/17184/4/gate/dlrn-api-functional-centos-7/9a7f89d/job-output.txt.gz#_2019-12-12_08_44_02_713195 it can really happen to get a failure due to the intermittent nature of networking.

503 is one of those HTTP codes which are retriable.

2019 | centos-7 | ok: Runtime: 0:00:10.007190
2019 | 
2019 | TASK [Build some packages with DLRN, using --order]
2019 | centos-7 | Traceback (most recent call last):
2019 | centos-7 |   File "/home/zuul-worker/src/softwarefactory-project.io/.venv/bin/dlrn", line 10, in <module>
2019 | centos-7 |     sys.exit(main())
2019 | centos-7 |   File "/home/zuul-worker/src/softwarefactory-project.io/.venv/lib/python2.7/site-packages/dlrn/shell.py", line 178, in main
2019 | centos-7 |     dev_mode=options.dev)
2019 | centos-7 |   File "/home/zuul-worker/src/softwarefactory-project.io/.venv/lib/python2.7/site-packages/dlrn/drivers/rdoinfo.py", line 109, in getpackages
2019| centos-7 |     pkginfo =inforepo.get_info(apply_tag=tags)
2019 | centos-7 |   File "/home/zuul-worker/src/softwarefactory-project.io/.venv/lib/python2.7/site-packages/distroinfo/info.py", line 61, in get_info
2019| centos-7 |     raw_infos = self.fetcher.fetch(*selfinfo_files)
2019 | centos-7 |   File "/home/zuul-worker/src/softwarefactory-project.io/.venv/lib/python2.7/site-packages/distroinfo/fetch.py", line 82, in fetch
2019 | centos-7 |     remote_info=remote_info)
2019 | centos-7 |   File "/home/zuul-worker/src/softwarefactory-project.io/.venv/lib/python2.7/site-packages/distroinfo/fetch.py", line 70, in fetch
2019| centos-7 |info = self.get_file_data(ifn)
2019 | centos-7 |   File "/home/zuul-worker/src/softwarefactory-project.io/.venv/lib/python2.7/site-packages/distroinfo/fetch.py", line 46, in get_file_data
2019 | centos-7 |     content = self.get_file_content(fn)
2019 | centos-7 |   File "/home/zuul-worker/src/softwarefactory-project.io/.venv/lib/python2.7/site-packages/distroinfo/fetch.py", line 152, in get_file_content
2019 | centos-7 |     text = self.fetch_file(fn)
2019 | centos-7 |   File "/home/zuul-worker/src/softwarefactory-project.io/.venv/lib/python2.7/site-packages/distroinfo/fetch.py", line 139, in fetch_file
2019 | centos-7 |     code=req.status_code, reason=req.reason, url=url)
2019 | centos-7 | distroinfo.exception.RemoteFetchError: Failed to fetch remote file: 503 Backend unavailable, connection timeout https://raw.githubusercontent.com/redhat-openstack/rdoinfo/master/tags.yml
2019 | centos-7 | ERROR
2019 | centos-7 | {
2019 | centos-7 |   "delta": "0:00:02.203543",
2019 | centos-7 |   "end": "2019-12-12 08:44:02.738470",
2019 | centos-7 |   "msg": "non-zero return code",
2019 | centos-7 |   "rc": 1,
2019 | centos-7 |   "start": "2019-12-12 08:44:00.534927"
2019 | centos-7 | }

The tool should retry at least 3 times with some delay in between before failing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant