Repository: code-ready/crc
Pull request #1979 (2021-02-11 07:30:54)

Increase apiserver wait time for a min
In openshift 4.7 looks like the moment we start the kubelet service
and kubelet being able to start the pod, have added more than a min
time. This patch will unblocks us to start the 4.7.0-rc testing.

We should revert it as soon as https://bugzilla.redhat.com/show_bug.cgi?id=1927263
is fixed.



openshift-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/code-ready/crc/pull/1979#" title="Author self-approved">praveenkumar</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=code-ready%2Fcrc).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/code-ready/crc/blob/master/OWNERS)~~ [praveenkumar]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
openshift-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/code-ready/crc/pull/1979#pullrequestreview-588296864" title="Approved">gbraad</a>*, *<a href="https://github.com/code-ready/crc/pull/1979#" title="Author self-approved">praveenkumar</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=code-ready%2Fcrc).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/code-ready/crc/blob/master/OWNERS)~~ [gbraad,praveenkumar]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/README.adoc b/README.adoc
index 601ffa167..d764d73c9 100644
--- a/README.adoc
+++ b/README.adoc
@@ -22,7 +22,7 @@ If you are looking for a solution for running OpenShift 3.x, you will need tools
 
 === Getting CodeReady Containers
 
-CodeReady Containers binaries with an embedded OpenShift disk image can be downloaded from link:https://cloud.redhat.com/openshift/install/crc/installer-provisioned[this page].
+CodeReady Containers binaries with an embedded OpenShift disk image can be downloaded from link:https://cloud.redhat.com/openshift/create/local[this page].
 
 === Using CodeReady Containers
 
diff --git a/cmd/crc/cmd/daemon.go b/cmd/crc/cmd/daemon.go
index 18a13eea9..0b656cd45 100644
--- a/cmd/crc/cmd/daemon.go
+++ b/cmd/crc/cmd/daemon.go
@@ -27,6 +27,8 @@ func init() {
 	rootCmd.AddCommand(daemonCmd)
 }
 
+const hostVirtualIP = "192.168.127.254"
+
 var daemonCmd = &cobra.Command{
 	Use:    "daemon",
 	Short:  "Run the crc daemon",
@@ -75,6 +77,10 @@ var daemonCmd = &cobra.Command{
 							Regexp: regexp.MustCompile("crc-(.*?)-master-0"),
 							IP:     net.ParseIP("192.168.126.11"),
 						},
+						{
+							Name: "host",
+							IP:   net.ParseIP(hostVirtualIP),
+						},
 					},
 				},
 			},
@@ -83,6 +89,9 @@ var daemonCmd = &cobra.Command{
 				":6443": "192.168.127.2:6443",
 				":443":  "192.168.127.2:443",
 			},
+			NAT: map[string]string{
+				hostVirtualIP: "127.0.0.1",
+			},
 		}, endpoints)
 		return err
 	},
diff --git a/docs/source/meta/product-attributes.adoc b/docs/source/meta/product-attributes.adoc
index b5855f217..1c3167765 100644
--- a/docs/source/meta/product-attributes.adoc
+++ b/docs/source/meta/product-attributes.adoc
@@ -28,7 +28,7 @@
 :crc-gsg: {rh-prod} Getting Started Guide
 
 // URLs
-:crc-download-url: https://cloud.redhat.com/openshift/install/crc/installer-provisioned
+:crc-download-url: https://cloud.redhat.com/openshift/create/local
 :crc-gsg-url: https://code-ready.github.io/crc/
 
 :oc-download-url: https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/
