Bug 1411258 - New added command can not be saved when there is already a single command existing
Summary: New added command can not be saved when there is already a single command exi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
: 1411266 1422389 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-09 09:39 UTC by XiaochuanWang
Modified: 2017-07-24 14:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In some circumstances, changes made when editing a health check command or deployment hook command in the web console would not be saved. This happened when editing an existing command and adding or removing a single argument. The web console has been fixed to correctly save all edits to health check and deployment hook commands.
Clone Of:
Environment:
Last Closed: 2017-04-12 19:08:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0884 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 22:50:07 UTC

Description XiaochuanWang 2017-01-09 09:39:11 UTC
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):
openshift v3.4.0.39

How reproducible:
Always

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

Actual results:
4. New command in step 3 is not really saved
check on both web-console and cli command
# oc describe dc/dc
Strategy:    Rolling
  Pre-deployment hook (pod type, failure policy: Abort):
    Container:    dc
    Command:    echo test -> this is the end, no other command


Expected results:
4. New command in step 3 should be really saved.

Additional info:
This is a common issue, also reproduced in dc health check edit page.
Can only reproduced when ONE new command added.

Comment 1 Samuel Padgett 2017-01-09 14:13:06 UTC
*** Bug 1411266 has been marked as a duplicate of this bug. ***

Comment 3 openshift-github-bot 2017-01-09 14:30:10 UTC
Commit pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/703aa682e242e1f623a03b9ac72dd07b135d39d6
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.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1411258
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1411266

Comment 4 Troy Dawson 2017-01-20 23:07:57 UTC
This has been merged into ocp and is in OCP v3.5.0.7 or newer.

Comment 5 XiaochuanWang 2017-01-22 03:24:10 UTC
Verified on openshift/oc v3.5.0.7+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.

Comment 6 Jessica Forrester 2017-02-15 17:35:51 UTC
*** Bug 1422389 has been marked as a duplicate of this bug. ***

Comment 8 errata-xmlrpc 2017-04-12 19:08:48 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-2017:0884


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