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

🐞 [Bug]: Deleting a VM with IPv4 interface linked to a domain will not remove the associated name and gateway contracts #3485

Closed
1 task done
sameh-farouk opened this issue Sep 30, 2024 · 3 comments
Assignees
Labels
type_bug Something isn't working
Milestone

Comments

@sameh-farouk
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

which package/s did you face the problem with?

Dashboard, grid_client

What happened?

When I click the actions button next to a VM and link a domain with an IP reserved by the VM, then proceed to delete the VM, the client leaves the name contract and gateway workload that were supposedly routing traffic to the now-removed VM.

Steps To Reproduce

  1. go to https://staging.dashboard.dev.grid.tf/#/deploy/virtual-machines/full-virtual-machine/
  2. Deploy a VM with IPv4 address
  3. Add a new domain. Make sure to pick the IPv4 interface
  4. Verify that the name contract and the gateway contract were successfully created.
  5. Select the VM, from the full-virtual-machine page, and delete it.
  6. revisit the contracts page and verify that the name contract and gateway's node contract are left behind.

which network/s did you face the problem on?

Dev

version

NA

Twin ID/s

No response

Node ID/s

No response

Farm ID/s

No response

Contract ID/s

No response

Relevant screenshots/screen records

Screenshot_20240930_164118

I tried that twice, and here is the result

Screenshot_20240930_164735

Relevant log output

NA
@sameh-farouk sameh-farouk added the type_bug Something isn't working label Sep 30, 2024
@ramezsaeed ramezsaeed added this to 3.15.x Oct 2, 2024
@ramezsaeed ramezsaeed added this to the 2.6.0 milestone Oct 2, 2024
@maayarosama
Copy link
Contributor

This might happen because we check if the backends in the gateway is wiregaurd ip connected to the vm. In this case the solution need to check on all network interfaces

filter: ip ? gw => gw.backends.some(bk => bk.includes(ip)) : undefined,

@maayarosama maayarosama moved this to Accepted in 3.15.x Oct 2, 2024
@0oM4R 0oM4R moved this from Accepted to In Progress in 3.15.x Oct 17, 2024
@0oM4R 0oM4R self-assigned this Oct 17, 2024
@0oM4R
Copy link
Contributor

0oM4R commented Oct 17, 2024

work completed :
add a function that pass all ips to the delete function and edit the filtration prop

WIP: some gws on interfaces like ipv4 didn't got listed checking..

@amiraabouhadid amiraabouhadid moved this from In Progress to Pending Review in 3.15.x Oct 28, 2024
@0oM4R 0oM4R moved this from Pending Review to In Verification in 3.15.x Oct 31, 2024
@A-Harby
Copy link
Contributor

A-Harby commented Nov 3, 2024

Verified, Devnet ffbb750.

I deployed a VM and add a domain to it and made sure everything is correct.
then deleted it as mention and verified that all the contracts are deleted from contracts page, including vm, name and gateway.

image
image
image

Newly created test case: TC2903 - Deleting VM with domain

@A-Harby A-Harby moved this from In Verification to Done in 3.15.x Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type_bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

5 participants