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

Release ports on crc stop #4217

Merged
merged 1 commit into from
Jun 18, 2024
Merged

Conversation

vyasgun
Copy link
Contributor

@vyasgun vyasgun commented Jun 9, 2024

crc start opens and uses ports which do not need to remain exposed after the machine has been stopped. This PR will ensure that the ports are unexposed on crc stop

Fixes: Issue #4182

Solution/Idea

Describe in plain English what you solved and how. For instance, Added start command to CRC so the user can create a VM and set-up a single-node OpenShift cluster on it with one command. It requires blablabla...

Proposed changes

List main as well as consequential changes you introduced or had to introduce.

  1. Unexpose ports on stop

Testing

gvyas-mac:crc gvyas$ crc status
CRC VM:          Running
MicroShift:      Running (v4.15.12)
RAM Usage:       1.829GB of 3.904GB
Disk Usage:      7.383GB of 16.1GB (Inside the CRC VM)
Cache Usage:     258.9GB
Cache Directory: /Users/gvyas/.crc/cache
gvyas-mac:crc gvyas$ lsof -i -P | grep LISTEN | grep :443
crc       52984 gvyas   27u  IPv6  0xf2aff1d332f2083      0t0  TCP *:443 (LISTEN)
gvyas-mac:crc gvyas$ crc stop
INFO Updating kernel args...                      
INFO Stopping the instance, this may take a few minutes... 
Stopped the instance
gvyas-mac:crc gvyas$ lsof -i -P | grep LISTEN | grep :443
gvyas-mac:crc gvyas$ 
gvyas-mac:crc gvyas$ crc status
CRC VM:          Running
MicroShift:      Running (v4.15.12)
RAM Usage:       1.825GB of 3.904GB
Disk Usage:      7.411GB of 16.1GB (Inside the CRC VM)
Cache Usage:     258.9GB
Cache Directory: /Users/gvyas/.crc/cache
gvyas-mac:crc gvyas$ crc config view
- consent-telemetry                     : no
- ingress-https-port                    : 7443
- preset                                : microshift
gvyas-mac:crc gvyas$ lsof -i -P | grep LISTEN | grep :7443
crc       52984 gvyas   33u  IPv6 0x69b90fc20609dcca      0t0  TCP *:7443 (LISTEN)
gvyas-mac:crc gvyas$ crc stop
INFO Updating kernel args...                      
INFO Stopping the instance, this may take a few minutes... 
Stopped the instance
gvyas-mac:crc gvyas$ lsof -i -P | grep LISTEN | grep :7443
gvyas-mac:crc gvyas$ 

`crc start` opens and uses ports which do not need to remain exposed after the machine has been stopped. This commit will ensure that the ports are unexposed on `crc stop`
@openshift-ci openshift-ci bot requested review from anjannath and gbraad June 9, 2024 19:27
Copy link

openshift-ci bot commented Jun 9, 2024

@vyasgun: 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 1c9617e link false /test security
ci/prow/integration-crc 1c9617e link true /test integration-crc

Full PR test history. Your PR dashboard.

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.

Copy link

openshift-ci bot commented Jun 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gbraad

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

@praveenkumar praveenkumar merged commit e592451 into crc-org:main Jun 18, 2024
25 of 29 checks passed
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