[ 
https://issues.apache.org/jira/browse/FLINK-11971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16797275#comment-16797275
 ] 

Hequn Cheng commented on FLINK-11971:
-------------------------------------

[~sunjincheng121] Thanks for looking into the problem and providing valuable 
information. I see two options to solve the problem:
 - Making the match condition looser. For example, we can only match `Running` 
keyword. However, this way we would also make the checking very fragile.
 - Add another match condition for the new status message. For example, we can 
change the original match logic(in test_kubernetes_embedded_job.sh) from
{code:java}
    echo ${status} | grep -q "minikube: Running cluster: Running kubectl: 
Correctly Configured"

{code}
to
{code:java}
    echo ${status} | grep -q "minikube: Running cluster: Running kubectl: 
Correctly Configured" \
        || echo ${status} | grep -q "host: Running kubelet: Running apiserver: 
Running kubectl: Correctly Configured"
{code}
Use `||` to connect the two conditions so that either one success can lead to 
success.

Personally, I prefer the second option.
 [~sunjincheng121] [~aljoscha] What do you think?

> Fix `Command: start_kubernetes_if_not_ruunning failed` error
> ------------------------------------------------------------
>
>                 Key: FLINK-11971
>                 URL: https://issues.apache.org/jira/browse/FLINK-11971
>             Project: Flink
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 1.8.0, 1.9.0
>            Reporter: sunjincheng
>            Assignee: Hequn Cheng
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: screenshot-1.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When I did the end-to-end test under Mac OS, I found the following two 
> problems:
>  1. The verification returned for different `minikube status` is not enough 
> for the robustness. The strings returned by different versions of different 
> platforms are different. the following misjudgment is caused:
>  When the `Command: start_kubernetes_if_not_ruunning failed` error occurs, 
> the `minikube` has actually started successfully. The core reason is that 
> there is a bug in the `test_kubernetes_embedded_job.sh` script.  The error 
> message as follows:
>  !screenshot-1.png! 
> {code:java}
> Current check logic: echo ${status} | grep -q "minikube: Running cluster: 
> Running kubectl: Correctly Configured"
> ==== My local info====
> jinchengsunjcs-iMac:flink-1.8.0 jincheng$ minikube status
> host: Running
> kubelet: Running
> apiserver: Running
> kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.101{code}
> So, I think we should improve the check logic of `minikube status`, What do 
> you think?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to