Description of problem:
Edit dc from web-console, add one command in single-line editor and save. Then edit it again, add one command, click "Add" and "Save". the new added command is not really saved
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. oc run dc --image=aosqe/hello-openshift
2. From web console, go to dc edit page "https://xxx:8443/console/project/myproject/edit/dc/dc".
Click "advanced strategy options." and add a command "echo test" in Pre Lifecycle Hook, hit "Add" in the right of the input box and hit "Save"
3. Go to dc edit page again, click "advanced strategy options."
Add one command "echo test again" for the container, hit "Add" and then hit "Save"
4.1 Go to dc edit page again, click "advanced strategy options." and check the commands
4.2 oc describe dc/dc
4. New command in step 3 is not really saved
check on both web-console and cli command
# oc describe dc/dc
Pre-deployment hook (pod type, failure policy: Abort):
Command: echo test -> this is the end, no other command
4. New command in step 3 should be really saved.
This is a common issue, also reproduced in dc health check edit page.
Can only reproduced when ONE new command added.
*** Bug 1411266 has been marked as a duplicate of this bug. ***
Commit pushed to master at https://github.com/openshift/origin-web-console
Bug 1411258, Bug 1411266 - Fix editing existing commands
The first edit made when editing an existing command is ignored. The
`argsChanged` value is not properly reset on the first `input.args` watch
callback, so changes are not saved unless there is a second edit.
This has been merged into ocp and is in OCP v184.108.40.206 or newer.
Verified on openshift/oc v220.127.116.11+390ef18
Both commands could be described from cli client.
Bug https://bugzilla.redhat.com/show_bug.cgi?id=1411266 is also verified. Save button is disable with proper reason when remove last command but not remove Pre Lifecycle Hook with container input box.
*** Bug 1422389 has been marked as a duplicate of this bug. ***
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.