Skip to content

Commit

Permalink
Upgrade AD's bwc baseline version to 1.3.2 to resolve cluster join is…
Browse files Browse the repository at this point in the history
…sue (#1029) (#1030)

Issue:
- In versions between 1.1 and 2.10, the task :adBwcCluster#twoThirdsUpgradedClusterTask fails.
- Symptoms mirror those in [OpenSearch Issue #5076](opensearch-project/OpenSearch#5076).
- Logs show nodes from old and new versions failing to join as a cluster, resulting in a "master not found" exception.

Resolution:
- Upgraded the bwc version to 1.3.2, aligning with other plugins which use 1.3+ as their baseline.
  - [Cross-Cluster Replication PR #469](opensearch-project/cross-cluster-replication#469)
  - [Security PR #2253](opensearch-project/security#2253)
  - [ML Commons PR #681](opensearch-project/ml-commons#681)
- Post-upgrade, the twoThirdsUpgradedClusterTask runs successfully, suggesting potential incompatibility between versions 1.1 and 2.10.

Testing:
- Executed `./gradlew bwcTestSuite -Dtests.security.manager=false` and all tests passed.

Signed-off-by: Kaituo Li <[email protected]>
(cherry picked from commit 3c1a830)

Co-authored-by: Kaituo Li <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and kaituo authored Sep 8, 2023
1 parent 1467b83 commit 7e20ba3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test_build_multi_platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
java: [ 11, 17 ]
name: Build and Test Anomaly Detection Plugin on Windows
runs-on: windows-latest
env:
JENKINS_URL: build.ci.opensearch.org
steps:
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
Expand Down Expand Up @@ -45,6 +47,8 @@ jobs:

name: Build and Test Anomaly detection Plugin
runs-on: ${{ matrix.os }}
env:
JENKINS_URL: build.ci.opensearch.org

steps:
- name: Setup Java ${{ matrix.java }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test_security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:

name: Security test workflow for Anomaly Detection
runs-on: ubuntu-latest
env:
JENKINS_URL: build.ci.opensearch.org

steps:
- name: Setup Java ${{ matrix.java }}
Expand Down
18 changes: 9 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.util.concurrent.Callable
import org.opensearch.gradle.test.RestIntegTestTask
import org.opensearch.gradle.testclusters.StandaloneRestIntegTestTask
import org.opensearch.gradle.info.BuildParams

buildscript {
ext {
Expand All @@ -38,10 +39,8 @@ buildscript {
'/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-job-scheduler-' + plugin_no_snapshot + '.zip'
anomaly_detection_build_download = 'https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/' + opensearch_no_snapshot +
'/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-anomaly-detection-' + plugin_no_snapshot + '.zip'
bwcOpenSearchADDownload = 'https://ci.opensearch.org/ci/dbc/bundle-build/1.1.0/20210930/linux/x64/builds/opensearch/plugins/' +
'opensearch-anomaly-detection-1.1.0.0.zip'
bwcOpenSearchJSDownload = 'https://ci.opensearch.org/ci/dbc/bundle-build/1.1.0/20210930/linux/x64/builds/opensearch/plugins/' +
'opensearch-job-scheduler-1.1.0.0.zip'
bwcOpenSearchADDownload = 'https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.2/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-anomaly-detection-1.3.2.0.zip'
bwcOpenSearchJSDownload = 'https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.2/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-job-scheduler-1.3.2.0.zip'

// gradle build won't print logs during test by default unless there is a failure.
// It is useful to record intermediately information like prediction precision and recall.
Expand Down Expand Up @@ -222,10 +221,9 @@ def _numNodes = findProperty('numNodes') as Integer ?: 1

def opensearch_tmp_dir = rootProject.file('build/private/opensearch_tmp').absoluteFile
opensearch_tmp_dir.mkdirs()
boolean isCiServer = System.getenv().containsKey("CI")
test {
retry {
if (isCiServer) {
if (BuildParams.isCi()) {
failOnPassedAfterRetry = false
maxRetries = 6
maxFailures = 10
Expand All @@ -250,7 +248,7 @@ tasks.named("check").configure { dependsOn(integTest) }

integTest {
retry {
if (isCiServer) {
if (BuildParams.isCi()) {
failOnPassedAfterRetry = false
maxRetries = 6
maxFailures = 10
Expand Down Expand Up @@ -403,7 +401,7 @@ task integTestRemote(type: RestIntegTestTask) {
}
}

String bwcMinVersion = "1.1.0.0"
String bwcMinVersion = "1.3.2.0"
String bwcBundleVersion = "1.3.2.0"
Boolean bwcBundleTest = (project.findProperty('customDistributionDownloadType') != null &&
project.properties['customDistributionDownloadType'] == "bundle");
Expand Down Expand Up @@ -446,7 +444,7 @@ String bwcAnomalyDetectionPath = bwcFilePath + "anomaly-detection/"
node.setting("plugins.security.system_indices.enabled", "true")
}
} else {
versions = ["1.1.0", opensearch_version]
versions = ["1.3.2", opensearch_version]
plugin(provider(new Callable<RegularFile>(){
@Override
RegularFile call() throws Exception {
Expand Down Expand Up @@ -570,10 +568,12 @@ task "${baseName}#twoThirdsUpgradedClusterTask"(type: StandaloneRestIntegTestTas
dependsOn "${baseName}#mixedClusterTask"
useCluster testClusters."${baseName}0"
if (bwcBundleTest){
println 'Running in bwcBundleTest mode:' + BuildParams.isCi()
doFirst {
testClusters."${baseName}0".nextNodeToNextVersion()
}
} else {
println 'Running in CI mode:' + BuildParams.isCi()
doFirst {
testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins)
}
Expand Down

0 comments on commit 7e20ba3

Please sign in to comment.