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

Add e2e tests for external health monitor controller #34

Closed
xing-yang opened this issue Sep 10, 2020 · 17 comments
Closed

Add e2e tests for external health monitor controller #34

xing-yang opened this issue Sep 10, 2020 · 17 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@xing-yang
Copy link
Contributor

No description provided.

@NickrenREN NickrenREN added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Sep 11, 2020
@NickrenREN
Copy link
Contributor

Anyone who is interested in this ?

@irbekrm
Copy link

irbekrm commented Sep 14, 2020

Hi! I would be interested in working on this issue.

@NickrenREN
Copy link
Contributor

/assign @irbekrm

@NickrenREN
Copy link
Contributor

Thanks @irbekrm

@irbekrm
Copy link

irbekrm commented Sep 15, 2020

I was also wondering what driver should be used for the e2e tests.
I see here that the e2e tests should use hostpath CSI driver and GCE PD driver, however I looked at the hostpath CSI driver and it does not implement the required interface yet.
Is the requirement to use hostpath CSI driver and GCE PD driver still up to date?

@xing-yang
Copy link
Contributor Author

We can use the CSI hostpath driver for e2e tests.

@fengzixu is working on the following issue to add health monitoring support in the CSI hostpath driver. So these e2e tests tasks are actually depending on this one.
#21

For GCE PD driver, I think we'll have to wait until it has the health monitoring support.

@xing-yang
Copy link
Contributor Author

Hi @irbekrm,
In addition to adding e2e tests using the CSI hostpath driver, we should also add e2e tests using the CSI Mock Driver. The advantage of using the mock driver is that we can also inject failure using the javascript hooks. See the following links for details. Can you take a look of this?

@irbekrm
Copy link

irbekrm commented Oct 9, 2020

Hi @xing-yang ,

Thank you! I will take a look at the examples for the mock driver and start working on this. I might get back with some questions about the approach.

@irbekrm
Copy link

irbekrm commented Oct 19, 2020

Actually, I am having some doubts about the e2e tests for this with the CSI Mock Driver and the javascript hooks.

The external health monitor creates a VolumeConditionAbnormal event only if volume condition is marked as abnormal:true in the gRPC response from the driver. But with the hooks, it is only possible to return with a gRPC error code and empty gRPC response, so I cannot force the mock driver to return a gRPC response with abnormal:true via a hook.

I was also looking at using the hooks to return early from one of the CSI Mock Driver methods that actually create the volume, so that the condition 'becomes' abnormal in the driver itself. But because the hooks can only cause the driver method to return with a non-OK gRPC code, I think this is also not possible because the volume creation would just fail.

So, I am not sure if the creation of VolumeConditionAbnormal and VolumeConditionNormal events can be e2e-tested with the CSI Mock Driver? Maybe I could just wait for this PR kubernetes-csi/csi-driver-host-path#210 to be merged and test with the CSI hostpath driver?

Same with this #35

@xing-yang
Copy link
Contributor Author

I see. Let's wait for the CSI hostpath driver implementation then.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 4, 2021
@fengzixu
Copy link
Contributor

@irbekrm Hi. Long time no see. How are you? Actually, I want to tell you the `CSI hostpath driver implementation is already finished. I think you can start to work on e2e test issue from now.

@irbekrm
Copy link

irbekrm commented Feb 23, 2021

Hi! Thanks for letting me know- I will take a look this weekend 😄

@irbekrm
Copy link

irbekrm commented Feb 23, 2021

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 23, 2021
@xing-yang
Copy link
Contributor Author

@irbekrm Not sure if you have started working on this. Actually right now there's no good way of writing an e2e test for this feature. This is because that we are only reporting events to PVCs. Events can disappear so it is not reliable to write an e2e test to verify if an event is recorded.

@irbekrm
Copy link

irbekrm commented Mar 17, 2021

Hi, thank you for letting me know- actually I had not started working on this properly.

I think I will then better unassign myself- perhaps someone else can take a look or maybe there will be a better way to test this sometime in the future!

/unassign

@xing-yang
Copy link
Contributor Author

Closing this as we are not adding e2e tests for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

No branches or pull requests

6 participants