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

sync-2020.10.02 #1

Merged
merged 94 commits into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
9ff0309
use MiB with kvm driver
bluestealth Aug 5, 2020
6ad47f9
use MiB for raw disk allocations
bluestealth Aug 5, 2020
ad1e2e2
Use same conversion logic for bytes -> MiB everywhere
bluestealth Aug 12, 2020
1859274
refactor conversion functions into util
bluestealth Aug 12, 2020
4708f62
fix: profile list shows paused clusters as Running
taciomcosta Sep 5, 2020
7e7344d
Update Makefile and release notes for v1.13.1
sharifelgamal Sep 18, 2020
20d3fb0
Merge branch 'master' of github.com:kubernetes/minikube into v1.13.1
sharifelgamal Sep 18, 2020
ba0db2f
add contributor
sharifelgamal Sep 18, 2020
9fbd2e9
update-context: Automatically set the context as current/active in ku…
prezha Sep 20, 2020
1fd1f67
Merge pull request #9276 from sharifelgamal/v1.13.1
sharifelgamal Sep 21, 2020
85bf8a5
Update releases.json to include v1.13.1
minikube-bot Sep 21, 2020
0a6b52d
Merge pull request #9288 from minikube-bot/jenkins-releases.json-v1.13.1
sharifelgamal Sep 21, 2020
98591a6
Add advice for the DRV_CP_ENDPOINT error
Sep 21, 2020
f5b74f9
Merge pull request #9281 from prezha/update-context-activates-context
medyagh Sep 21, 2020
f6b524b
add profile arg
Sep 21, 2020
8190e18
Merge pull request #9291 from priyawadhwa/improve-error
medyagh Sep 22, 2020
19cc40f
update_kubernetes_version: implement a standalone program that polls …
prezha Sep 22, 2020
6bf7ca3
Validate --base-image flag and active driver combo
ilya-zuyev Sep 22, 2020
6a60983
Show invalid flag diagnostic message to user
ilya-zuyev Sep 22, 2020
603ae8f
Return ExHostPermission for insufficient config file permissions
dominikbraun Sep 22, 2020
8f4127b
Use HOST_HOME_PERMISSION kind for insufficient permissions
dominikbraun Sep 22, 2020
3f44d47
Add performance monitor code
Sep 22, 2020
3d547a9
Fix Makefile rule to build bot
Sep 22, 2020
3f457db
fix error handling
Sep 22, 2020
02cdb59
Use HostHomePermission variable in known_issues.go
dominikbraun Sep 22, 2020
76d3c9d
Fix variable name (avoid collision with imported package)
ilya-zuyev Sep 22, 2020
1444ce3
update_kubernetes_version: refactor
prezha Sep 22, 2020
bf8ec63
Simplify base-image flag validation
ilya-zuyev Sep 22, 2020
8873901
Add more unit tests
ilya-zuyev Sep 22, 2020
07642cd
Merge pull request #9300 from ilya-zuyev/gh8891_forbid_base_image_for…
medyagh Sep 23, 2020
183bdb2
Merge pull request #9302 from dominikbraun/#9297-reason-for-missing-c…
medyagh Sep 23, 2020
a493400
Merge pull request #9298 from prezha/update-kubernetes-version-i0
medyagh Sep 23, 2020
fd44e0d
Force dependency on exp to prevent dirty commit release binaries (#9309)
sharifelgamal Sep 23, 2020
7a2cd0f
Removing Duplicate Command Additions
loftkun Sep 25, 2020
b4b181b
give the logs test a little wiggle room
sharifelgamal Sep 25, 2020
ed6b756
Merge pull request #9308 from priyawadhwa/performance-monit
tstromberg Sep 25, 2020
75332f7
Merge pull request #8901 from bluestealth/MiB
tstromberg Sep 25, 2020
fb878f6
Merge pull request #9324 from sharifelgamal/time-cmd
sharifelgamal Sep 25, 2020
11cad2b
Merge pull request #9321 from loftkun/removing-duplicate-command-addi…
sharifelgamal Sep 25, 2020
54f9400
Fix white version of SVG logo (icon)
weibeld Sep 26, 2020
d3dc36e
Clean up the docker installation
afbjorklund Aug 31, 2020
9056687
Also remove the extra containerd configuration
afbjorklund Sep 27, 2020
85f8d05
Fork all files needed for kindbase from upstream
afbjorklund Sep 12, 2020
a4e4a71
Specify snapshot version of ubuntu used for kind
afbjorklund Sep 12, 2020
8a18334
Complete the fork of kindbase by copy/paste
afbjorklund Sep 27, 2020
06ac270
The ISO build doesn't need Go installed on host
afbjorklund Sep 27, 2020
5ae6ce0
Use newer version of the go-bindata tool
afbjorklund Sep 27, 2020
e6b5105
Don't trim whitespace while extracting strings
afbjorklund Sep 27, 2020
256a1c2
Added target for Windows HTML & switched encoding
blueelvis Sep 28, 2020
d34a240
hyperv: Make interface search name match case-insensitive
tstromberg Sep 28, 2020
9329d75
Merge pull request #9327 from weibeld/master
tstromberg Sep 28, 2020
96e35e0
Add 'docker status' check, improve deadline-exceeded error message
tstromberg Sep 28, 2020
1ffd800
Add comment
tstromberg Sep 28, 2020
4fa2e41
Merge branch 'master' into docker-detect
tstromberg Sep 28, 2020
d6eb9cf
Merge pull request #9333 from afbjorklund/go-bindata
medyagh Sep 28, 2020
d6d1079
Merge pull request #9332 from afbjorklund/translations-whitespace
medyagh Sep 28, 2020
647c857
Fix error in unittest, as pointed out by warning
afbjorklund Sep 28, 2020
cf7df77
Run gofmt on code, to avoid modified workspace
afbjorklund Sep 28, 2020
c2642c3
Compare fully qualified image names when pulling kic
Sep 28, 2020
5dce77b
Make 1 target for html report and remove changes to github actions
blueelvis Sep 28, 2020
c56f64b
Merge pull request #9345 from afbjorklund/gotest-string
medyagh Sep 28, 2020
5965b68
Improved file-filter for github-release-assets
Sep 29, 2020
3b26a64
Merge pull request #9348 from priyawadhwa/unable-to-download
medyagh Sep 29, 2020
be496e1
Merge pull request #9346 from afbjorklund/gofmt-register
medyagh Sep 29, 2020
8eaa3ee
Use oci.CachedDaemonInfo for status check
tstromberg Sep 29, 2020
91a3254
Use %d for exit code
tstromberg Sep 29, 2020
5ab4bc6
Remove the base target from kicbase docker build
afbjorklund Sep 29, 2020
b015cfd
Merge pull request #9351 from tillhoff/master
medyagh Sep 29, 2020
f66e0a8
Merge pull request #9330 from afbjorklund/kicbase-ubuntu
medyagh Sep 29, 2020
b340140
update kicbase image to ubuntu-based
medyagh Sep 29, 2020
5eca07a
Merge pull request #9340 from blueelvis/'task/windows_html_report'
medyagh Sep 29, 2020
23eb169
generate docs
medyagh Sep 29, 2020
0d6b6fc
Merge pull request #9343 from tstromberg/docker-detect
medyagh Sep 29, 2020
09dd4b7
Merge pull request #9342 from tstromberg/logs-api
medyagh Sep 29, 2020
ff051f9
Make sure gcp-auth addon can be enabled on startup (#9318)
sharifelgamal Sep 29, 2020
9cd4216
add network create funcs
medyagh Sep 21, 2020
f0f10d6
first version
medyagh Sep 22, 2020
fa0afb2
lint
medyagh Sep 22, 2020
2766235
try alternate if no network
medyagh Sep 24, 2020
f163cf9
update with new logic
medyagh Sep 24, 2020
b7780ec
address review comments
medyagh Sep 28, 2020
058adb7
address review comments
medyagh Sep 28, 2020
31e175c
move index machine to driver package
medyagh Sep 29, 2020
82f39d1
clarify comment
medyagh Sep 29, 2020
c48e8e5
add more unit tests
medyagh Sep 29, 2020
b84dedc
address review comments
medyagh Sep 29, 2020
790dd24
pkg machine: correct 'deleting' spelling errors
zhanw15 Sep 30, 2020
ecf8120
Merge pull request #9356 from zhanw15/patch-2
tstromberg Sep 30, 2020
5815ef8
Merge pull request #9353 from medyagh/update_kicbase_ub
medyagh Sep 30, 2020
2823462
Merge pull request #9331 from afbjorklund/github-iso
medyagh Sep 30, 2020
f807bcf
remove kic test
medyagh Sep 30, 2020
73d77e2
address review comments
medyagh Sep 30, 2020
bebad76
Merge pull request #8978 from taciomcosta/master
medyagh Oct 1, 2020
0fc0c82
Merge pull request #9294 from medyagh/docker_network
medyagh Oct 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update with new logic
  • Loading branch information
medyagh committed Sep 29, 2020
commit f163cf9e15b38e165f3663c1c3562f1e910864a1
6 changes: 2 additions & 4 deletions pkg/drivers/kic/kic.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,11 @@ func (d *Driver) Create() error {
APIServerPort: d.NodeConfig.APIServerPort,
}

// one network bridge per cluster.
defaultNetwork := d.NodeConfig.ClusterName
if gateway, err := oci.CreateNetwork(d.OCIBinary, defaultNetwork); err != nil {
if gateway, err := oci.CreateNetwork(d.OCIBinary, d.NodeConfig.ClusterName); err != nil {
glog.Warningf("failed to create network: %v", err)
out.WarningT("Unable to create dedicated network, This might result in cluster IP change after restart.")
} else {
params.Network = defaultNetwork
params.Network = d.NodeConfig.ClusterName
ip := gateway.To4()
// calculate the container IP based on its machine order
ip[3] += byte(machineOrder(d.NodeConfig.MachineName))
Expand Down
5 changes: 5 additions & 0 deletions pkg/drivers/kic/kic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ func TestMachineOrder(t *testing.T) {
Name: "second-node",
MachineName: "minikube-m02",
Want: 2},
{
Name: "funny",
MachineName: "hahaha",
Want: 1},

{
Name: "dash-profile",
MachineName: "my-dashy-minikube",
Expand Down
37 changes: 19 additions & 18 deletions pkg/drivers/kic/oci/network_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ import (
)

// DefaultSubnet subnet to be used on first cluster
const defaultSubnet = "192.168.39.0/24"
const defaultSubnetAddr = "192.168.39.0"

// big enough for a cluster of 256 nodes
const defaultSubnetRange = 24

// CreateNetwork creates a network returns gateway and error, minikube creates one network per cluster
func CreateNetwork(ociBin string, name string) (net.IP, error) {
Expand All @@ -39,21 +42,17 @@ func CreateNetwork(ociBin string, name string) (net.IP, error) {
return createDockerNetwork(name)
}

func createDockerNetwork(name string) (net.IP, error) {
func createDockerNetwork(clusterName string) (net.IP, error) {
// check if the network already exists
subnet, gateway, err := dockerNetworkInspect(name)
subnet, gateway, err := dockerNetworkInspect(clusterName)
if err == nil {
glog.Infof("Found existing network with subnet %s and gateway %s.", subnet, gateway)
return gateway, nil
}
// simple way to create networks, subnet is taken, try one bigger
attempt := 0
_, subnet, err = net.ParseCIDR(defaultSubnet)
if err != nil {
return nil, errors.Wrapf(err, "parse default subnet %s", defaultSubnet)
}

gateway, err = tryCreateDockerNetwork(subnet, name)
subnetAddr := defaultSubnetAddr
gateway, err = tryCreateDockerNetwork(subnetAddr, defaultSubnetRange, clusterName)
if err != nil {
if err != ErrNetworkSubnetTaken {
return nil, errors.Wrapf(err, "error creating network")
Expand All @@ -62,18 +61,20 @@ func createDockerNetwork(name string) (net.IP, error) {
// we can try up to 255
for attempt < 13 {
attempt++
glog.Infof("Couldn't create network %q at %q subnet will try again with a new subnet ...", name, subnet)
glog.Infof("Couldn't create network %q at %q subnet will try again with a new subnet ...", clusterName, subnetAddr)
// increase 3nd digit by 10 each time
// 13 times adding 10 defaultSubnet "192.168.39.0/24"
// at most it will add up to 169 which is still less than max allowed 255
// this is large enough to try more and not too small to not try enough
// can be tuned in the next iterations
subnet.IP.To4()[2] += 10
gateway, err := tryCreateDockerNetwork(subnet, name)
ip := net.ParseIP(subnetAddr).To4()
ip[2] += byte(9 + attempt)

gateway, err = tryCreateDockerNetwork(ip.String(), defaultSubnetRange, clusterName)
if err == nil {
return gateway, nil
}
if err == ErrNetworkSubnetTaken {
if errors.Is(err, ErrNetworkSubnetTaken) || errors.Is(err, ErrNetworkGatewayTaken) {
continue
}
}
Expand All @@ -82,12 +83,12 @@ func createDockerNetwork(name string) (net.IP, error) {
return gateway, nil
}

func tryCreateDockerNetwork(subnet *net.IPNet, name string) (net.IP, error) {
gateway := subnet.IP.To4()
gateway[3]++ // first ip for gateway
glog.Infof("attempt to create network %q with subnet: %s and gateway %s...", subnet, name, gateway)
func tryCreateDockerNetwork(subnetAddr string, subnetRange int, name string) (net.IP, error) {
gateway := net.ParseIP(subnetAddr)
gateway.To4()[3]++ // first ip for gateway
glog.Infof("attempt to create network %q with subnet: %s and gateway %s...", subnetAddr, name, gateway)
// options documentation https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options
rr, err := runCmd(exec.Command(Docker, "network", "create", "--driver=bridge", fmt.Sprintf("--subnet=%s", subnet), fmt.Sprintf("--gateway=%s", gateway), "-o", "--ip-masq", "-o", "--icc", fmt.Sprintf("--label=%s=%s", CreatedByLabelKey, "true"), name))
rr, err := runCmd(exec.Command(Docker, "network", "create", "--driver=bridge", fmt.Sprintf("--subnet=%s", fmt.Sprintf("%s/%d", subnetAddr, subnetRange)), fmt.Sprintf("--gateway=%s", gateway), "-o", "--ip-masq", "-o", "--icc", fmt.Sprintf("--label=%s=%s", CreatedByLabelKey, "true"), name))
if err != nil {
if strings.Contains(rr.Output(), "Pool overlaps with other one on this address space") {
return nil, ErrNetworkSubnetTaken
Expand Down