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

[BUG] Opensearch:1.0.0 docker container run with flaky failure in github CI #1350

Closed
chenqi0805 opened this issue Oct 8, 2021 · 3 comments
Closed
Labels

Comments

@chenqi0805
Copy link

Describe the bug
When I run the opensearch:1.0.0 docker container with the gradle docker plugin on github CI, from time to time there is the following failure:

> Task :data-prepper-core:createOpenSearchDockerContainer
Created container with ID 'node-0.example.com'.

> Task :data-prepper-core:startOpenSearchDockerContainer
Starting container with ID 'd13be9c57160894ca5b24f738a841aa133d1ad8f0f8e257d664eb9ea3e1c758f'.

> Task :data-prepper-core:logOpenSearchDockerContainer
Logs for container with ID 'd13be9c57160894ca5b24f738a841aa133d1ad8f0f8e257d664eb9ea3e1c758f'.
Killing opensearch process 12
Killing performance analyzer process 13

Not sure if it persists in 1.1.0.

To Reproduce
Here is the minimal build.gradle

import com.bmuschko.gradle.docker.tasks.container.*
import com.bmuschko.gradle.docker.tasks.image.*
import com.bmuschko.gradle.docker.tasks.network.*

task pullOpenSearchDockerImage(type: DockerPullImage) {
    image = 'opensearchproject/opensearch:1.0.0'
}

task createOpenSearchDockerContainer(type: DockerCreateContainer) {
    dependsOn createDataPrepperNetwork
    dependsOn pullOpenSearchDockerImage
    targetImageId pullOpenSearchDockerImage.image
    containerName = "node-0.example.com"
    hostConfig.portBindings = ['9200:9200', '9600:9600']
    hostConfig.autoRemove = true
    hostConfig.network = createDataPrepperNetwork.getNetworkName()
    envVars = ['discovery.type':'single-node']
}

task startOpenSearchDockerContainer(type: DockerStartContainer) {
    dependsOn createOpenSearchDockerContainer
    targetContainerId createOpenSearchDockerContainer.getContainerId()

    doLast {
        sleep(90*1000)
    }
}

task logOpenSearchDockerContainer(type: DockerLogsContainer) {
    dependsOn startOpenSearchDockerContainer
    targetContainerId startOpenSearchDockerContainer.getContainerId()
    follow = true
    tailAll = true
}

task stopOpenSearchDockerContainer(type: DockerStopContainer) {
    targetContainerId createOpenSearchDockerContainer.getContainerId()

    doLast {
        sleep(5*1000)
    }
}

task testRun(type: Test) {
    dependsOn startOpenSearchDockerContainer
    dependsOn logOpenSearchDockerContainer
    finalizedBy stopOpenSearchDockerContainer
}

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: github CI linux/ubuntu. Not found on macOS so far

Additional context
Add any other context about the problem here.

@chenqi0805
Copy link
Author

This also happened on 1.0.1, but not sure yet on 1.1.0

@minalsha
Copy link
Contributor

@chenqi0805 are you able to repro this issue in 2.0?

@minalsha
Copy link
Contributor

@chenqi0805 please reopen this issue if this issue still persists on 2.0. Closing the issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants