Skip to content

Conversation

@praveenkumar
Copy link
Member

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Nov 28, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot requested review from albfan and evidolob November 28, 2025 10:37
@openshift-ci
Copy link

openshift-ci bot commented Nov 28, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign evidolob for approval. For more information see the Code Review Process.

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

Details 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

@praveenkumar
Copy link
Member Author

/retest

return newCache(constants.GvproxyPath(),
url,
version,
func(executable string) (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

NewAdminHelperCache uses exactly the same function, might be desirable to share that code.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we can share the code for getting the version info. May be a followup or new commit.

return errors.Wrap(err, "unexpected version of the gvproxy executable")
}
logging.Debug("gvproxy executable already cached")
// SUID is only required on Linux (checkSuid is a no-op on Windows/macOS)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure it’s not also needed on macOS? Could be better to split this check in 2, with the SUID check being linux-specific. We would get 2 separate skip- options, which would allow to skip one without skipping the other (eg skip the suid check, but keep the gvproxy download).

Copy link
Member Author

Choose a reason for hiding this comment

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

This is removed in later commits

Copy link
Member Author

Choose a reason for hiding this comment

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

we only needed the capability instead of SUID

}
// macadam version output format: "macadam version v0.2.0"
split := strings.Split(out, " ")
return strings.TrimSpace(split[len(split)-1]), nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as for NewAdminHelperCache and NewGvproxyCache

CrcLandingPageURL = "https://console.redhat.com/openshift/create/local" // #nosec G101
DefaultAdminHelperURLBase = "https://github.com/crc-org/admin-helper/releases/download/v%s/%s"
DefaultGvproxyURLBase = "https://github.com/containers/gvisor-tap-vsock/releases/download/%s/%s"
DefaultMacadamURLBase = "https://github.com/praveenkumar/macadam/releases/download/%s/%s"
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be changed now that there is a 0.3.0 release.

return errors.New("macadam executable is not cached")
}
if err := macadam.CheckVersion(); err != nil {
return errors.Wrap(err, "unexpected version of the macadam executable")
Copy link
Contributor

Choose a reason for hiding this comment

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

Let’s not add new uses of errors.Wrap in new code.
https://github.com/pkg/errors

This repository was archived by the owner on Dec 1, 2021. It is now read-only.

{Name: "api-int", IP: "192.168.127.2"},
{Name: "crc", IP: "192.168.126.11"},
Records: []types.Record{
{Name: "host", IP: net.ParseIP("192.168.127.254"), Regexp: nil},
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it required to set Regexp: nil?

{Name: "api-int", IP: net.ParseIP("192.168.127.2"), Regexp: nil},
{Name: "crc", IP: net.ParseIP("192.168.126.11"), Regexp: nil},
},
DefaultIP: net.ParseIP("192.168.127.2"),
Copy link
Contributor

Choose a reason for hiding this comment

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

DefaultIP was not there before.

}
for i := range missingPorts {
port := &missingPorts[i]
if err := daemonClient.NetworkClient.Expose(port); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn’t this logic be kept?

return false
}

func unexposePorts() error {
Copy link
Contributor

Choose a reason for hiding this comment

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

It’s used in Stop and Delete

Copy link
Member Author

Choose a reason for hiding this comment

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

since now it is manage by gvproxy process which get killed and release ports when crc stop/delete happen.

}
if err := cluster.EnsureGeneratedClientCAPresentInTheCluster(ctx, ocConfig, sshRunner, selfSignedCACert, adminClientCA); err != nil {
return errors.Wrap(err, "Failed to update user CA to cluster")
if err := sshRunner.CopyFileFromVM("/opt/kubeconfig", kubeconfigFilePath, 0644); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

0600?

This will help to use gvproxy as filename instead gvproxy-linux-amd64
Since with self sufficient bundle and cloud-init metadata pull secret
should be applied automatic so just verify it instead apply. If it is
not there that means something wrong with pull secret service in the
bundle.
This helper can use to check if net cap is part of a binary or not for
linux and implement no-ops for win and darwin
This will help to bind ports which are <1024 in Linux.
This commit have following
- macadam helper to provide value based on macadam command run
- cloud init helper to create user metadata
- remove of libmachine api
- updating vsock to work with gvproxy socket
- Some todo which need to be improved
This will help to check if the service if run and finished successfully
or not before checking the details in the cluster.
With self sufficient bundle all the ca changes happen as part of service
run in the VM so once that service finish successfully it is easy to
just copy that kubeconfig file from VM to host.
@openshift-ci
Copy link

openshift-ci bot commented Dec 17, 2025

@praveenkumar: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/security 4ad739c link false /test security
ci/prow/e2e-microshift-crc 4ad739c link true /test e2e-microshift-crc
ci/prow/e2e-crc 4ad739c link true /test e2e-crc
ci/prow/integration-crc 4ad739c link true /test integration-crc

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants