Bug 1505558

Summary: Exposing UDP ports in a Dockerfile does not work in OCP 3.6
Product: OpenShift Container Platform Reporter: Nicholas Schuetz <nick>
Component: BuildAssignee: Corey Daley <cdaley>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.6.1CC: aos-bugs, bparees, dyan
Target Milestone: ---   
Target Release: 3.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The code the parses the EXPOSE lines of a Dockerfile would only accept an integer value Consequence: An error was produced if the Dockerfile EXPOSE line contained /tcp or /udp Fix: The code was updated to properly parse and validate all valid permutations of the EXPOSE line (except for using ARGS) Result: Providing ports with a /tcp or /udp designation now works correctly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-28 14:08:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nicholas Schuetz 2017-10-23 21:06:51 UTC
'oc new-app' throws an error when attempting to build a Dockerfile that has 'EXPOSE 30303/udp'.  This works perfectly fine when using straight docker docker-1.12.6-61

$ oc new-app . --name=testing
error: the Dockerfile has an invalid EXPOSE instruction: could not parse "30303/udp": must be numeric

[nick@hv3 ether-on-ocp]$ oc version
oc v3.6.173.0.21
kubernetes v1.6.1+5115d708d7
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://api.ocp.nicknach.net:8443
openshift v3.6.173.0.21
kubernetes v1.6.1+5115d708d7

Comment 1 Corey Daley 2017-10-30 23:17:07 UTC
[WIP] pull request to address this issue: https://github.com/openshift/origin/pull/17093

Comment 3 Dongbo Yan 2018-01-04 09:26:21 UTC
Verified
oc v3.9.0-0.9.0
kubernetes v1.8.1+0d5291c
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server 
openshift v3.9.0-0.9.0
kubernetes v1.8.1+0d5291c

# cat Dockerfile 
FROM centos
EXPOSE 8080/tcp
EXPOSE 8443/udp

# oc new-app . --name=testing
--> Found Docker image 3fa8225 (5 weeks old) from Docker Hub for "centos"

    * An image stream will be created as "centos:latest" that will track the source image
    * A Docker build using binary input will be created
      * The resulting image will be pushed to image stream "testing:latest"
      * A binary build was created, use 'start-build --from-dir' to trigger a new build
    * This image will be deployed in deployment config "testing"
    * Ports 8080/tcp, 8443/udp will be load balanced by service "testing"
      * Other containers can access this service through the hostname "testing"
    * WARNING: Image "centos" runs as the 'root' user which may not be permitted by your cluster administrator

--> Creating resources ...
    imagestream "centos" created
    imagestream "testing" created
    buildconfig "testing" created
    deploymentconfig "testing" created
    service "testing" created
--> Success
    Build scheduled, use 'oc logs -f bc/testing' to track its progress.
    Application is not exposed. You can expose services to the outside world by executing one or more of the commands below:
     'oc expose svc/testing' 
    Run 'oc status' to view your app.

Comment 6 errata-xmlrpc 2018-03-28 14:08:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0489