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

OpenShiftAssistant awaitApplicationReadinessOrFail wrong pod #1011

Closed
dcdh opened this Issue Mar 8, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@dcdh
Contributor

dcdh commented Mar 8, 2018

Issue Overview

I am manually deploying an application using OpenShiftAssistant.
After deploying the application I need to wait for the pod to be ready.

I am using this simple code to deploy next wait:

openShiftAssistantDatabaseApp.deployApplication("postgresql", "database.yaml");
openShiftAssistantDatabaseApp.awaitApplicationReadinessOrFail();

Expected Behaviour

After the call of the method awaitApplicationReadinessOrFail the postgresql app pod must be running.

Current Behaviour

After the call of the method awaitApplicationReadinessOrFail the postgresql app pod is in the state Pending.

Steps To Reproduce

Don't have the image pulled. (In this case the status of postgresql-1-XXXX is defined to Container creating and postgresql-1-deploy is defined to Running)

Additional Information

When I deploy my app two pods are processing :

  • postgresql-1-9x930 with a status defined to Pending;
  • postgresql-1-deploy with a status defined to Running;
public void awaitApplicationReadinessOrFail() {
        await().atMost(5, TimeUnit.MINUTES).until(() -> {
                List<Pod> list = client.pods().inNamespace(namespace).list().getItems();
                return list.stream()
                    .filter(pod -> pod.getMetadata().getName().startsWith(applicationName))
                    .filter(this::isRunning)
                    .collect(Collectors.toList()).size() >= 1;
            }
        );
    }

The method awaitApplicationReadinessOrFail check pods starting with postgres and return true (so done) when one his running. However at this time two pods are founds and the deployed one is running. So I guess you could have a filter to check that the name don't end with deploy to check the status on the expected pod.

Regards,

Damien

@dcdh

This comment has been minimized.

Contributor

dcdh commented Mar 8, 2018

openshift_containers

@dipak-pawar dipak-pawar self-assigned this Mar 20, 2018

dipak-pawar added a commit to dipak-pawar/arquillian-cube that referenced this issue Mar 20, 2018

dipak-pawar added a commit that referenced this issue Mar 20, 2018

@dipak-pawar dipak-pawar added this to the 1.15.3 milestone Mar 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment