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

type assertion error could occur #802

Closed
takuhiro opened this issue Feb 7, 2023 · 2 comments
Closed

type assertion error could occur #802

takuhiro opened this issue Feb 7, 2023 · 2 comments

Comments

@takuhiro
Copy link

takuhiro commented Feb 7, 2023

Describe the bug

We hit the following error in our environment just once.

time="2023-02-01T02:04:48Z" level=fatal msg="could not perform assertion: hybridControllerFrontend.(controllerhelpers.ControllerHelper)"

As I can see the trident log, the process exited by the fatal error and then the trident container was restarted successfully.

hybridControllerFrontend could be nil if a temporary error(e.g. failure of creating k8s client) occurs here, which causes the type assertion error.
The err is checked here, but before that, the err is overwitten here. So if k8sctrlhelper.NewHelper failed but k8snodehelper.NewHelper succeeded, the error check would be passed and the type assertion of hybridControllerFrontend would be executed even though it is nil.

Environment
Provide accurate information about the environment to help us reproduce the issue.

  • Trident version: v23.01.0
  • Trident installation flags used: silenceAutosupport: true (Trident Operator)
  • Container runtime: containerd 1.6.10
  • Kubernetes version: v1.25.6
  • Kubernetes orchestrator: none
  • Kubernetes enabled feature gates: none
  • OS: Ubuntu 20.04.5 LTS
  • NetApp backend types: ONTAP 9.9.1P9
  • Other:

To Reproduce
It is difficult to reproduce this problem intentionally, but I think it would be reproduced if you changed the code to make k8sctrlhelper.NewHelper always return error here.

Expected behavior
handle the error correctly

Additional context
Add any other context about the problem here.

@takuhiro takuhiro added the bug label Feb 7, 2023
@gnarl gnarl added the tracked label Feb 7, 2023
@gnarl
Copy link
Contributor

gnarl commented Feb 18, 2023

Hi @takuhiro,

This issue is fixed with commit afb725a and will be included in the Trident v23.04 release.

@gnarl gnarl closed this as completed Feb 18, 2023
@takuhiro
Copy link
Author

Thank you @gnarl !

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

No branches or pull requests

2 participants