diff --git a/docs/source/topics/proc_starting-the-virtual-machine.adoc b/docs/source/topics/proc_starting-the-virtual-machine.adoc
index 4f05a9bf2..8a0bdb080 100644
--- a/docs/source/topics/proc_starting-the-virtual-machine.adoc
+++ b/docs/source/topics/proc_starting-the-virtual-machine.adoc
@@ -10,7 +10,7 @@ The [command]`{bin} start` command starts the {prod} virtual machine and OpenShi
 For more information, see link:{crc-gsg-url}#setting-up-codeready-containers_gsg[Setting up {prod}].
 * On {msw}, ensure that your user account can elevate to Administrator privileges.
 * You have a valid OpenShift user pull secret.
-Copy or download the pull secret from the Pull Secret section of the link:https://cloud.redhat.com/openshift/install/crc/installer-provisioned[Install on Laptop: {rh-prod}] page on cloud.redhat.com.
+Copy or download the pull secret from the Pull Secret section of the link:https://cloud.redhat.com/openshift/create/local[Install on Laptop: {rh-prod}] page on cloud.redhat.com.
 +
 [NOTE]
 ====
diff --git a/pkg/crc/cluster/cluster.go b/pkg/crc/cluster/cluster.go
index eee417580..acfbb4b9d 100644
--- a/pkg/crc/cluster/cluster.go
+++ b/pkg/crc/cluster/cluster.go
@@ -320,7 +320,7 @@ func WaitForAPIServer(ocConfig oc.Config) error {
 		logging.Debug(stdout)
 		return nil
 	}
