Bug 2077943

Summary: If there is a service with multiple ports, and the route uses 8080, when editing the 8080 port isn't replaced, but a random port gets replaced and 8080 still stays
Product: OpenShift Container Platform Reporter: Avik Kundu <akundu>
Component: Dev ConsoleAssignee: Avik Kundu <akundu>
Status: CLOSED ERRATA QA Contact: spathak <spathak>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.10CC: aos-bugs, cjerolim, msaud, nmukherj
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: If there is a service with multiple ports, and the route uses 8080, then editing the 8080 port does not replace the port from the service ports list. Consequence: The 8080 port still stays in the Service port list, while a random port gets deleted. Fix: Specifying a condition in the createService function, which will identify the current route targetPort and replace that port from the service ports, whenever a new targetPort is added in the Edit Application Form. Result: Now, when port 8080 is replaced as route port, it gets deleted from the service ports list and the new route port gets added to the list.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:08:16 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 Avik Kundu 2022-04-22 16:03:48 UTC
Description of problem:
If there is a service with multiple ports, and the route uses 8080, when editing the 8080 port isn't replaced, but a random port gets replaced and 8080 still stays


Version-Release number of selected component (if applicable):


How reproducible:
Always



Steps to Reproduce:
1. Switch to the developer perspective and create a fresh namespace if needed
2. Navigate to Add > Git repository > Import from Git
3. Enter Git URL (https://github.com/nodeshift-blog-examples/react-web-app), name (test-app) and set port to 8080.
5. Open the Service YAML and expose 8081 and 8082 also.
4. Come to the Topology page and right-click on the app and select Edit test-app. The Edit form will open.
5. Change the Target Port (8080) to 3000 and save.

Actual results:
A random port gets replaced and 8080 still stays.

Expected results:
8080 port should be replaced by the new port.

Additional info:

Comment 3 Mohammed Saud 2022-06-07 09:05:44 UTC
Verified on:
Build:     4.11.0-0.nightly-2022-06-01-200905
Browser:   Firefox 101

The correct port gets replaced.

Comment 5 errata-xmlrpc 2022-08-10 11:08:16 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security update), 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/RHSA-2022:5069