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 bug Observability plugin calling createIndex from onNodeStarted m… #1885

Open
wants to merge 5 commits into
base: 2.x
Choose a base branch
from

Conversation

YANG-DB
Copy link
Member

@YANG-DB YANG-DB commented Dec 3, 2024

Description

BUG - fix bug Observability plugin calling createIndex from onNodeStarted method before cluster state is ready (waits for the cluster state to be ready)

   override fun afterStart() {
           ....
           // wait for the cluster here until it will finish managed node election
            while (clusterService.state().blocks().hasGlobalBlockWithStatus(RestStatus.SERVICE_UNAVAILABLE)) {
                log.info("Wait for cluster to be available ...");
                TimeUnit.SECONDS.sleep(1);
            }
 

To introduce additional start command for all CI build which rely on the OpnSearch Docker image, as Github rollout the deprecation of the Node 16 on all it's CI-runner, as the result all existing Github which rely on the old version of Node.JS (Ex: actions/checkout@v3) failed due to the following errors:

/__e/node20/bin/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /__e/node20/bin/node)
/__e/node20/bin/node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /__e/node20/bin/node)
image

The issue has been discovered over opensearch-project/opensearch-build#5178 and fix has been verified and applied on multiple OpenSearch plugin, such as:

Related Issues

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…ethod before cluster state is ready (waits for the cluster state to be ready)

Signed-off-by: YANGDB <yang.db.dev@gmail.com>
@YANG-DB YANG-DB added bug Something isn't working patch labels Dec 3, 2024
Signed-off-by: YANGDB <yang.db.dev@gmail.com>
Signed-off-by: YANGDB <yang.db.dev@gmail.com>
Comment on lines +101 to +102
while (clusterService.state().blocks().hasGlobalBlockWithStatus(RestStatus.SERVICE_UNAVAILABLE)) {
log.info("Wait for cluster to be available ...")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!
I had the same question that was raised by Shwetha in the original issue:

 The main branch doesn't have same code as well? why is there divergence?

Do we know why was this only needed for 2.x and what's the path ahead to converge these branches?

Copy link
Member Author

@YANG-DB YANG-DB Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ps48 I'm not sure why this was removed in the main branch
not really involved recently with this repository....

Comment on lines 25 to 26
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks can be removed as it is deprecated by github.

@@ -56,7 +61,7 @@ jobs:
cp -r ./build/distributions/*.zip opensearch-observability-builds/

- name: Upload Artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3-node20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use v4, as v3 has been deprecated by github.

@@ -88,7 +94,7 @@ jobs:
cp -r ./build/distributions/*.zip opensearch-observability-builds/

- name: Upload Artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3-node20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Signed-off-by: YANGDB <yang.db.dev@gmail.com>
@ps48
Copy link
Member

ps48 commented Dec 4, 2024

There was breaking change in the @v4 artifact upload workflow which is leading to:

Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

Can you please update the uploaded artifact name to be generated from the matrix used in the workflow. Here's an example of similar issue fixed in the dashboards-observability: https://github.com/opensearch-project/dashboards-observability/pull/2259/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants