Message ID | 20230711063629.7627-2-peter.marko@siemens.com |
---|---|
State | Accepted, archived |
Commit | f4d118af2360cff7f234102fd5e4b65a6f4146a6 |
Headers | show |
Series | [master,mickledore,kirkstone,dunfell,1/2] cve-update-nvd2-native: retry all errors and sleep between retries | expand |
Horrible, but in my testing it works. Thanks Peter! Ross > On 11 Jul 2023, at 07:36, Peter Marko via lists.openembedded.org <peter.marko=siemens.com@lists.openembedded.org> wrote: > > From: Peter Marko <peter.marko@siemens.com> > > Current 503 errors seem to last several seconds. > In most cases there are two errors and third request succeeds. > However sometimes the outage takes more than time needed > for two retries and third one also fails. > > Extend retry count from 3 to 5 to improve the probablity > that the fetcher succeeds. > > Signed-off-by: Peter Marko <peter.marko@siemens.com> > --- > meta/recipes-core/meta/cve-update-nvd2-native.bb | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/recipes-core/meta/cve-update-nvd2-native.bb b/meta/recipes-core/meta/cve-update-nvd2-native.bb > index a7392405e0..b3d0038c2f 100644 > --- a/meta/recipes-core/meta/cve-update-nvd2-native.bb > +++ b/meta/recipes-core/meta/cve-update-nvd2-native.bb > @@ -129,7 +129,7 @@ def nvd_request_next(url, api_key, args): > > full_request = url + '?' + data > > - for attempt in range(3): > + for attempt in range(5): > try: > r = urllib.request.urlopen(full_request) > > -- > 2.30.2 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#184116): https://lists.openembedded.org/g/openembedded-core/message/184116 > Mute This Topic: https://lists.openembedded.org/mt/100074007/6875888 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ross.burton@arm.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Peter, what is the probability it passes (for the complete download) with those settings? Is it every time? Kind regards, Marta On Tue, Jul 11, 2023 at 1:17 PM Ross Burton <ross.burton@arm.com> wrote: > Horrible, but in my testing it works. Thanks Peter! > > Ross > > > On 11 Jul 2023, at 07:36, Peter Marko via lists.openembedded.org > <peter.marko=siemens.com@lists.openembedded.org> wrote: > > > > From: Peter Marko <peter.marko@siemens.com> > > > > Current 503 errors seem to last several seconds. > > In most cases there are two errors and third request succeeds. > > However sometimes the outage takes more than time needed > > for two retries and third one also fails. > > > > Extend retry count from 3 to 5 to improve the probablity > > that the fetcher succeeds. > > > > Signed-off-by: Peter Marko <peter.marko@siemens.com> > > --- > > meta/recipes-core/meta/cve-update-nvd2-native.bb | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/meta/recipes-core/meta/cve-update-nvd2-native.bb > b/meta/recipes-core/meta/cve-update-nvd2-native.bb > > index a7392405e0..b3d0038c2f 100644 > > --- a/meta/recipes-core/meta/cve-update-nvd2-native.bb > > +++ b/meta/recipes-core/meta/cve-update-nvd2-native.bb > > @@ -129,7 +129,7 @@ def nvd_request_next(url, api_key, args): > > > > full_request = url + '?' + data > > > > - for attempt in range(3): > > + for attempt in range(5): > > try: > > r = urllib.request.urlopen(full_request) > > > > -- > > 2.30.2 > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#184130): > https://lists.openembedded.org/g/openembedded-core/message/184130 > Mute This Topic: https://lists.openembedded.org/mt/100074007/5827677 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > rybczynska@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
On 11 Jul 2023, at 13:45, Marta Rybczynska <rybczynska@gmail.com> wrote: > > Peter, what is the probability it passes (for the complete download) with those settings? Is it every time? FWIW, with my testing this morning (I was just doing some other tweaks to the same code) I managed to get a complete download every time over about 8 attempts. Every log had a few 503 errors in, but they all worked with a retry. Ross
diff --git a/meta/recipes-core/meta/cve-update-nvd2-native.bb b/meta/recipes-core/meta/cve-update-nvd2-native.bb index a7392405e0..b3d0038c2f 100644 --- a/meta/recipes-core/meta/cve-update-nvd2-native.bb +++ b/meta/recipes-core/meta/cve-update-nvd2-native.bb @@ -129,7 +129,7 @@ def nvd_request_next(url, api_key, args): full_request = url + '?' + data - for attempt in range(3): + for attempt in range(5): try: r = urllib.request.urlopen(full_request)