Skip to content

Commit

Permalink
Merge pull request #4323 from josedonizetti/fix-kvm-ensure-network
Browse files Browse the repository at this point in the history
kvm2: Add support for --kvm-network to ensureNetwork
  • Loading branch information
tstromberg authored May 24, 2019
2 parents 07aba0f + c7bace6 commit bb56fd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/drivers/kvm/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,9 @@ func (d *Driver) ensureNetwork() error {

// network: default

// Start the default network
// It is assumed that the libvirt/kvm installation has already created this network
log.Infof("Ensuring network %s is active", defaultNetworkName)
if err := setupNetwork(conn, defaultNetworkName); err != nil {
log.Infof("Ensuring network %s is active", d.Network)
if err := setupNetwork(conn, d.Network); err != nil {
return err
}

Expand Down
3 changes: 3 additions & 0 deletions test/integration/start_stop_delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ func TestStartStop(t *testing.T) {
{"nocache_oldest", []string{
"--cache-images=false",
fmt.Sprintf("--kubernetes-version=%s", constants.OldestKubernetesVersion),
// default is the network created by libvirt, if we change the name minikube won't boot
// because the given network doesn't exist
"--kvm-network=default",
}},
{"feature_gates_newest_cni", []string{
"--feature-gates",
Expand Down

0 comments on commit bb56fd2

Please sign in to comment.