threefoldtech / tfgrid-sdk-ts

Apache License 2.0
4 stars 8 forks source link

Support selecting the network while adding domain to vm #3148

Open AhmedHanafy725 opened 1 month ago

AhmedHanafy725 commented 1 month ago

Which package/s are you suggesting this feature for?

Dashboard

Is your feature request related to a problem? Please describe

currently, the user can't select the network to deploy the gateway workload.

Describe the solution you'd like

allow the user to select the network (yggdrasil, mycelium, public ipv4, and public ipv6) based on the supported networks on the vm.

Mahmoud-Emad commented 1 month ago

Issue Update

Work done

Mahmoud-Emad commented 1 month ago

As @AhmedHanafy725 reported, there was an issue when selecting another network other than the WireGuard IP

WorkloadDeployError: Failed to deploy gateway-name-proxy with name vm26vmf1d6qf on node 11 due to: failed to setup name proxy: failed to get user network: couldn't load network with id (pL1JFSUwD5VFC): open /var/run/cache/networkd/networks/pL1JFSUwD5VFC: no such file or directory.

So, to avoid this error, we must send the network option field only if the WireGuard IP selected

A-Harby commented 3 weeks ago

I deployed a FullVM with all the networks and git cloned a sample site, then hosted that site on port 8000. And deployed a gateway using all the interfaces. image The server was shown on Wireguard and IPv4 only and failed on all of the other interfaces (Planetary, Mycelium, and IPv6). image image

Mahmoud-Emad commented 3 weeks ago

Are you sure your server bind IPv6?

A-Harby commented 3 weeks ago

@Mahmoud-Emad mentioned to add IPv6 bind to server to accept IPv6, like python3 -m http.server --bind :: and it worked on all the interfaces.

Verified, Devnet 28e17de. image

Created a test will all the steps needed: TC2785 - Domain works on all Interfaces