Repository: code-ready/crc
Pull request #2129 (2021-03-19 13:22:29)

2 preflight fixes
Details in the associated bugs/commit logs, but this fixes a bug on Ubuntu
after adding the user to the libvirt group, and tries to fix a virsh
capabilities issues on some hardened setups.

## Testing


1. run crc setup on a fresh ubuntu install
2. an error message tells the user to logout/login again
(this is currently not happening as expected)

cfergeau: e2e seems to be failing because of `https://packages.cloud.google.com/yum/repos/google-compute-engine-el8-x86_64-stable/repodata/repomd.xml [SSL certificate problem: certificate has expired]` :-/
openshift-ci[bot]: @cfergeau: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/e2e-crc | 7059d69cde4a4b2dfd3c9203b022b4a2a9963072 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/code-ready_crc/2129/pull-ci-code-ready-crc-master-e2e-crc/1372937435087900672) | `/test e2e-crc`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=code-ready&repo=crc&pr=2129). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:cfergeau).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
praveenkumar: CI is failing with following, looks like the we might need retry because we hit ` qemu:///system` and if libvirtd is socket enabled it might be taking time to activate libvirt and failed?

```
22:34:33 level=debug msg="Checking 'virsh capabilities' for libvirtd/qemu availability"
22:34:33 level=debug msg="Running 'virsh --readonly --connect qemu:///system capabilities'"
22:34:33 level=debug msg="Command failed: exit status 1"
22:34:33 level=debug msg="stdout: "
22:34:33 level=debug msg="stderr: error: failed to connect to the hypervisor\nerror: Cannot recv data: Connection reset by peer\n"
22:34:33 level=debug msg="Failed to run 'virsh capabilities': exit status 1"
22:34:33 level=warning msg="Preflight checks failed during `crc start`, please try to run `crc setup` first in case you haven't done so yet"
22:34:33 Failed to run 'virsh capabilities': exit status 1
```
cfergeau: > CI is failing with following, looks like the we might need retry because we hit ` qemu:///system` and if libvirtd is socket enabled it might be taking time to activate libvirt and failed?

Retrying feels like a workaround, even if it takes a few seconds to restart libvirtd, it should not close the connection like this?
openshift-ci[bot]: @cfergeau: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/e2e-crc | 153992fdd5be5a9bea930bbc52f64709c46dcb97 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/code-ready_crc/2129/pull-ci-code-ready-crc-master-e2e-crc/1374025374375088128) | `/test e2e-crc`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=code-ready&repo=crc&pr=2129). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:cfergeau).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
openshift-ci[bot]: @cfergeau: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/e2e-crc | 099f99b1ab42f6f2ee6b1577083d985c8186eb53 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/code-ready_crc/2129/pull-ci-code-ready-crc-master-e2e-crc/1374050282664628224) | `/test e2e-crc`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=code-ready&repo=crc&pr=2129). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:cfergeau).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
openshift-ci[bot]: @cfergeau: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/e2e-crc | 23d13afde221b44086c5dcf007c96a516dad5444 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/code-ready_crc/2129/pull-ci-code-ready-crc-master-e2e-crc/1374266004137316352) | `/test e2e-crc`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=code-ready&repo=crc&pr=2129). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:cfergeau).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
openshift-ci[bot]: @cfergeau: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/e2e-crc | 23d13afde221b44086c5dcf007c96a516dad5444 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/code-ready_crc/2129/pull-ci-code-ready-crc-master-e2e-crc/1374266004137316352) | `/test e2e-crc`
ci/prow/images | 23d13afde221b44086c5dcf007c96a516dad5444 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/code-ready_crc/2129/pull-ci-code-ready-crc-master-images/1374266004170870784) | `/test images`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=code-ready&repo=crc&pr=2129). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:cfergeau).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
openshift-ci[bot]: @cfergeau: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/e2e-crc | 861886b68b91466a9cf8841c28bb9aa071dd496b | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/code-ready_crc/2129/pull-ci-code-ready-crc-master-e2e-crc/1374291076575137792) | `/test e2e-crc`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=code-ready&repo=crc&pr=2129). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:cfergeau).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
openshift-ci[bot]: @cfergeau: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/e2e-crc | 437819a2be5d7aaf8fa0b539528d75d2ec8c62cb | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/code-ready_crc/2129/pull-ci-code-ready-crc-master-e2e-crc/1374312996087533568) | `/test e2e-crc`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=code-ready&repo=crc&pr=2129). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:cfergeau).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
openshift-ci[bot]: @cfergeau: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/e2e-crc | d72a06aaa325473827e4857651d65bdb20a873b4 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/code-ready_crc/2129/pull-ci-code-ready-crc-master-e2e-crc/1374344952313548800) | `/test e2e-crc`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=code-ready&repo=crc&pr=2129). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:cfergeau).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
cfergeau: > > CI is failing with following, looks like the we might need retry because we hit ` qemu:///system` and if libvirtd is socket enabled it might be taking time to activate libvirt and failed?
> 
> Retrying feels like a workaround, even if it takes a few seconds to restart libvirtd, it should not close the connection like this?

