Skip to content

Commit

Permalink
fix CLAB_INTFS on linux node
Browse files Browse the repository at this point in the history
  • Loading branch information
steiler committed Mar 14, 2024
1 parent 57c4baf commit 8419cde
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nodes/linux/linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package linux
import (
"context"
"fmt"
"strconv"
"strings"

log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -50,6 +51,11 @@ func (n *linux) Init(cfg *types.NodeConfig, opts ...nodes.NodeOption) error {
}

func (n *linux) Deploy(ctx context.Context, _ *nodes.DeployParams) error {
// Set the "CLAB_INTFS" variable to the number of interfaces
// Which is required by vrnetlab to determine if all configured interfaces are present
// such that the internal VM can be started with these interfaces assigned.
n.Config().Env[types.CLAB_ENV_INTFS] = strconv.Itoa(len(n.GetEndpoints()))

cID, err := n.Runtime.CreateContainer(ctx, n.Cfg)
if err != nil {
return err
Expand Down

0 comments on commit 8419cde

Please sign in to comment.