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

[PSUPCLPL-15213]-Node_not_found_error_when_running_add_node_procedure #641

Conversation

nikhil1697
Copy link
Collaborator

Description

The issue is in the drain_nodes function where the condition if node_name in stdout incorrectly evaluates to true if node_name is a substring of one or more active node names in the cluster.
*

Fixes # (PSUPCLPL-15213)

Solution

To address this issue, modified the condition to ensure that it checks for exact matches rather than substring matches. We can achieve this by splitting the stdout into lines and then checking if node_name exactly matches any line in the output.
*

Test Cases

TestCase 1

Test Configuration:

Steps:

  1. Run add node procedure with a node name which will be a substring of one or more active node names
    Example - There is already a node in the cluster with name test-worker-3-10 and then try to add a new node with name test-worker-3-1

Results:

Before After
Procedure fails with error Error from server (NotFound): nodes "test-worker-3-1" not found Procedure succeeds

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Integration CI passed
  • Unit tests. If Yes list of new/changed tests with brief description
  • There is no merge conflicts

Unit tests

Indicate new or changed unit tests and what they do, if any.

@koryaga koryaga merged commit 2b94bfd into main Apr 17, 2024
42 checks passed
@koryaga koryaga deleted the PSUPCLPL-15213_Node_not_found_error_when_running_add_node_procedure branch April 17, 2024 12:54
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.

3 participants