Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-7525

The podman running - exits by timeout in airgap mode

XMLWordPrintable

    • False
    • None
    • False
    • Release Notes
    • Known Issue
    • Proposed

      Description of problem:

      • When I try to run podman file from the internal registry - I constantly get `Error: timeout starting container`
      • To reproduce the problem we can use our airgap cluster: https://devspaces.apps.ds-airgap-v15.crw-qe.com/
      • For saving time we can create the script in the created DevSpace:
        #!/bin/bash
        
        # Enable Kubedock
        export KUBEDOCK_ENABLED=true
        echo "KUBEDOCK_ENABLED=$KUBEDOCK_ENABLED"
        
        # Run entrypoint script
        /entrypoint.sh
        
        # Navigate to the project source directory
        cd "$PROJECT_SOURCE"
        
        # Create Dockerfile
        cat <<EOF > Dockerfile.$(uname -m)
        FROM scratch
        COPY hello /
        CMD ["/hello"]
        EOF
        
        echo "Dockerfile created"
        
        # Create hello.go file
        cat <<EOF > hello.go
        package main
        import "fmt"
        func main() {
            fmt.Println("hello world")
        }
        EOF
        
        echo "Go source file created"
        
        # Compile hello.go
        go build hello.go
        
        if [ $? -eq 0 ]; then
            echo "Go file compiled successfully"
        else
            echo "Error compiling Go file"
            exit 1
        fi
        
        # Export necessary environment variables
        export ARCH=$(uname -m)
        export DATE=$(date +"%m%d%y")
        export USER=$(oc whoami)
        export TKN=$(oc whoami -t)
        export REG="image-registry.openshift-image-registry.svc:5000"
        export PROJECT=$(oc project -q)
        export IMG="${REG}/${PROJECT}/hello:${DATE}"
        
        # Log in to Podman
        podman login --tls-verify=false --username "${USER}" --password "${TKN}" "${REG}"
        
        # Build the image using Podman
        podman build -t "${IMG}" -f Dockerfile."${ARCH}"
        
        # Push the image to the registry
        podman push --tls-verify=false "${IMG}"
        
      • On online cluster running the Image works without problem
      • On airgap - timeout error

              dakwon@redhat.com David Kwon
              mmusiien Maksym Musienko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: