Bug 1505558 - Exposing UDP ports in a Dockerfile does not work in OCP 3.6
Summary: Exposing UDP ports in a Dockerfile does not work in OCP 3.6
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build
Version: 3.6.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.8.0
Assignee: Corey Daley
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-23 21:06 UTC by Nicholas Schuetz
Modified: 2018-03-28 14:08 UTC (History)
3 users (show)

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.
Clone Of:
Environment:
Last Closed: 2018-03-28 14:08:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 0 None None None 2018-03-28 14:08:33 UTC

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


Note You need to log in before you can comment on or make changes to this bug.