threefoldtech / tfgrid-sdk-ts

Apache License 2.0
4 stars 8 forks source link

šŸž [Bug]: Updating network with mycelium takes some time to reflect #2386

Open AhmedHanafy725 opened 8 months ago

AhmedHanafy725 commented 8 months ago

Is there an existing issue for this?

which package/s did you face the problem with?

grid_client

What happened?

deploying a vm on a network with mycelium on already existing network that doesn't have mycelium fails

Steps To Reproduce

which network/s did you face the problem on?

Dev

version

2.3.0-rc4

Twin ID/s

No response

Node ID/s

No response

Farm ID/s

No response

Contract ID/s

No response

Relevant screenshots/screen records

https://github.com/threefoldtech/tfgrid-sdk-ts/actions/runs/8225652180/job/22490963393

Relevant log output

/home/runner/work/tfgrid-sdk-ts/tfgrid-sdk-ts/packages/grid_client/src/high_level/twinDeploymentHandler.ts:86
      throw new GridClientErrors.Workloads.WorkloadDeployError(
            ^
WorkloadDeployError: WorkloadDeployError: Failed to deploy zmachine with name worker on node 11 due to: could not set up tap device: network resource does not support mycelium.
    at TwinDeploymentHandler.checkWorkload (/home/runner/work/tfgrid-sdk-ts/tfgrid-sdk-ts/packages/grid_client/src/high_level/twinDeploymentHandler.ts:86:13)
    at TwinDeploymentHandler.waitForDeployment (/home/runner/work/tfgrid-sdk-ts/tfgrid-sdk-ts/packages/grid_client/src/high_level/twinDeploymentHandler.ts:113:22)
    at async Promise.all (index 0)
    at async TwinDeploymentHandler.handle (/home/runner/work/tfgrid-sdk-ts/tfgrid-sdk-ts/packages/grid_client/src/high_level/twinDeploymentHandler.ts:[59](https://github.com/threefoldtech/tfgrid-sdk-ts/actions/runs/8225652180/job/22490963393#step:11:60)9:7)
    at async K8sModule.deploy (/home/runner/work/tfgrid-sdk-ts/tfgrid-sdk-ts/packages/grid_client/src/modules/k8s.ts:194:23)
    at async K8sModule.descriptor.value (/home/runner/work/tfgrid-sdk-ts/tfgrid-sdk-ts/packages/grid_client/src/modules/utils.ts:11:12)
    at async K8sModule.descriptor.value (/home/runner/work/tfgrid-sdk-ts/tfgrid-sdk-ts/packages/grid_client/src/helpers/validator.ts:22:12)
    at async deploy (/home/runner/work/tfgrid-sdk-ts/tfgrid-sdk-ts/packages/grid_client/scripts/kubernetes.ts:6:15)
    at async main (/home/runner/work/tfgrid-sdk-ts/tfgrid-sdk-ts/packages/grid_client/scripts/kubernetes.ts:88:3) {
  code: 1,
  module: 'tfGridWorkloads'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.
AhmedHanafy725 commented 8 months ago

adding some sleep between updating the network and deploying the VM makes it work