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

kvm2 driver: add dedicated network & static ip #10792

Merged
merged 3 commits into from
Mar 30, 2021

Conversation

prezha
Copy link
Contributor

@prezha prezha commented Mar 12, 2021

fixes #9809

update2: as per @medyagh suggestion below (#10792 (comment)), i've reused the existing --network flag for specifying the private kvm network name

update: i've also added at the bottom of this description a section 'local tests passed - results' with test logs and env state

this pr creates a dedicated libvirt network (and a network bridge) for each new kvm2 cluster, also assigning each machine with a static ip that is preserved across restarts

also, during cluster creation, it's possible to specify a custom name for a private network using the existing --network flag (defaulting to 'mk-<cluster_name>')

note:

❯ env TEST_ARGS="-minikube-start-args=--driver=kvm2 -test.run TestMultiNode --cleanup=false" make integration

multinode test with kvm2 driver passed w/o issues

example

start

❯ ip -4 -br -o a s

lo               UNKNOWN        127.0.0.1/8
virbr0           DOWN           192.168.122.1/24
wlp113s0         UP             192.168.42.17/24
br-08ada8d5dfa4  DOWN           172.22.0.1/16
docker0          DOWN           172.17.0.1/16

# virsh net-list --all

 Name      State    Autostart   Persistent
--------------------------------------------
 default   active   yes         yes

create 1st kvm machine ("kvm0")

❯ minikube start -p kvm0 --driver=kvm2

😄  [kvm0] minikube v1.18.1 on Opensuse-Tumbleweed 
✨  Using the kvm2 driver based on user configuration
👍  Starting control plane node kvm0 in cluster kvm0
🔥  Creating kvm2 VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.20.2 on Docker 20.10.3 ...
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v4
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "kvm0" cluster and "default" namespace by default

create 2nd kvm machine ("minikube")

❯ minikube start --driver=kvm2

😄  minikube v1.18.1 on Opensuse-Tumbleweed 
✨  Using the kvm2 driver based on user configuration
👍  Starting control plane node minikube in cluster minikube
🔥  Creating kvm2 VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.20.2 on Docker 20.10.3 ...
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v4
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

create 3rd kvm machine ("kvm1") specifying --kvm-private-network flag

❯ minikube start -p kvm1 --driver=kvm2 --kvm-private-network="my-custom-kvm-priv-net"

😄  [kvm1] minikube v1.18.1 on Opensuse-Tumbleweed
✨  Using the kvm2 driver based on user configuration
👍  Starting control plane node kvm1 in cluster kvm1
🔥  Creating kvm2 VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.20.2 on Docker 20.10.3 ...
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v4
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "kvm1" cluster and "default" namespace by default

result

❯ minikube profile list

|----------|-----------|---------|----------------|------|---------|---------|-------|
| Profile  | VM Driver | Runtime |       IP       | Port | Version | Status  | Nodes |
|----------|-----------|---------|----------------|------|---------|---------|-------|
| kvm0     | kvm2      | docker  | 192.168.39.145 | 8443 | v1.20.2 | Running |     1 |
| kvm1     | kvm2      | docker  | 192.168.59.36  | 8443 | v1.20.2 | Running |     1 |
| minikube | kvm2      | docker  | 192.168.49.185 | 8443 | v1.20.2 | Running |     1 |
|----------|-----------|---------|----------------|------|---------|---------|-------|

❯ ip -4 -br -o a s

lo               UNKNOWN        127.0.0.1/8
virbr0           UP             192.168.122.1/24
wlp113s0         UP             192.168.42.17/24
br-08ada8d5dfa4  DOWN           172.22.0.1/16
docker0          DOWN           172.17.0.1/16
virbr1           UP             192.168.39.1/24
virbr2           UP             192.168.49.1/24
virbr3           UP             192.168.59.1/24

# virsh net-list --all

 Name                     State    Autostart   Persistent
-----------------------------------------------------------
 default                  active   yes         yes
 mk-kvm0                  active   yes         yes
 mk-minikube              active   yes         yes
 my-custom-kvm-priv-net   active   yes         yes

stop 3rd kvm machine ("kvm1")

❯ minikube stop -p kvm1

✋  Stopping node "kvm1"  ...
🛑  1 nodes stopped.

try to restart 3rd kvm machine ("kvm1") with different --kvm-private-network flag

❯ minikube start -p kvm1 --driver=kvm2 --kvm-private-network="my-custom-kvm-priv-net-new"

😄  [kvm1] minikube v1.18.1 on Opensuse-Tumbleweed
✨  Using the kvm2 driver based on existing profile
❗  You cannot change the KVM Private Network name for an exiting minikube cluster. Please first delete the cluster.
👍  Starting control plane node kvm1 in cluster kvm1
🔄  Restarting existing kvm2 VM for "kvm1" ...
🐳  Preparing Kubernetes v1.20.2 on Docker 20.10.3 ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v4
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "kvm1" cluster and "default" namespace by default

result

❯ ip -4 -br -o a s

lo               UNKNOWN        127.0.0.1/8
virbr0           UP             192.168.122.1/24
wlp113s0         UP             192.168.42.17/24
br-08ada8d5dfa4  DOWN           172.22.0.1/16
docker0          DOWN           172.17.0.1/16
virbr1           UP             192.168.39.1/24
virbr2           UP             192.168.49.1/24
virbr3           UP             192.168.59.1/24

❯ minikube profile list

|----------|-----------|---------|----------------|------|---------|---------|-------|
| Profile  | VM Driver | Runtime |       IP       | Port | Version | Status  | Nodes |
|----------|-----------|---------|----------------|------|---------|---------|-------|
| kvm0     | kvm2      | docker  | 192.168.39.145 | 8443 | v1.20.2 | Running |     1 |
| kvm1     | kvm2      | docker  | 192.168.59.36  | 8443 | v1.20.2 | Running |     1 |
| minikube | kvm2      | docker  | 192.168.49.185 | 8443 | v1.20.2 | Running |     1 |
|----------|-----------|---------|----------------|------|---------|---------|-------|

# virsh net-list --all

 Name                     State    Autostart   Persistent
-----------------------------------------------------------
 default                  active   yes         yes
 mk-kvm0                  active   yes         yes
 mk-minikube              active   yes         yes
 my-custom-kvm-priv-net   active   yes         yes

cleanup

❯ minikube delete --all

🔥  Deleting "kvm0" in kvm2 ...
💀  Removed all traces of the "kvm0" cluster.
🔥  Deleting "kvm1" in kvm2 ...
💀  Removed all traces of the "kvm1" cluster.
🔥  Deleting "minikube" in kvm2 ...
💀  Removed all traces of the "minikube" cluster.
🔥  Successfully deleted all profiles

❯ ip -4 -br -o a s

lo               UNKNOWN        127.0.0.1/8
virbr0           DOWN           192.168.122.1/24
wlp113s0         UP             192.168.42.17/24
br-08ada8d5dfa4  DOWN           172.22.0.1/16
docker0          DOWN           172.17.0.1/16

# virsh net-list --all

 Name      State    Autostart   Persistent
--------------------------------------------
 default   active   yes         yes

local tests passed - results:

TestFunctional.log
TestMultiNode.log

# virsh list --all

Id   Name                                   State
------------------------------------------------------
74   functional-20210322232222-3351985      running
79   multinode-20210322232943-3401377       running
80   multinode-20210322232943-3401377-m02   running

# virsh net-list --all

 Name                                   State    Autostart   Persistent
-------------------------------------------------------------------------
 default                                active   yes         yes
 mk-functional-20210322232222-3351985   active   yes         yes
 mk-multinode-20210322232943-3401377    active   yes         yes

# virsh net-dhcp-leases mk-functional-20210322232222-3351985

 Expiry Time           MAC address         Protocol   IP address         Hostname                            Client ID or DUID
-----------------------------------------------------------------------------------------------------------------------------------
 2021-03-23 00:23:04   52:54:00:2f:e9:c7   ipv4       192.168.39.47/24   functional-20210322232222-3351985   01:52:54:00:2f:e9:c7

# virsh net-dumpxml mk-functional-20210322232222-3351985

<network>
  <name>mk-functional-20210322232222-3351985</name>
  <uuid>167be7d1-58d1-45e1-bda6-bebd8aef155b</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr1' stp='on' delay='0'/>
  <mac address='52:54:00:15:5c:ac'/>
  <ip address='192.168.39.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.39.2' end='192.168.39.254'/>
      <host mac='52:54:00:2f:e9:c7' name='functional-20210322232222-3351985' ip='192.168.39.47'/>
    </dhcp>
  </ip>
</network>

# virsh net-dhcp-leases mk-multinode-20210322232943-3401377

 Expiry Time           MAC address         Protocol   IP address         Hostname                               Client ID or DUID
--------------------------------------------------------------------------------------------------------------------------------------
 2021-03-23 00:33:24   52:54:00:9d:ee:a6   ipv4       192.168.49.44/24   multinode-20210322232943-3401377-m03   01:52:54:00:9d:ee:a6
 2021-03-23 00:34:03   52:54:00:ba:c2:5e   ipv4       192.168.49.75/24   multinode-20210322232943-3401377       01:52:54:00:ba:c2:5e
 2021-03-23 00:35:52   52:54:00:ee:99:1a   ipv4       192.168.49.50/24   multinode-20210322232943-3401377-m02   01:52:54:00:ee:99:1a

# virsh net-dumpxml mk-multinode-20210322232943-3401377

<network>
  <name>mk-multinode-20210322232943-3401377</name>
  <uuid>966e0226-ac7c-4e2f-a6e9-c717035978de</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr2' stp='on' delay='0'/>
  <mac address='52:54:00:2a:82:40'/>
  <ip address='192.168.49.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.49.2' end='192.168.49.254'/>
      <host mac='52:54:00:ba:c2:5e' name='multinode-20210322232943-3401377' ip='192.168.49.75'/>
      <host mac='52:54:00:ee:99:1a' name='multinode-20210322232943-3401377-m02' ip='192.168.49.50'/>
    </dhcp>
  </ip>
</network>

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 12, 2021
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 12, 2021
@prezha prezha changed the title kvm2 driver: add static ip kvm2 driver: add dedicated network Mar 12, 2021
@@ -342,6 +344,7 @@ func generateClusterConfig(cmd *cobra.Command, existing *config.ClusterConfig, k
HypervUseExternalSwitch: viper.GetBool(hypervUseExternalSwitch),
HypervExternalAdapter: viper.GetString(hypervExternalAdapter),
KVMNetwork: viper.GetString(kvmNetwork),
KVMPrivateNetwork: viper.GetString(kvmPrivateNetwork),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need to add a clean up logic ? so when we delete minikube we delete the created networks too ?

Copy link
Contributor Author

@prezha prezha Mar 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that should already be an automated part of the delete - pls have a look at the cleanup (last) section in the example given in the description above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the code segment that takes care of that:

// Remove a host
func (d *Driver) Remove() error {
log.Debug("Removing machine...")
conn, err := getConnection(d.ConnectionURI)
if err != nil {
return errors.Wrap(err, "getting connection")
}
defer conn.Close()
// Tear down network if it exists and is not in use by another minikube instance
log.Debug("Trying to delete the networks (if possible)")
if err := d.deleteNetwork(); err != nil {
log.Warnf("Deleting of networks failed: %v", err)
} else {
log.Info("Successfully deleted networks")
}

@prezha prezha requested a review from medyagh March 13, 2021 03:45
@@ -191,7 +192,8 @@ func initDriverFlags() {
startCmd.Flags().Bool("vm", false, "Filter to use only VM Drivers")

// kvm2
startCmd.Flags().String(kvmNetwork, "default", "The KVM network name. (kvm2 driver only)")
startCmd.Flags().String(kvmNetwork, "default", "The KVM default network name. (kvm2 driver only)")
startCmd.Flags().String(kvmPrivateNetwork, "", "The KVM private network name. (kvm2 driver only) (default: 'mk-<cluster_name>')")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the difference of kvmNetwork and kvmPrivateNetwork
do u mind clearifying it in the help text ?

can a user specify both of them ?

how about adding some docs about it in the kvm page ?
https://minikube.sigs.k8s.io/docs/drivers/kvm2/

Copy link
Contributor Author

@prezha prezha Mar 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kvmNetwork was there from earlier, i've just added a more descriptive message to clearly distinguish it from the new kvmPrivateNetwork flag;
kvmNetwork references the default kvm network - the one that comes with standard libvirt installation to support nat, and is always called "default"; i don't think one can change this name for libvirt, and in the code, we just check if that network exists and if is active - ie, we do not try to create 'default' network and fail if it does not already exist!

i only guess that it was maybe added with the idea if it could be customised in libvirt sometime in the future (if anyone would want that)? if it is not used - better removed

on the other hand, the new kvmPrivateNetwork allows user to specify a name for the custom dedicated kvm cluster network that we make possible with this pr

proposal for code cleanup and docs update (maybe in a separate issue, not to block this one?):

  • check and remove if not used kvmNetwork flag and all references (incl the one in the cluster config) used also to pass it to the kvm driver, meant to "[re]define" 'default' kvm network
  • further, see if we need/use the 'default' kvm network at all - currently, each kvm vm/cluster is created with two interfaces: the 'default' one and the other is fixed 'minikube-net' (while after this pr each kvm cluster would have its own custom private kvm network):
    <interface type='network'>
    <source network='{{.Network}}'/>
    <mac address='{{.MAC}}'/>
    <model type='virtio'/>
    </interface>
    <interface type='network'>
    <source network='{{.PrivateNetwork}}'/>
    <mac address='{{.PrivateMAC}}'/>
    <model type='virtio'/>
    </interface>
  • update the docs accordingly

i'm happy to check if we need/use the 'default' kvm network at all and do the above-proposed actions

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prezha I suggest we use the existing

      --network='': network to run minikube with. Only available with the docker/podman drivers. If left empty, minikube will create a new network.

flag except we update the Help text to say "now it is used by docker/podman and KVM"

Copy link
Contributor Author

@prezha prezha Mar 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@medya yes, that makes sense: i'll change pr so that it uses the existing '--network' flag for private kvm network

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the commands u used to debug,

how about adding commands how to clean up KVM networks to our website as ### Troubleshooting KVM networks

@prezha
Copy link
Contributor Author

prezha commented Mar 18, 2021

I like the commands u used to debug,

how about adding commands how to clean up KVM networks to our website as ### Troubleshooting KVM networks

thanks, will do: #10870

EDIT: added in #10875

@prezha prezha requested a review from medyagh March 18, 2021 22:59
@prezha prezha added co/kvm2-driver KVM2 driver related issues do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Mar 19, 2021
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 22, 2021
@prezha prezha changed the title kvm2 driver: add dedicated network kvm2 driver: add dedicated network & static ip Mar 22, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 22, 2021
@medyagh
Copy link
Member

medyagh commented Mar 23, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Mar 23, 2021
@@ -191,7 +192,8 @@ func initDriverFlags() {
startCmd.Flags().Bool("vm", false, "Filter to use only VM Drivers")

// kvm2
startCmd.Flags().String(kvmNetwork, "default", "The KVM network name. (kvm2 driver only)")
startCmd.Flags().String(kvmNetwork, "default", "The KVM default network name. (kvm2 driver only)")
startCmd.Flags().String(kvmPrivateNetwork, "", "The KVM private network name. (kvm2 driver only) (default: 'mk-<cluster_name>')")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prezha I suggest we use the existing

      --network='': network to run minikube with. Only available with the docker/podman drivers. If left empty, minikube will create a new network.

flag except we update the Help text to say "now it is used by docker/podman and KVM"

@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: 66.1s 61.9s 64.5s
Average time for minikube: 64.2s

Times for Minikube (PR 10792): 64.1s 67.5s 65.2s
Average time for Minikube (PR 10792): 65.6s

Averages Time Per Log

+--------------------------------------------+----------+---------------------+
|                    LOG                     | MINIKUBE | MINIKUBE (PR 10792) |
+--------------------------------------------+----------+---------------------+
| * minikube v1.18.1 on Debian               | 0.1s     | 0.0s                |
| 9.11 (kvm/amd64)                           |          |                     |
| * Using the kvm2 driver based              | 0.0s     | 0.0s                |
| on user configuration                      |          |                     |
| * Starting control plane node              | 0.0s     | 0.0s                |
| minikube in cluster minikube               |          |                     |
| * Creating kvm2 VM (CPUs=2,                | 40.0s    | 39.7s               |
| Memory=3700MB, Disk=20000MB)               |          |                     |
| ...                                        |          |                     |
| * Preparing Kubernetes v1.20.2             | 15.0s    | 22.5s               |
| on Docker 20.10.3 ...                      |          |                     |
|   - Generating certificates                | 1.1s     | 0.0s                |
| and keys ...                               |          |                     |
|   - Booting up control plane               | 5.4s     | 0.0s                |
| ...                                        |          |                     |
|   - Configuring RBAC rules ...             | 0.8s     | 0.6s                |
| * Verifying Kubernetes                     | 0.1s     | 0.1s                |
| components...                              |          |                     |
|   - Using image                            | 1.2s     | 1.5s                |
| gcr.io/k8s-minikube/storage-provisioner:v4 |          |                     |
| * Enabled addons:                          | 0.5s     | 1.3s                |
| storage-provisioner,                       |          |                     |
| default-storageclass                       |          |                     |
| * Done! kubectl is now                     | 0.0s     | 0.0s                |
| configured to use "minikube"               |          |                     |
| cluster and "default"                      |          |                     |
| namespace by default                       |          |                     |
+--------------------------------------------+----------+---------------------+

docker Driver
Times for minikube: 27.9s 27.7s 30.7s
Average time for minikube: 28.7s

Times for Minikube (PR 10792): 26.3s 27.6s 30.0s
Average time for Minikube (PR 10792): 28.0s

Averages Time Per Log

+--------------------------------------------+----------+---------------------+
|                    LOG                     | MINIKUBE | MINIKUBE (PR 10792) |
+--------------------------------------------+----------+---------------------+
| * minikube v1.18.1 on Debian               | 0.2s     | 0.2s                |
| 9.11 (kvm/amd64)                           |          |                     |
| * Using the docker driver                  | 0.1s     | 0.1s                |
| based on user configuration                |          |                     |
| * Starting control plane node              | 0.1s     | 0.1s                |
| minikube in cluster minikube               |          |                     |
| * Creating docker container                | 10.2s    | 10.8s               |
| (CPUs=2, Memory=3700MB) ...                |          |                     |
| * Preparing Kubernetes v1.20.2             | 16.7s    | 15.6s               |
| on Docker 20.10.3 ...                      |          |                     |
| * Verifying Kubernetes                     | 0.1s     | 0.1s                |
| components...                              |          |                     |
|   - Using image                            | 1.3s     | 1.0s                |
| gcr.io/k8s-minikube/storage-provisioner:v4 |          |                     |
| * Enabled addons:                          | 0.1s     | 0.1s                |
| storage-provisioner,                       |          |                     |
| default-storageclass                       |          |                     |
| * Done! kubectl is now                     | 0.0s     | 0.0s                |
| configured to use "minikube"               |          |                     |
| cluster and "default"                      |          |                     |
| namespace by default                       |          |                     |
+--------------------------------------------+----------+---------------------+

@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: 68.4s 66.4s 66.1s
Average time for minikube: 67.0s

Times for Minikube (PR 10792): 66.3s 66.1s 66.2s
Average time for Minikube (PR 10792): 66.2s

Averages Time Per Log

+--------------------------------------------+----------+---------------------+
|                    LOG                     | MINIKUBE | MINIKUBE (PR 10792) |
+--------------------------------------------+----------+---------------------+
| * minikube v1.18.1 on Debian               | 0.0s     | 0.1s                |
| 9.11 (kvm/amd64)                           |          |                     |
| * Using the kvm2 driver based              | 0.0s     | 0.0s                |
| on user configuration                      |          |                     |
| * Starting control plane node              | 0.0s     | 0.0s                |
| minikube in cluster minikube               |          |                     |
| * Creating kvm2 VM (CPUs=2,                | 40.1s    | 40.0s               |
| Memory=3700MB, Disk=20000MB)               |          |                     |
| ...                                        |          |                     |
| * Preparing Kubernetes v1.20.2             | 17.0s    | 9.1s                |
| on Docker 20.10.3 ...                      |          |                     |
|   - Generating certificates                | 1.6s     | 3.1s                |
| and keys ...                               |          |                     |
|   - Booting up control plane               | 5.4s     | 10.8s               |
| ...                                        |          |                     |
|   - Configuring RBAC rules ...             | 0.8s     | 1.1s                |
| * Verifying Kubernetes                     | 0.1s     | 0.1s                |
| components...                              |          |                     |
|   - Using image                            | 1.4s     | 1.3s                |
| gcr.io/k8s-minikube/storage-provisioner:v4 |          |                     |
| * Enabled addons:                          | 0.4s     | 0.5s                |
| storage-provisioner,                       |          |                     |
| default-storageclass                       |          |                     |
| * Done! kubectl is now                     | 0.0s     | 0.0s                |
| configured to use "minikube"               |          |                     |
| cluster and "default"                      |          |                     |
| namespace by default                       |          |                     |
+--------------------------------------------+----------+---------------------+

docker Driver
Times for minikube: 30.4s 29.3s 30.8s
Average time for minikube: 30.2s

Times for Minikube (PR 10792): 31.9s 37.2s 32.5s
Average time for Minikube (PR 10792): 33.9s

Averages Time Per Log

+--------------------------------------------+----------+---------------------+
|                    LOG                     | MINIKUBE | MINIKUBE (PR 10792) |
+--------------------------------------------+----------+---------------------+
| * minikube v1.18.1 on Debian               | 0.2s     | 0.2s                |
| 9.11 (kvm/amd64)                           |          |                     |
| * Using the docker driver                  | 0.1s     | 0.1s                |
| based on user configuration                |          |                     |
| * Starting control plane node              | 0.1s     | 0.1s                |
| minikube in cluster minikube               |          |                     |
| * Creating docker container                | 11.6s    | 15.6s               |
| (CPUs=2, Memory=3700MB) ...                |          |                     |
| * Preparing Kubernetes v1.20.2             | 16.6s    | 16.7s               |
| on Docker 20.10.3 ...                      |          |                     |
| * Verifying Kubernetes                     | 0.1s     | 0.1s                |
| components...                              |          |                     |
|   - Using image                            | 1.4s     | 1.0s                |
| gcr.io/k8s-minikube/storage-provisioner:v4 |          |                     |
| * Enabled addons:                          | 0.1s     | 0.1s                |
| storage-provisioner,                       |          |                     |
| default-storageclass                       |          |                     |
| * Done! kubectl is now                     | 0.0s     | 0.0s                |
| configured to use "minikube"               |          |                     |
| cluster and "default"                      |          |                     |
| namespace by default                       |          |                     |
+--------------------------------------------+----------+---------------------+

@prezha prezha changed the title kvm2 driver: add dedicated network & static ip wip: kvm2 driver: add dedicated network & static ip Mar 23, 2021
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 23, 2021
@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: 68.2s 66.3s 63.6s
Average time for minikube: 66.0s

Times for Minikube (PR 10792): 63.6s 64.6s 63.6s
Average time for Minikube (PR 10792): 63.9s

Averages Time Per Log

+--------------------------------------------+----------+---------------------+
|                    LOG                     | MINIKUBE | MINIKUBE (PR 10792) |
+--------------------------------------------+----------+---------------------+
| * minikube v1.18.1 on Debian               | 0.0s     | 0.1s                |
| 9.11 (kvm/amd64)                           |          |                     |
| * Using the kvm2 driver based              | 0.0s     | 0.0s                |
| on user configuration                      |          |                     |
| * Starting control plane node              | 0.0s     | 0.0s                |
| minikube in cluster minikube               |          |                     |
| * Creating kvm2 VM (CPUs=2,                | 40.9s    | 39.6s               |
| Memory=3700MB, Disk=20000MB)               |          |                     |
| ...                                        |          |                     |
| * Preparing Kubernetes v1.20.2             | 15.5s    |                     |
| on Docker 20.10.4 ...                      |          |                     |
|   - Generating certificates                | 1.8s     | 3.0s                |
| and keys ...                               |          |                     |
|   - Booting up control plane               | 5.0s     | 9.9s                |
| ...                                        |          |                     |
|   - Configuring RBAC rules ...             | 0.8s     | 1.1s                |
| * Verifying Kubernetes                     | 0.1s     | 0.1s                |
| components...                              |          |                     |
|   - Using image                            | 1.2s     | 1.2s                |
| gcr.io/k8s-minikube/storage-provisioner:v4 |          |                     |
| * Enabled addons:                          | 0.6s     | 0.5s                |
| storage-provisioner,                       |          |                     |
| default-storageclass                       |          |                     |
| * Done! kubectl is now                     | 0.0s     | 0.0s                |
| configured to use "minikube"               |          |                     |
| cluster and "default"                      |          |                     |
| namespace by default                       |          |                     |
+--------------------------------------------+----------+---------------------+

docker Driver
Times for minikube: 26.8s 27.2s 26.3s
Average time for minikube: 26.8s

Times for Minikube (PR 10792): 25.5s 27.0s 26.9s
Average time for Minikube (PR 10792): 26.5s

Averages Time Per Log

+--------------------------------------------+----------+---------------------+
|                    LOG                     | MINIKUBE | MINIKUBE (PR 10792) |
+--------------------------------------------+----------+---------------------+
| * minikube v1.18.1 on Debian               | 0.2s     | 0.2s                |
| 9.11 (kvm/amd64)                           |          |                     |
| * Using the docker driver                  | 0.1s     | 0.1s                |
| based on user configuration                |          |                     |
| * Starting control plane node              | 0.1s     | 0.1s                |
| minikube in cluster minikube               |          |                     |
| * Creating docker container                | 9.4s     | 9.4s                |
| (CPUs=2, Memory=3700MB) ...                |          |                     |
| * Preparing Kubernetes v1.20.2             | 15.3s    | 15.4s               |
| on Docker 20.10.3 ...                      |          |                     |
| * Verifying Kubernetes                     | 0.1s     | 0.1s                |
| components...                              |          |                     |
|   - Using image                            | 1.5s     | 1.1s                |
| gcr.io/k8s-minikube/storage-provisioner:v4 |          |                     |
| * Enabled addons:                          | 0.1s     | 0.1s                |
| storage-provisioner,                       |          |                     |
| default-storageclass                       |          |                     |
| * Done! kubectl is now                     | 0.0s     | 0.0s                |
| configured to use "minikube"               |          |                     |
| cluster and "default"                      |          |                     |
| namespace by default                       |          |                     |
+--------------------------------------------+----------+---------------------+

@prezha prezha force-pushed the kvm-network branch 3 times, most recently from 5bac07a to f7f8701 Compare March 26, 2021 11:31
@minikube-pr-bot
Copy link

kvm2 Driver
error collecting results for kvm2 driver: timing run 0 with minikube: timing cmd: [/home/performance-monitor/minikube/out/minikube start --driver=kvm2]: waiting for minikube: exit status 69
docker Driver
Times for minikube: 30.9s 25.5s 25.9s
Average time for minikube: 27.4s

Times for Minikube (PR 10792): 36.5s 25.5s 26.0s
Average time for Minikube (PR 10792): 29.3s

Averages Time Per Log

+--------------------------------------------+----------+---------------------+
|                    LOG                     | MINIKUBE | MINIKUBE (PR 10792) |
+--------------------------------------------+----------+---------------------+
| * minikube v1.18.1 on Debian               | 0.2s     | 0.2s                |
| 9.11 (amd64)                               |          |                     |
| * Using the docker driver                  | 0.1s     | 0.1s                |
| based on user configuration                |          |                     |
| * Starting control plane node              | 0.1s     | 0.1s                |
| minikube in cluster minikube               |          |                     |
| * Creating docker container                | 10.1s    | 12.2s               |
| (CPUs=2, Memory=4000MB) ...                |          |                     |
| * Preparing Kubernetes v1.20.2             | 15.8s    | 15.7s               |
| on Docker 20.10.3 ...                      |          |                     |
| * Verifying Kubernetes                     | 0.1s     | 0.1s                |
| components...                              |          |                     |
|   - Using image                            | 0.9s     | 1.0s                |
| gcr.io/k8s-minikube/storage-provisioner:v4 |          |                     |
| * Enabled addons:                          | 0.1s     | 0.1s                |
| storage-provisioner,                       |          |                     |
| default-storageclass                       |          |                     |
| * Done! kubectl is now                     | 0.0s     | 0.0s                |
| configured to use "minikube"               |          |                     |
| cluster and "default"                      |          |                     |
| namespace by default                       |          |                     |
+--------------------------------------------+----------+---------------------+

@minikube-pr-bot
Copy link

kvm2 Driver
error collecting results for kvm2 driver: timing run 0 with minikube: timing cmd: [/home/performance-monitor/minikube/out/minikube start --driver=kvm2]: waiting for minikube: exit status 69
docker Driver
Times for minikube: 29.3s 25.8s 25.7s
Average time for minikube: 26.9s

Times for Minikube (PR 10792): 27.3s 25.7s 26.9s
Average time for Minikube (PR 10792): 26.6s

Averages Time Per Log

+--------------------------------------------+----------+---------------------+
|                    LOG                     | MINIKUBE | MINIKUBE (PR 10792) |
+--------------------------------------------+----------+---------------------+
| * minikube v1.18.1 on Debian               | 0.2s     | 0.2s                |
| 9.11 (amd64)                               |          |                     |
| * Using the docker driver                  | 0.1s     | 0.1s                |
| based on user configuration                |          |                     |
| * Starting control plane node              | 0.1s     | 0.1s                |
| minikube in cluster minikube               |          |                     |
| * Creating docker container                | 9.9s     | 9.5s                |
| (CPUs=2, Memory=4000MB) ...                |          |                     |
| * Preparing Kubernetes v1.20.2             | 15.3s    | 15.6s               |
| on Docker 20.10.3 ...                      |          |                     |
| * Verifying Kubernetes                     | 0.1s     | 0.1s                |
| components...                              |          |                     |
|   - Using image                            | 1.3s     | 1.0s                |
| gcr.io/k8s-minikube/storage-provisioner:v4 |          |                     |
| * Enabled addons:                          | 0.1s     |                     |
| default-storageclass,                      |          |                     |
| storage-provisioner                        |          |                     |
| * Done! kubectl is now                     | 0.0s     | 0.0s                |
| configured to use "minikube"               |          |                     |
| cluster and "default"                      |          |                     |
| namespace by default                       |          |                     |
+--------------------------------------------+----------+---------------------+

@minikube-pr-bot
Copy link

kvm2 Driver
error collecting results for kvm2 driver: timing run 0 with minikube: timing cmd: [/home/performance-monitor/minikube/out/minikube start --driver=kvm2]: waiting for minikube: exit status 69
docker Driver
Times for minikube: 31.1s 36.1s 25.2s
Average time for minikube: 30.8s

Times for Minikube (PR 10792): 29.9s 26.5s 24.7s
Average time for Minikube (PR 10792): 27.0s

Averages Time Per Log

+--------------------------------------------+----------+---------------------+
|                    LOG                     | MINIKUBE | MINIKUBE (PR 10792) |
+--------------------------------------------+----------+---------------------+
| * minikube v1.18.1 on Debian               | 0.2s     | 0.2s                |
| 9.11 (amd64)                               |          |                     |
| * Using the docker driver                  | 0.1s     | 0.1s                |
| based on user configuration                |          |                     |
| * Starting control plane node              | 0.1s     | 0.1s                |
| minikube in cluster minikube               |          |                     |
| * Creating docker container                | 13.7s    | 10.7s               |
| (CPUs=2, Memory=4000MB) ...                |          |                     |
| * Preparing Kubernetes v1.20.2             | 15.4s    | 14.8s               |
| on Docker 20.10.3 ...                      |          |                     |
| * Verifying Kubernetes                     | 0.1s     | 0.1s                |
| components...                              |          |                     |
|   - Using image                            | 1.1s     | 1.1s                |
| gcr.io/k8s-minikube/storage-provisioner:v4 |          |                     |
| * Enabled addons:                          | 0.1s     | 0.1s                |
| storage-provisioner,                       |          |                     |
| default-storageclass                       |          |                     |
| * Done! kubectl is now                     | 0.0s     | 0.0s                |
| configured to use "minikube"               |          |                     |
| cluster and "default"                      |          |                     |
| namespace by default                       |          |                     |
+--------------------------------------------+----------+---------------------+

@minikube-pr-bot
Copy link

kvm2 Driver
error collecting results for kvm2 driver: timing run 0 with minikube: timing cmd: [/home/performance-monitor/minikube/out/minikube start --driver=kvm2]: waiting for minikube: exit status 69
docker Driver
Times for minikube: 31.6s 27.1s 25.9s
Average time for minikube: 28.2s

Times for Minikube (PR 10792): 32.2s 25.6s 26.4s
Average time for Minikube (PR 10792): 28.1s

Averages Time Per Log

+--------------------------------------------+----------+---------------------+
|                    LOG                     | MINIKUBE | MINIKUBE (PR 10792) |
+--------------------------------------------+----------+---------------------+
| * minikube v1.18.1 on Debian               | 0.2s     | 0.2s                |
| 9.11 (amd64)                               |          |                     |
| * Using the docker driver                  | 0.1s     | 0.1s                |
| based on user configuration                |          |                     |
| * Starting control plane node              | 0.1s     | 0.1s                |
| minikube in cluster minikube               |          |                     |
| * Creating docker container                | 10.7s    | 11.1s               |
| (CPUs=2, Memory=4000MB) ...                |          |                     |
| * Preparing Kubernetes v1.20.2             | 15.6s    | 15.3s               |
| on Docker 20.10.3 ...                      |          |                     |
| * Verifying Kubernetes                     | 0.1s     | 0.1s                |
| components...                              |          |                     |
|   - Using image                            | 1.4s     | 1.1s                |
| gcr.io/k8s-minikube/storage-provisioner:v4 |          |                     |
| * Enabled addons:                          | 0.1s     | 0.1s                |
| storage-provisioner,                       |          |                     |
| default-storageclass                       |          |                     |
| * Done! kubectl is now                     | 0.0s     | 0.0s                |
| configured to use "minikube"               |          |                     |
| cluster and "default"                      |          |                     |
| namespace by default                       |          |                     |
+--------------------------------------------+----------+---------------------+

@prezha prezha force-pushed the kvm-network branch 2 times, most recently from 0e6fcbc to 7218c9e Compare March 27, 2021 04:13
@prezha prezha changed the title wip: kvm2 driver: add dedicated network & static ip kvm2 driver: add dedicated network & static ip Mar 27, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 27, 2021
@prezha prezha requested a review from medyagh March 27, 2021 21:00
@minikube-pr-bot
Copy link

kvm2 Driver
error collecting results for kvm2 driver: timing run 0 with minikube: timing cmd: [/home/performance-monitor/minikube/out/minikube start --driver=kvm2]: waiting for minikube: exit status 69
docker Driver
Times for minikube: 44.3s 31.9s 27.0s
Average time for minikube: 34.4s

Times for Minikube (PR 10792): 30.0s 31.2s 29.8s
Average time for Minikube (PR 10792): 30.4s

Averages Time Per Log

+--------------------------------------------+----------+---------------------+
|                    LOG                     | MINIKUBE | MINIKUBE (PR 10792) |
+--------------------------------------------+----------+---------------------+
| * minikube v1.18.1 on Debian               | 0.2s     | 0.8s                |
| 9.11 (amd64)                               |          |                     |
| * Using the docker driver                  | 0.1s     | 0.1s                |
| based on user configuration                |          |                     |
| * Starting control plane node              | 0.1s     | 0.1s                |
| minikube in cluster minikube               |          |                     |
| * Creating docker container                | 12.3s    | 11.0s               |
| (CPUs=2, Memory=4000MB) ...                |          |                     |
| * Preparing Kubernetes v1.20.2             | 16.7s    | 17.0s               |
| on Docker 20.10.3 ...                      |          |                     |
| * Verifying Kubernetes                     | 0.1s     | 0.1s                |
| components...                              |          |                     |
|   - Using image                            | 4.7s     | 1.2s                |
| gcr.io/k8s-minikube/storage-provisioner:v4 |          |                     |
| * Enabled addons:                          | 0.1s     | 0.1s                |
| storage-provisioner,                       |          |                     |
| default-storageclass                       |          |                     |
| * Done! kubectl is now                     | 0.0s     | 0.0s                |
| configured to use "minikube"               |          |                     |
| cluster and "default"                      |          |                     |
| namespace by default                       |          |                     |
+--------------------------------------------+----------+---------------------+

@medyagh
Copy link
Member

medyagh commented Mar 28, 2021

/retest-this-please

1 similar comment
@medyagh
Copy link
Member

medyagh commented Mar 29, 2021

/retest-this-please

@medyagh
Copy link
Member

medyagh commented Mar 30, 2021

thank you for this PR

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh, prezha

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 30, 2021
@medyagh medyagh merged commit 0de446d into kubernetes:master Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. co/kvm2-driver KVM2 driver related issues ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add static IP for KVM driver
4 participants