Skip to content

Getting error Failed to add firewall rule error during sql script execution using GitHub Hosted Runner #181

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

Closed
fmouraine opened this issue Jun 13, 2023 · 5 comments · Fixed by #231
Labels
idle Inactive for 14 days need-to-triage Requires investigation

Comments

@fmouraine
Copy link

Here my github action I use:


  • name: Az CLI login
    uses: azure/login@v1
    with:
    client-id: ${{ secrets. client-id }}
    subscription-id: ${{ secrets.subscription-id }}
    tenant-id: ${{ secrets.tenant-id }}

  • name: Init Mssql db-user
    uses: azure/sql-action@v2.2
    with:
    connection-string: "Server=myserver.database.windows.net,1433;Database=mydb;Authentication=Active Directory Default"
    path: './mssql/scripts/db-init-user.sql'


If I launch it on ubuntu-latest (public runner), it works fine
If I launch it on an private runner (located in the same vnet as the sql server and sql server has a private endpoint), I have an authentification error (the github action return a failed to add firewall rules but in debug mode I can see authentification error)

It seems that the Github action Azure/sql-action does not managed correctly the authentification with AAD federation (when not using a public github runner). This analysis has been confirmed by Azure support

@fmouraine fmouraine added the need-to-triage Requires investigation label Jun 13, 2023
@github-actions
Copy link

This issue is idle because it has been open for 14 days with no activity.

@github-actions github-actions bot added the idle Inactive for 14 days label Jun 27, 2023
@zijchen
Copy link
Contributor

zijchen commented Jul 18, 2023

Hi @fmouraine do you have the error text for the authentication error?

@github-actions github-actions bot removed the idle Inactive for 14 days label Jul 18, 2023
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

This issue is idle because it has been open for 14 days with no activity.

@github-actions github-actions bot added the idle Inactive for 14 days label Aug 1, 2023
@catoa
Copy link

catoa commented Aug 11, 2023

@fmouraine this sounds similar to the error that I've encountered while trying to deploy to a SQL Managed Instance. This is the error that I see in the GHA workflow:

Error: Failed to add firewall rule. Unable to detect client IP Address. lookup <db-name>.database.windows.net: no such host

@github-actions github-actions bot removed the idle Inactive for 14 days label Aug 11, 2023
@github-actions
Copy link

This issue is idle because it has been open for 14 days with no activity.

@github-actions github-actions bot added the idle Inactive for 14 days label Aug 25, 2023
@zijchen zijchen linked a pull request Jun 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle Inactive for 14 days need-to-triage Requires investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants