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

fix: handle no docker auth and log only a warning when getting auth credentials fails #2579

Merged
merged 6 commits into from
Oct 31, 2024

Conversation

skylenet
Copy link
Collaborator

@skylenet skylenet commented Oct 30, 2024

Fix for :

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xc0fcb6]

goroutine 1 [running]:
github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/engine_functions/docker_config_storage_creator.storeConfigInVolume({0x2879630, 0xc000062160}, 0xc000062160?, {0xc00017d240, 0x40}, 0x2, 0x7f88a4ef0960?, {0x22d6d69, 0xe})
	/root/project/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/engine_functions/docker_config_storage_creator/docker_config_storage_creator.go:119 +0x756
github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/engine_functions/docker_config_storage_creator.CreateDockerConfigStorage({0x2879630, 0xc000062160}, {0xc00055c240, 0x40}, {0x22fc9c9, 0x1e}, {0x22d6d69, 0xe}, 0xc000093080)
	/root/project/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/engine_functions/docker_config_storage_creator/docker_config_storage_creator.go:79 +0x42f
github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/engine_functions.CreateEngine({0x2879630, 0xc000062160}, {0x22e3b55, 0x13}, {0x22c6bf3, 0x5}, 0x25ee, 0xc00040e6c0, 0x0, {0x0, ...}, ...)
	/root/project/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/engine_functions/create_engine.go:268 +0x1ebe
github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend.(*DockerKurtosisBackend).CreateEngine(0xc0006f3470?, {0x2879630?, 0xc000062160?}, {0x22e3b55?, 0xc0006f34d8?}, {0x22c6bf3?, 0x1f66100?}, 0xe6c0?, 0x22d9c8b?, 0x0, ...)
	/root/project/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/docker_kurtosis_backend.go:121 +0x91
github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_impls/metrics_reporting.(*MetricsReportingKurtosisBackend).CreateEngine(0x0?, {0x2879630?, 0xc000062160?}, {0x22e3b55, 0x13}, {0x22c6bf3, 0x5}, 0x0?, 0x3bafb00?, 0x0, ...)
	/root/project/container-engine-lib/lib/backend_impls/metrics_reporting/metrics_reporting_kurtosis_backend.go:60 +0x8a
github.com/kurtosis-tech/kurtosis/engine/launcher/engine_server_launcher.(*EngineServerLauncher).LaunchWithCustomVersion(0xc000530150, {0x2879630, 0xc000062160}, {0x22c6bf3, 0x5}, 0x6f3698?, 0xc0?, {0xc000056d80, 0x40}, 0x0, ...)
	/root/project/engine/launcher/engine_server_launcher/engine_server_launcher.go:138 +0x275
github.com/kurtosis-tech/kurtosis/engine/launcher/engine_server_launcher.(*EngineServerLauncher).LaunchWithDefaultVersion(0xc00083e8a0?, {0x2879630?, 0xc000062160?}, 0x40e210?, 0xc0?, {0xc000056d80?, 0x[20](https://github.com/ethpandaops/ethereum-package/actions/runs/11596169403/job/32286576485#step:5:21)3000?}, 0x0?, {0x2860ba0, 0x3c9fe38}, ...)
	/root/project/engine/launcher/engine_server_launcher/engine_server_launcher.go:57 +0x165
github.com/kurtosis-tech/kurtosis/cli/cli/helpers/engine_manager.(*engineExistenceGuarantor).VisitStopped(0xc0003ae1c0)
	/root/project/cli/cli/helpers/engine_manager/engine_existence_guarantor.go:220 +0x8b1
github.com/kurtosis-tech/kurtosis/cli/cli/helpers/engine_manager.EngineStatus.Accept({0x22ca44c?, 0x3ca[21](https://github.com/ethpandaops/ethereum-package/actions/runs/11596169403/job/32286576485#step:5:22)a0?}, {0x286b2e0?, 0xc0003ae1c0?})
	/root/project/cli/cli/helpers/engine_manager/engine_status.go:20 +0x75
github.com/kurtosis-tech/kurtosis/cli/cli/helpers/engine_manager.(*EngineManager).startEngineWithGuarantor(0xc0004072c0, {0x2879630, 0xc000062160}, {0x[22](https://github.com/ethpandaops/ethereum-package/actions/runs/11596169403/job/32286576485#step:5:23)ca44c?, 0xc0006f3ab8?}, 0xc0003ae1c0)
	/root/project/cli/cli/helpers/engine_manager/engine_manager.go:400 +0x65
github.com/kurtosis-tech/kurtosis/cli/cli/helpers/engine_manager.(*EngineManager).StartEngineIdempotentlyWithDefaultVersion(0xc0004072c0, {0x2879630?, 0xc000062160}, 0x5, 0x0, {0x0, 0x0}, 0x0, {0x0, 0x0}, ...)
	/root/project/cli/cli/helpers/engine_manager/engine_manager.go:214 +0x436
github.com/kurtosis-tech/kurtosis/cli/cli/command_framework/highlevel/engine_consuming_kurtosis_command.(*EngineConsumingKurtosisCommand).getSetupFunc.func1({0x2879630, 0xc000062160})
	/root/project/cli/cli/command_framework/highlevel/engine_consuming_kurtosis_command/engine_consuming_kurtosis_command.go:190 +0x305
github.com/kurtosis-tech/kurtosis/cli/cli/command_framework/lowlevel.(*LowlevelKurtosisCommand).MustGetCobraCommand.func2(0xc000827800?, {0xc000825[23](https://github.com/ethpandaops/ethereum-package/actions/runs/11596169403/job/32286576485#step:5:24)0, 0x1, 0x3})
	/root/project/cli/cli/command_framework/lowlevel/lowlevel_kurtosis_command.go:280 +0x124
github.com/spf13/cobra.(*Command).execute(0xc000827800, {0xc0008251d0, 0x3, 0x3})
	/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0x3b9a580)
	/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
main.main()
	/root/project/cli/cli/main.go:52 +0x7d

And also just logging, instead of throwing a stacktrace error whenever auth credentials failed to be obtained. Fixes:

Error:  An error occurred running command 'restart'
  Caused by: An error occurred restarting the Kurtosis engine
  Caused by: An error occurred starting a new engine
  Caused by: An error occurred starting the engine with the engine existence guarantor
  Caused by: An error occurred guaranteeing that a Kurtosis engine is running
  Caused by: An error occurred launching the engine server container
  Caused by: An error occurred launching the engine server container with default version tag '1.4.0'
  Caused by: An error occurred launching the engine server container
  Caused by: An error occurred creating the engine using image 'kurtosistech/engine' with tag '1.4.0' and debug mode 'false'
  Caused by: An error occurred creating Docker config storage.
  Caused by: An error occurred creating  Docker config storage in volume.
  Caused by: An error occurred getting auth for registry 'https://index.docker.io/v1/' from Docker config: error executing credential helper '/usr/bin/docker-credential-desktop get' for 'https://index.docker.io': 
  Caused by: exit status 1

BEGIN_COMMIT_OVERRIDE
fix: docker auth panic
END_COMMIT_OVERRIDE

@skylenet skylenet changed the title fix: handle no docker auth fix: handle no docker auth and log only a warning when getting auth credentials fails Oct 30, 2024
@skylenet skylenet requested a review from tedim52 October 30, 2024 16:04
auto-merge was automatically disabled October 31, 2024 13:21

Pull request was closed

auto-merge was automatically disabled October 31, 2024 13:21

Pull request was closed

@skylenet skylenet reopened this Oct 31, 2024
@tedim52 tedim52 added this pull request to the merge queue Oct 31, 2024
Merged via the queue into main with commit b36ddc9 Oct 31, 2024
51 checks passed
@tedim52 tedim52 deleted the skylenet/fix-docker-auth-no-creds branch October 31, 2024 16:14
github-merge-queue bot pushed a commit that referenced this pull request Oct 31, 2024
Should give more verbose info on the current problem with:

> commit could not be parsed: b36ddc9
fix: handle no docker auth and log only a warning when getting auth
credentials fails (#2579)

As per googleapis/release-please#2298

---------

Co-authored-by: Tedi Mitiku <tedi.m52@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants