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

Ignore "pool exists" error on Azure Batch #5713

Open
adamrtalbot opened this issue Jan 25, 2025 · 0 comments · May be fixed by #5721
Open

Ignore "pool exists" error on Azure Batch #5713

adamrtalbot opened this issue Jan 25, 2025 · 0 comments · May be fixed by #5721

Comments

@adamrtalbot
Copy link
Collaborator

adamrtalbot commented Jan 25, 2025

New feature

If you submit an Azure Batch pipeline which tries to create a pool when the pool already exists, you get the following error:

Caused by:
  Status code 409, "{
    "odata.metadata":"https://mybatch.eastus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element","code":"PoolExists","message":{
      "lang":"en-US","value":"The specified pool already exists.\nRequestId:d9475bc1-f9e5-492b-9114-6a05a8a57abc\nTime:2025-01-23T14:15:51.6526349Z"
    }
  }"

We can just ignore this error since the pool is being created.

Usage scenario

Related to #5575

Suggest implementation

We can add the code here:

final private static List<Integer> RETRY_CODES = List.of(408, 429, 500, 502, 503, 504)

or an explicit exception here:

protected <T> T apply(CheckedSupplier<T> action) {
// define the retry condition
final cond = new Predicate<? extends Throwable>() {
@Override
boolean test(Throwable t) {
if( t instanceof HttpResponseException && t.response.statusCode in RETRY_CODES )
return true
if( t instanceof IOException || t.cause instanceof IOException )
return true
if( t instanceof TimeoutException || t.cause instanceof TimeoutException )
return true
return false
}

adamrtalbot added a commit to adamrtalbot/nextflow that referenced this issue Jan 28, 2025
Ignores pool already exists error and continues. Fixes nextflow-io#5713

Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants