Uploaded image for project: 'OPCT - OpenShift Provider Compatibility Tool'
  1. OPCT - OpenShift Provider Compatibility Tool
  2. OPCT-43

[opct][CLI] Retrieve results in error 'unexpected EOF' when connection slow

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False

       

      OPCT CLI  is returning 'unexpected EOF' when running 'retrieve' (core=sonobuoy)  to download the results in slow internet connnections.

      Steps to reproduce:

      • Run OPCT
      • Collect the results running 'retrieve' in very slow internet connections
      • Wait for the error message similar below:

       

      $ oc get clusterversion
      NAME      VERSION       AVAILABLE   PROGRESSING   SINCE   STATUS
      version   4.12.0-rc.1   True        False         17m     Cluster version is 4.12.0-rc.1
      
      $ ./openshift-provider-cert-linux-amd64 retrieve
      INFO[2022-12-02T18:10:32-08:00] Collecting results...                        
      WARN[2022-12-02T18:19:22-08:00] error retrieving certification results from sonobyuoy: unexpected EOF 
      WARN[2022-12-02T18:19:22-08:00] Retrying retrieval 9 more times              
      WARN[2022-12-02T18:26:59-08:00] error retrieving certification results from sonobyuoy: unexpected EOF 
      WARN[2022-12-02T18:26:59-08:00] Retrying retrieval 8 more times              
      WARN[2022-12-02T18:36:45-08:00] error retrieving certification results from sonobyuoy: unexpected EOF 
      WARN[2022-12-02T18:36:45-08:00] Retrying retrieval 7 more times              
      WARN[2022-12-02T18:42:37-08:00] error retrieving certification results from sonobyuoy: unexpected EOF 
      WARN[2022-12-02T18:42:37-08:00] Retrying retrieval 6 more times              
      WARN[2022-12-02T18:55:08-08:00] error retrieving certification results from sonobyuoy: unexpected EOF 
      WARN[2022-12-02T18:55:08-08:00] Retrying retrieval 5 more times              
      WARN[2022-12-02T19:07:29-08:00] error retrieving certification results from sonobyuoy: unexpected EOF 
      WARN[2022-12-02T19:07:29-08:00] Retrying retrieval 4 more times              
      WARN[2022-12-02T19:21:40-08:00] error retrieving certification results from sonobyuoy: unexpected EOF 
      WARN[2022-12-02T19:21:40-08:00] Retrying retrieval 3 more times  

       

       

      Althought, even running behind the slow connections, it is possible to connect to the node and download the artifacts by running the script similar this:

       

       

      NODE=$(oc get pod sonobuoy -n openshift-provider-certification -o jsonpath='{.spec.nodeName}')
      
      run_remote() {
        oc debug node/$NODE -- chroot /host /bin/bash -c "$@"
      }
      
      SONOBUOY_CONTAINER=$(run_remote "crictl ps --name kube-sonobuoy -o json" | jq -r  .containers[0].id)
      PATH_STG=$(run_remote "crictl inspect $SONOBUOY_CONTAINER"  | jq -r '.status.mounts[] | select(.containerPath=="/tmp/sonobuoy").hostPath')
      
      FILE_PATH=$(run_remote "ls ${PATH_STG}/*.tar.gz")
      FILE_NAME=$(basename $FILE_PATH)run_remote "cat $FILE_PATH" > ${FILE_NAME}
      
      ls $FILE_NAME 

      Expected results:

      • File downloaded correctly
      • A friendly message instead of 'unexpected EOF'

       

              Unassigned Unassigned
              rhn-support-mrbraga Marco Braga
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: