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 the Cassandra app integration test failure #2596

Merged
merged 2 commits into from
Jan 10, 2024
Merged

Conversation

viveksinghggits
Copy link
Contributor

@viveksinghggits viveksinghggits commented Jan 10, 2024

Change Overview

Cassandra app suddenly started failing the integration test because of below reason

{"ActionSet":"test-actionset-fsf55","File":"pkg/controller/controller.go","Function":"github.com/kanisterio/kanister/pkg/controller.(*Controller).runAction.func1","Line":546,"Phase":"takeSnapshots","cluster_name":"85ed7653-a78f-48b8-81bc-866edf54cdb8","error":"Failed to exec command in pod: command terminated with exit code 2.\nstdout: Requested clearing snapshot(s) for [all keyspaces] with [all snapshots]\r\nRequested creating snapshot(s) for [all keyspaces] with snapshot name [cassandra-v7d2p-0] and options {skipFlush=false}\r\nSnapshot directory: cassandra-v7d2p-0\nstderr: Recommendation: use the credentials file to securely provide the password.\r\n+ nodetool clearsnapshot\r\nerror: Specify snapshot name or --all\r\n-- StackTrace --\r\njava.lang.RuntimeException: Specify snapshot name or --all\r\nat org.apache.cassandra.tools.nodetool.ClearSnapshot.execute(ClearSnapshot.java:50)\r\nat org.apache.cassandra.tools.NodeTool$NodeToolCmd.runInternal(NodeTool.java:371)\r\nat org.apache.cassandra.tools.NodeTool$NodeToolCmd.run(NodeTool.java:356)\r\nat org.apache.cassandra.tools.NodeTool.execute(NodeTool.java:259)\r\nat org.apache.cassandra.tools.NodeTool.main(NodeTool.java:83)","level":"info","msg":"Failed to execute phase: v1alpha1.Phase{Name:\"takeSnapshots\", State:\"pending\", Output:map[string]interface {}(nil), Progress:v1alpha1.PhaseProgress{ProgressPercent:\"\", SizeUploadedB:0, EstimatedUploadSizeB:0, EstimatedTimeSeconds:0, LastTransitionTime:\u003cnil\u003e}}:","time":"2024-01-10T18:50:29.232081321+01:00"}

and the reason is the command nodetool clearsnapshot mentioned in the blueprint can not be run without a snapshot name or --all flag.

Seems to be happening because of the image update change as part of #2523

This PR fixes that.

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

  • fixes #issue-number

Test Plan

Run integration test for cassandra and make sure it passes, after the change.
Output:
https://gist.github.com/viveksinghggits/546ece32cbfa3b22b4dac57a71347d60

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

@mergify mergify bot merged commit 654951e into master Jan 10, 2024
14 checks passed
@mergify mergify bot deleted the cassandra-fix branch January 10, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants