Description of problem:
When use oc-mirror try to band port failed will panic
Version-Release number of selected component (if applicable):
./oc-mirror version Logging to .oc-mirror.log WARNING: This version information is deprecated and will be replaced with the output from --short. Use --output=yaml|json to get the full version. Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.15.0-202311101707.p0.g1c8f538.assembly.stream-1c8f538", GitCommit:"1c8f538897c88011c51ab53ea5073547521f0676", GitTreeState:"clean", BuildDate:"2023-11-10T18:49:00Z", GoVersion:"go1.20.10 X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
How reproducible:
always
Steps to Reproduce:
run command : oc-mirror --from file://out docker://localhost:5000/ocptest --v2 --config config.yaml --dest-tls-verify=false
Actual results:
oc-mirror --from file://out docker://localhost:5000/ocptest --v2 --config config.yaml --dest-tls-verify=false
--v2 flag identified, flow redirected to the oc-mirror v2 version. PLEASE DO NOT USE that. V2 is still under development and it is not ready to be used.
2023/11/15 13:04:47 [INFO] : mode diskToMirror
2023/11/15 13:04:47 [INFO] : local storage registry will log to /app1/1106/logs/registry.log
2023/11/15 13:04:47 [INFO] : starting local storage on :5000
panic: listen tcp :5000: bind: address already in use
goroutine 67 [running]:
github.com/openshift/oc-mirror/v2/pkg/cli.panicOnRegistryError(0x0?)
/go/src/github.com/openshift/oc-mirror/vendor/github.com/openshift/oc-mirror/v2/pkg/cli/executor.go:298 +0x4e
created by github.com/openshift/oc-mirror/v2/pkg/cli.(*ExecutorSchema).PrepareStorageAndLogs
/go/src/github.com/openshift/oc-mirror/vendor/github.com/openshift/oc-mirror/v2/pkg/cli/executor.go:286 +0x945
Expected results:
Should exit with error but not panic
- clones
-
OCPBUGS-23236 oc-mirror failed on mode diskToMirror with error :errArray initializing source docker://localhost:5000/openshift/graph-image:latest
- Closed
- is cloned by
-
OCPBUGS-24357 oc-mirror should not save the .oc-mirror logs to user home dir , better to use the working directory
- Verified
- links to
-
RHSA-2023:7198 OpenShift Container Platform 4.15 security update