-	return errors.RetryAfter(2*time.Minute, waitForAPIServer, time.Second)
+	return errors.RetryAfter(3*time.Minute, waitForAPIServer, time.Second)
 }
 
 func DeleteOpenshiftAPIServerPods(ocConfig oc.Config) error {
diff --git a/pkg/crc/constants/constants.go b/pkg/crc/constants/constants.go
index de82315ad..1f9a0b8bd 100644
--- a/pkg/crc/constants/constants.go
+++ b/pkg/crc/constants/constants.go
@@ -27,7 +27,7 @@ const (
 	ConfigFile                = "crc.json"
 	LogFile                   = "crc.log"
 	DaemonLogFile             = "crcd.log"
-	CrcLandingPageURL         = "https://cloud.redhat.com/openshift/install/crc/installer-provisioned" // #nosec G101
+	CrcLandingPageURL         = "https://cloud.redhat.com/openshift/create/local" // #nosec G101
 	DefaultPodmanURLBase      = "https://storage.googleapis.com/libpod-master-releases"
 	DefaultAdminHelperCliBase = "https://github.com/code-ready/admin-helper/releases/download/0.0.2"
 	CRCMacTrayDownloadURL     = "https://github.com/code-ready/tray-macos/releases/download/v%s/crc-tray-macos.tar.gz"
diff --git a/pkg/crc/preflight/preflight_checks_common.go b/pkg/crc/preflight/preflight_checks_common.go
index 0c0a56eb0..6d7663c85 100644
--- a/pkg/crc/preflight/preflight_checks_common.go
+++ b/pkg/crc/preflight/preflight_checks_common.go
@@ -17,6 +17,15 @@ import (
 	"github.com/pkg/errors"
 )
 
+var bundleCheck = Check{
+	configKeySuffix:  "check-bundle-extracted",
+	checkDescription: "Checking if CRC bundle is extracted in '$HOME/.crc'",
+	check:            checkBundleExtracted,
+	fixDescription:   "Extracting bundle from the CRC executable",
+	fix:              fixBundleExtracted,
+	flags:            SetupOnly,
+}
+
 var genericPreflightChecks = [...]Check{
 	{
 		configKeySuffix:  "check-podman-cached",
@@ -32,14 +41,6 @@ var genericPreflightChecks = [...]Check{
 		fixDescription:   "Caching admin-helper executable",
 		fix:              fixAdminHelperExecutableCached,
 	},
-	{
-		configKeySuffix:  "check-bundle-extracted",
-		checkDescription: "Checking if CRC bundle is extracted in '$HOME/.crc'",
-		check:            checkBundleExtracted,
-		fixDescription:   "Extracting bundle from the CRC executable",
-		fix:              fixBundleExtracted,
-		flags:            SetupOnly,
-	},
 	{
 		configKeySuffix:  "check-ram",
 		checkDescription: "Checking minimum RAM requirements",
diff --git a/pkg/crc/preflight/preflight_darwin.go b/pkg/crc/preflight/preflight_darwin.go
index cb551ce6c..c8eef86a8 100644
--- a/pkg/crc/preflight/preflight_darwin.go
+++ b/pkg/crc/preflight/preflight_darwin.go
@@ -126,5 +126,6 @@ func getPreflightChecks(experimentalFeatures bool, mode network.Mode) []Check {
 		checks = append(checks, traySetupChecks[:]...)
 	}
 
+	checks = append(checks, bundleCheck)
 	return checks
 }
diff --git a/pkg/crc/preflight/preflight_linux.go b/pkg/crc/preflight/preflight_linux.go
index b2820c42c..76a9f3850 100644
--- a/pkg/crc/preflight/preflight_linux.go
+++ b/pkg/crc/preflight/preflight_linux.go
@@ -252,6 +252,7 @@ func getPreflightChecksForDistro(distro *linux.OsRelease, networkMode network.Mo
 	if networkMode == network.DefaultMode {
 		checks = append(checks, libvirtNetworkPreflightChecks[:]...)
 	}
+	checks = append(checks, bundleCheck)
 	return checks
 }
 
diff --git a/pkg/crc/preflight/preflight_windows.go b/pkg/crc/preflight/preflight_windows.go
index 5ac5f376d..e39adbb45 100644
--- a/pkg/crc/preflight/preflight_windows.go
+++ b/pkg/crc/preflight/preflight_windows.go
@@ -155,5 +155,6 @@ func getPreflightChecks(experimentalFeatures bool, networkMode network.Mode) []C
 		checks = append(checks, traySetupChecks[:]...)
 	}
 
+	checks = append(checks, bundleCheck)
 	return checks
 }


Test patch:
diff --git a/pkg/crc/preflight/preflight_linux_test.go b/pkg/crc/preflight/preflight_linux_test.go
index 020da1455..6bc0b3b3c 100644
--- a/pkg/crc/preflight/preflight_linux_test.go
+++ b/pkg/crc/preflight/preflight_linux_test.go
@@ -65,7 +65,6 @@ var checkListForDistros = []checkListForDistro{
 			{cleanup: adminhelper.CleanHostsFile},
 			{check: checkPodmanExecutableCached},
 			{check: checkAdminHelperExecutableCached},
-			{check: checkBundleExtracted},
 			{configKeySuffix: "check-ram"},
 			{cleanup: removeCRCMachinesDir},
 			{cleanup: removeOldLogs},
@@ -86,6 +85,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkCrcNetworkManagerDispatcherFile},
 			{check: checkLibvirtCrcNetworkAvailable},
 			{check: checkLibvirtCrcNetworkActive},
+			{check: checkBundleExtracted},
 		},
 	},
 	{
@@ -96,7 +96,6 @@ var checkListForDistros = []checkListForDistro{
 			{cleanup: adminhelper.CleanHostsFile},
 			{check: checkPodmanExecutableCached},
 			{check: checkAdminHelperExecutableCached},
-			{check: checkBundleExtracted},
 			{configKeySuffix: "check-ram"},
 			{cleanup: removeCRCMachinesDir},
 			{cleanup: removeOldLogs},
@@ -110,6 +109,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkMachineDriverLibvirtInstalled},
 			{cleanup: removeCrcVM},
 			{check: checkVsock},
+			{check: checkBundleExtracted},
 		},
 	},
 	{
@@ -120,7 +120,6 @@ var checkListForDistros = []checkListForDistro{
 			{cleanup: adminhelper.CleanHostsFile},
 			{check: checkPodmanExecutableCached},
 			{check: checkAdminHelperExecutableCached},
-			{check: checkBundleExtracted},
 			{configKeySuffix: "check-ram"},
 			{cleanup: removeCRCMachinesDir},
 			{cleanup: removeOldLogs},
@@ -140,6 +139,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkCrcDnsmasqConfigFile},
 			{check: checkLibvirtCrcNetworkAvailable},
 			{check: checkLibvirtCrcNetworkActive},
+			{check: checkBundleExtracted},
 		},
 	},
 	{
@@ -150,7 +150,6 @@ var checkListForDistros = []checkListForDistro{
 			{cleanup: adminhelper.CleanHostsFile},
 			{check: checkPodmanExecutableCached},
 			{check: checkAdminHelperExecutableCached},
-			{check: checkBundleExtracted},
 			{configKeySuffix: "check-ram"},
 			{cleanup: removeCRCMachinesDir},
 			{cleanup: removeOldLogs},
@@ -164,6 +163,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkMachineDriverLibvirtInstalled},
 			{cleanup: removeCrcVM},
 			{check: checkVsock},
+			{check: checkBundleExtracted},
 		},
 	},
 	{
@@ -174,7 +174,6 @@ var checkListForDistros = []checkListForDistro{
 			{cleanup: adminhelper.CleanHostsFile},
 			{check: checkPodmanExecutableCached},
 			{check: checkAdminHelperExecutableCached},
-			{check: checkBundleExtracted},
 			{configKeySuffix: "check-ram"},
 			{cleanup: removeCRCMachinesDir},
 			{cleanup: removeOldLogs},
@@ -194,6 +193,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkCrcDnsmasqConfigFile},
 			{check: checkLibvirtCrcNetworkAvailable},
 			{check: checkLibvirtCrcNetworkActive},
+			{check: checkBundleExtracted},
 		},
 	},
 	{
@@ -204,7 +204,6 @@ var checkListForDistros = []checkListForDistro{
 			{cleanup: adminhelper.CleanHostsFile},
 			{check: checkPodmanExecutableCached},
 			{check: checkAdminHelperExecutableCached},
-			{check: checkBundleExtracted},
 			{configKeySuffix: "check-ram"},
 			{cleanup: removeCRCMachinesDir},
 			{cleanup: removeOldLogs},
@@ -218,6 +217,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkMachineDriverLibvirtInstalled},
 			{cleanup: removeCrcVM},
 			{check: checkVsock},
+			{check: checkBundleExtracted},
 		},
 	},
 	{
@@ -228,7 +228,6 @@ var checkListForDistros = []checkListForDistro{
 			{cleanup: adminhelper.CleanHostsFile},
 			{check: checkPodmanExecutableCached},
 			{check: checkAdminHelperExecutableCached},
-			{check: checkBundleExtracted},
 			{configKeySuffix: "check-ram"},
 			{cleanup: removeCRCMachinesDir},
 			{cleanup: removeOldLogs},
@@ -250,6 +249,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkCrcNetworkManagerDispatcherFile},
 			{check: checkLibvirtCrcNetworkAvailable},
 			{check: checkLibvirtCrcNetworkActive},
+			{check: checkBundleExtracted},
 		},
 	},
 	{
@@ -260,7 +260,6 @@ var checkListForDistros = []checkListForDistro{
 			{cleanup: adminhelper.CleanHostsFile},
 			{check: checkPodmanExecutableCached},
 			{check: checkAdminHelperExecutableCached},
-			{check: checkBundleExtracted},
 			{configKeySuffix: "check-ram"},
 			{cleanup: removeCRCMachinesDir},
 			{cleanup: removeOldLogs},
@@ -275,6 +274,7 @@ var checkListForDistros = []checkListForDistro{
 			{cleanup: removeCrcVM},
 			{configKeySuffix: "check-apparmor-profile-setup"},
 			{check: checkVsock},
+			{check: checkBundleExtracted},
 		},
 	},
 }