Phew, CI is finally green. libvirtd is confused for a few seconds after the time jump (date -s "5 minutes"). This seems to be really related to the time jump, as during testing, if I sleep 5 minutes instead, I don't see the same issue for a few seconds. I've added some wait in the clicumber test right after changing the time to ensure libvirtd is ready.

Patch:
diff --git a/docs/source/topics/assembly_networking.adoc b/docs/source/topics/assembly_networking.adoc
index 661cb33e3..36647b8bb 100644
--- a/docs/source/topics/assembly_networking.adoc
+++ b/docs/source/topics/assembly_networking.adoc
@@ -3,6 +3,8 @@
 
 include::ref_dns-configuration.adoc[leveloffset=+1]
 
+include::ref_reserved-ip-subnets.adoc[leveloffset=+1]
+
 include::proc_starting-codeready-containers-behind-proxy.adoc[leveloffset=+1]
 
 include::proc_setting-up-remote-server.adoc[leveloffset=+1]
diff --git a/docs/source/topics/ref_reserved-ip-subnets.adoc b/docs/source/topics/ref_reserved-ip-subnets.adoc
new file mode 100644
index 000000000..f6fd3bcbf
--- /dev/null
+++ b/docs/source/topics/ref_reserved-ip-subnets.adoc
@@ -0,0 +1,17 @@
+[id="reserved-ip-subnets_{context}"]
+= Reserved IP subnets
+
+The {prod} OpenShift cluster reserves IP subnets for internal use which should not collide with your host network.
+Ensure that the following IP subnets are available for use:
+
+.Reserved IP subnets
+* `10.217.0.0/22`
+* `10.217.4.0/23`
+* `192.168.126.0/24`
+
+Additionally, each host hypervisor reserves an additional IP subnet depending on the host operating system.
+On {msw}, the hypervisor reserves a randomly generated IP subnet that cannot be determined ahead-of-time.
+The reserved subnets for Linux and {mac} are as follows:
+
+Linux:: `192.168.130.0/24`
+{mac}:: `192.168.64.0/24`
diff --git a/pkg/crc/machine/start.go b/pkg/crc/machine/start.go
index c63ae7cee..1716f5ea0 100644
--- a/pkg/crc/machine/start.go
+++ b/pkg/crc/machine/start.go
@@ -96,17 +96,37 @@ func (client *client) updateVMConfig(startConfig StartConfig, api libmachine.API
 func growRootFileSystem(sshRunner *crcssh.Runner) error {
 	// With 4.7, this is quite a manual process until https://github.com/openshift/installer/pull/4746 gets fixed
 	// See https://github.com/code-ready/crc/issues/2104 for details
-	if _, _, err := sshRunner.Run("sudo /usr/bin/growpart /dev/vda 4"); err != nil {
-		var sshErr *ssh.ExitError
-		if errors.As(err, &sshErr) {
-			logging.Debugf("/dev/vda4 already has the expected size, nothing to do")
-			return nil
+	rootPart, _, err := sshRunner.Run("realpath", "/dev/disk/by-label/root")
+	if err != nil {
+		return err
+	}
+	rootPart = strings.TrimSpace(rootPart)
+	if !strings.HasPrefix(rootPart, "/dev/vda") && !strings.HasPrefix(rootPart, "/dev/sda") {
+		return fmt.Errorf("Unexpected root device: %s", rootPart)
+	}
+	// with '/dev/[sv]da4' as input, run 'growpart /dev/[sv]da 4'
+	if _, _, err := sshRunner.RunPrivileged(fmt.Sprintf("Growing %s partition", rootPart), "/usr/bin/growpart", rootPart[:len("/dev/.da")], rootPart[len(rootPart)-1:]); err != nil {
+		var exitErr *ssh.ExitError
+		if !errors.As(err, &exitErr) {
+			return err
+		}
+		if exitErr.ExitStatus() != 1 {
+			return err
 		}
 
+		logging.Debugf("No free space after %s, nothing to do", rootPart)
+		return nil
+	}
+
+	logging.Infof("Resizing %s filesystem", rootPart)
+	if _, _, err := sshRunner.RunPrivileged("Remounting /sysroot read/write", "mount -o remount,rw /sysroot"); err != nil {
 		return err
 	}
-	_, _, err := sshRunner.Run("sudo mount -o remount,rw /sysroot && sudo xfs_growfs /dev/vda4")
-	return err
+	if _, _, err = sshRunner.RunPrivileged(fmt.Sprintf("Growing %s filesystem", rootPart), "xfs_growfs", rootPart); err != nil {
+		return err
+	}
+
+	return nil
 }
 func (client *client) Start(ctx context.Context, startConfig StartConfig) (*StartResult, error) {
 	telemetry.SetCPUs(ctx, startConfig.CPUs)
diff --git a/pkg/crc/preflight/preflight_checks_linux.go b/pkg/crc/preflight/preflight_checks_linux.go
index 4e56f705e..3eeb1bcea 100644
--- a/pkg/crc/preflight/preflight_checks_linux.go
+++ b/pkg/crc/preflight/preflight_checks_linux.go
@@ -88,7 +88,7 @@ func fixKvmEnabled() error {
 }
 
 func getLibvirtCapabilities() (*libvirtxml.Caps, error) {
-	stdOut, _, err := crcos.RunWithDefaultLocale("virsh", "capabilities")
+	stdOut, _, err := crcos.RunWithDefaultLocale("virsh", "--readonly", "--connect", "qemu:///system", "capabilities")
 	if err != nil {
 		return nil, fmt.Errorf("Failed to run 'virsh capabilities': %v", err)
 	}
@@ -208,24 +208,45 @@ func checkUserPartOfLibvirtGroup() error {
 	return fmt.Errorf("%s is not part of the libvirt group", currentUser.Username)
 }
 
-func fixUserPartOfLibvirtGroup(distro *linux.OsRelease) func() error {
+func fixUserPartOfLibvirtGroup() error {
+	logging.Debug("Adding current user to the libvirt group")
+	currentUser, err := user.Current()
+	if err != nil {
+		logging.Debugf("user.Current() failed: %v", err)
+		return fmt.Errorf("Failed to get current user id")
+	}
+	_, _, err = crcos.RunPrivileged("Adding user to the libvirt group", "usermod", "-a", "-G", "libvirt", currentUser.Username)
+	if err != nil {
+		return fmt.Errorf("Failed to add user to libvirt group")
+	}
+	logging.Debug("Current user is in the libvirt group")
+
+	return err
+}
+
+func checkCurrentGroups(distro *linux.OsRelease) func() error {
 	return func() error {
-		logging.Debug("Adding current user to the libvirt group")
-		currentUser, err := user.Current()
-		if err != nil {
-			logging.Debugf("user.Current() failed: %v", err)
-			return fmt.Errorf("Failed to get current user id")
+		if !distroIsLike(distro, linux.Ubuntu) {
+			return nil
 		}
-		_, _, err = crcos.RunPrivileged("Adding user to the libvirt group", "usermod", "-a", "-G", "libvirt", currentUser.Username)
+
+		// After adding the user to the libvirt group, they need to relogin for the new group to be used by the currrent shell
+		gids, err := os.Getgroups()
 		if err != nil {
-			return fmt.Errorf("Failed to add user to libvirt group")
+			return err
 		}
-		logging.Debug("Current user is in the libvirt group")
-
-		if distroIsLike(distro, linux.Ubuntu) {
-			return fmt.Errorf("Current user added to libvirt group. Please logout, login again, and run crc setup again")
+		for _, gid := range gids {
+			group, err := user.LookupGroupId(fmt.Sprintf("%d", gid))
+			if err != nil {
+				logging.Debugf("Failed to lookup group id %d: %v", gid, err)
+				continue
+			}
+			if group.Name == "libvirt" {
+				logging.Debug("libvirt group is active for the current user/process")
+				return nil
+			}
 		}
-		return err
+		return fmt.Errorf("User in the currently active process is not part of the libvirt group")
 	}
 }
 
diff --git a/pkg/crc/preflight/preflight_linux.go b/pkg/crc/preflight/preflight_linux.go
index e7e270cb7..b589ea2d9 100644
--- a/pkg/crc/preflight/preflight_linux.go
+++ b/pkg/crc/preflight/preflight_linux.go
@@ -43,7 +43,14 @@ func libvirtPreflightChecks(distro *linux.OsRelease) []Check {
 			checkDescription: "Checking if user is part of libvirt group",
 			check:            checkUserPartOfLibvirtGroup,
 			fixDescription:   "Adding user to libvirt group",
-			fix:              fixUserPartOfLibvirtGroup(distro),
+			fix:              fixUserPartOfLibvirtGroup,
+		},
+		{
+			configKeySuffix:  "check-libvirt-group-active",
+			checkDescription: "Checking if active user/process is currently part of the libvirt group",
+			check:            checkCurrentGroups(distro),
+			fixDescription:   "You need to logout, re-login, and run crc setup again before the user is effectively a member of the 'libvirt' group.",
+			flags:            NoFix,
 		},
 		{
 			configKeySuffix:  "check-libvirt-running",
diff --git a/pkg/crc/segment/segment.go b/pkg/crc/segment/segment.go
index 776f9f75b..b51a57e82 100644
--- a/pkg/crc/segment/segment.go
+++ b/pkg/crc/segment/segment.go
@@ -65,14 +65,14 @@ func (c *Client) Upload(ctx context.Context, action string, duration time.Durati
 		return nil
 	}
 
-	anonymousID, uerr := getUserIdentity(c.telemetryFilePath)
+	userID, uerr := getUserIdentity(c.telemetryFilePath)
 	if uerr != nil {
 		return uerr
 	}
 
 	if err := c.segmentClient.Enqueue(analytics.Identify{
-		AnonymousId: anonymousID,
-		Traits:      addConfigTraits(c.config, traits()),
+		UserId: userID,
+		Traits: addConfigTraits(c.config, traits()),
 	}); err != nil {
 		return err
 	}
@@ -92,9 +92,9 @@ func (c *Client) Upload(ctx context.Context, action string, duration time.Durati
 	}
 
 	return c.segmentClient.Enqueue(analytics.Track{
-		AnonymousId: anonymousID,
-		Event:       action,
-		Properties:  properties,
+		UserId:     userID,
+		Event:      action,
+		Properties: properties,
 	})
 }
 


Test patch:
diff --git a/pkg/crc/preflight/preflight_linux_test.go b/pkg/crc/preflight/preflight_linux_test.go
index 6837fac1c..1cc33c3b0 100644
--- a/pkg/crc/preflight/preflight_linux_test.go
+++ b/pkg/crc/preflight/preflight_linux_test.go
@@ -73,6 +73,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkKvmEnabled},
 			{check: checkLibvirtInstalled},
 			{check: checkUserPartOfLibvirtGroup},
+			{configKeySuffix: "check-libvirt-group-active"},
 			{check: checkLibvirtServiceRunning},
 			{check: checkLibvirtVersion},
 			{check: checkMachineDriverLibvirtInstalled},
@@ -104,6 +105,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkKvmEnabled},
 			{check: checkLibvirtInstalled},
 			{check: checkUserPartOfLibvirtGroup},
+			{configKeySuffix: "check-libvirt-group-active"},
 			{check: checkLibvirtServiceRunning},
 			{check: checkLibvirtVersion},
 			{check: checkMachineDriverLibvirtInstalled},
@@ -129,6 +131,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkKvmEnabled},
 			{check: checkLibvirtInstalled},
 			{check: checkUserPartOfLibvirtGroup},
+			{configKeySuffix: "check-libvirt-group-active"},
 			{check: checkLibvirtServiceRunning},
 			{check: checkLibvirtVersion},
 			{check: checkMachineDriverLibvirtInstalled},
@@ -159,6 +162,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkKvmEnabled},
 			{check: checkLibvirtInstalled},
 			{check: checkUserPartOfLibvirtGroup},
+			{configKeySuffix: "check-libvirt-group-active"},
 			{check: checkLibvirtServiceRunning},
 			{check: checkLibvirtVersion},
 			{check: checkMachineDriverLibvirtInstalled},
@@ -184,6 +188,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkKvmEnabled},
 			{check: checkLibvirtInstalled},
 			{check: checkUserPartOfLibvirtGroup},
+			{configKeySuffix: "check-libvirt-group-active"},
 			{check: checkLibvirtServiceRunning},
 			{check: checkLibvirtVersion},
 			{check: checkMachineDriverLibvirtInstalled},
@@ -214,6 +219,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkKvmEnabled},
 			{check: checkLibvirtInstalled},
 			{check: checkUserPartOfLibvirtGroup},
+			{configKeySuffix: "check-libvirt-group-active"},
 			{check: checkLibvirtServiceRunning},
 			{check: checkLibvirtVersion},
 			{check: checkMachineDriverLibvirtInstalled},
@@ -239,6 +245,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkKvmEnabled},
 			{check: checkLibvirtInstalled},
 			{check: checkUserPartOfLibvirtGroup},
+			{configKeySuffix: "check-libvirt-group-active"},
 			{check: checkLibvirtServiceRunning},
 			{check: checkLibvirtVersion},
 			{check: checkMachineDriverLibvirtInstalled},
@@ -271,6 +278,7 @@ var checkListForDistros = []checkListForDistro{
 			{check: checkKvmEnabled},
 			{check: checkLibvirtInstalled},
 			{check: checkUserPartOfLibvirtGroup},
+			{configKeySuffix: "check-libvirt-group-active"},
 			{check: checkLibvirtServiceRunning},
 			{check: checkLibvirtVersion},
 			{check: checkMachineDriverLibvirtInstalled},
diff --git a/pkg/crc/segment/segment_test.go b/pkg/crc/segment/segment_test.go
index d315fbb7e..435fc8fe7 100644
--- a/pkg/crc/segment/segment_test.go
+++ b/pkg/crc/segment/segment_test.go
@@ -24,9 +24,9 @@ import (
 
 type segmentResponse struct {
 	Batch []struct {
-		AnonymousID string `json:"anonymousId"`
-		MessageID   string `json:"messageId"`
-		Traits      struct {
+		UserID    string `json:"userId"`
+		MessageID string `json:"messageId"`
+		Traits    struct {
 			OS                   string `json:"os"`
 			ExperimentalFeatures bool   `json:"enable-experimental-features"`
 		} `json:"traits"`
@@ -83,20 +83,27 @@ func TestClientUploadWithConsentAndWithSerializableError(t *testing.T) {
 	config, err := newTestConfig("yes")
 	require.NoError(t, err)
 
-	c, err := newCustomClient(config, filepath.Join(dir, "telemetry"), server.URL)
+	uuidFile := filepath.Join(dir, "telemetry")
+
+	c, err := newCustomClient(config, uuidFile, server.URL)
 	require.NoError(t, err)
 
 	require.NoError(t, c.Upload(context.Background(), "start", time.Minute, crcErr.ToSerializableError(crcErr.VMNotExist)))
 	require.NoError(t, c.Close())
 
+	uuid, err := ioutil.ReadFile(uuidFile)
+	require.NoError(t, err)
+
 	select {
 	case x := <-body:
 		s := segmentResponse{}
 		require.NoError(t, json.Unmarshal(x, &s))
 		require.Equal(t, s.Batch[0].Type, "identify")
+		require.Equal(t, s.Batch[0].UserID, string(uuid))
 		require.Equal(t, s.Batch[0].Traits.OS, runtime.GOOS)
 		require.Equal(t, s.Batch[0].Traits.ExperimentalFeatures, true)
 		require.Equal(t, s.Batch[1].Type, "track")
+		require.Equal(t, s.Batch[1].UserID, string(uuid))
 		require.Equal(t, s.Batch[1].Properties.Error, crcErr.VMNotExist.Error())
 		require.Equal(t, s.Batch[1].Properties.ErrorType, "errors.vmNotExist")
 		require.Equal(t, s.Batch[1].Properties.Version, version.GetCRCVersion())
diff --git a/test/e2e/features/cert_rotation.feature b/test/e2e/features/cert_rotation.feature
index 85e4919cb..9ea651c40 100644
--- a/test/e2e/features/cert_rotation.feature
+++ b/test/e2e/features/cert_rotation.feature
@@ -5,12 +5,15 @@ Feature: Certificate rotation test
     certificate rotation to happen successfully and to be able to deploy
     an app and check its accessibility.
 
+    Scenario: Setup CRC
+        Given executing "crc setup" succeeds
+
     Scenario: Set clock to 3 months ahead on the host
         Given executing "sudo timedatectl set-ntp off" succeeds
         Then executing "sudo date -s '3 month'" succeeds
+        And with up to "10" retries with wait period of "1s" command "virsh --readonly -c qemu:///system capabilities" output matches "^<capabilities>"
 
     Scenario: Start CRC
-        Given executing "crc setup" succeeds
         When starting CRC with default bundle along with stopped network time synchronization succeeds
         Then stdout should contain "Started the OpenShift cluster"
         And executing "eval $(crc oc-env)" succeeds
diff --git a/test/e2e/features/story_health.feature b/test/e2e/features/story_health.feature
index d18d40936..a0a259eff 100644
--- a/test/e2e/features/story_health.feature
+++ b/test/e2e/features/story_health.feature
@@ -53,7 +53,7 @@ Feature: End-to-end health check
         Then checking that CRC is stopped
         When starting CRC with default bundle succeeds
         Then checking that CRC is running
-        And with up to "2" retries with wait period of "1m" http response from "http://httpd-example-testproj.apps-crc.testing" has status code "200"
+        And with up to "4" retries with wait period of "1m" http response from "http://httpd-example-testproj.apps-crc.testing" has status code "200"
 
     @darwin @linux @windows
     Scenario: Switch off CRC