Bug 1532201 - RHSM validate/save fails to save settings correctly if you click register too fast.
Summary: RHSM validate/save fails to save settings correctly if you click register too...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: Martin Hradil
QA Contact: Mike Shriver
URL:
Whiteboard: webui:upgrade:black
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-08 11:00 UTC by luke couzens
Modified: 2019-02-07 23:00 UTC (History)
14 users (show)

Fixed In Version: 5.10.0.11
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-07 23:00:53 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0212 None None None 2019-02-07 23:00:59 UTC

Description luke couzens 2018-01-08 11:00:13 UTC
Description of problem:RHSM validate/save fails to save settings correctly if you click register to fast.


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


How reproducible:100%


Steps to Reproduce:
1.provision appliance
2.nav to configuration-settings-region-Red Hat Updates
3.edit registration
4.add rhsm settings and change repo from cf-me-5.9-for-rhel-7-rpms to cf-me-5.8-for-rhel-7-rpms 
5. validate and save
6.immediately hit register

Actual results:
Registration fails due to subscription_manager.managercli:'cf-me-5.9-for-rhel-7-rpms' does not match a valid repository ID


Expected results:
Registration completes successfully


Additional info:
evm.log - http://pastebin.test.redhat.com/544768

It seems as though the save is not completed by the time the next page is loaded. If you wait a little time before hitting register it works correctly with the changed repo settings.

Comment 10 CFME Bot 2018-08-16 13:12:26 UTC
New commits detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/e1f81401153cdc2a3b0d94f7836ed5f6114ec8c4
commit e1f81401153cdc2a3b0d94f7836ed5f6114ec8c4
Author:     Martin Hradil <mhradil@redhat.com>
AuthorDate: Mon Jan  8 10:05:16 2018 -0500
Commit:     Martin Hradil <mhradil@redhat.com>
CommitDate: Mon Jan  8 10:05:16 2018 -0500

    miqAjax* - accept observe:true in options to use miqObserveQueue

    this allows miqAjaxButton to be queued in the same queue used by miq-observe,
    thus waiting for any miq-observe requests to complete before submitting the form

    https://bugzilla.redhat.com/show_bug.cgi?id=1532201

 app/assets/javascripts/miq_application.js | 9 +-
 1 file changed, 8 insertions(+), 1 deletion(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/c78ba1efdae882e6397f63c752226c8a63c1265c
commit c78ba1efdae882e6397f63c752226c8a63c1265c
Author:     Martin Hradil <mhradil@redhat.com>
AuthorDate: Fri Aug 10 12:14:32 2018 -0400
Commit:     Martin Hradil <mhradil@redhat.com>
CommitDate: Fri Aug 10 12:14:32 2018 -0400

    x_edit_buttons - support observe param to use observe queue for save/add buttons

    https://bugzilla.redhat.com/show_bug.cgi?id=1532201

 app/views/layouts/_x_edit_buttons.html.haml | 8 +-
 1 file changed, 5 insertions(+), 3 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/f3b9b791e8db0f9c4145fe395f9046b2ff97d4c4
commit f3b9b791e8db0f9c4145fe395f9046b2ff97d4c4
Author:     Martin Hradil <mhradil@redhat.com>
AuthorDate: Fri Aug 10 11:50:36 2018 -0400
Commit:     Martin Hradil <mhradil@redhat.com>
CommitDate: Fri Aug 10 11:50:36 2018 -0400

    rhn_edit - use observe queue for validate & save

    validate:
      this is a straight transform from link_to + RJS remote: true,
      to a button using miqAjaxButton

      except adding observe:true so that the validate action never happens before any pending edit actions

      (auth_credentials2 is only ever used from that single Red Hat Updates edit form)

    save:
      just enabling observe=true for x_edit_buttons in settings_rhn_edit

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

 app/controllers/ops_controller.rb | 1 +
 app/views/layouts/_auth_credentials2.html.haml | 20 +-
 2 files changed, 10 insertions(+), 11 deletions(-)

Comment 11 Mike Shriver 2019-01-15 21:04:10 UTC
Tested in CFME 5.10.0.31.20190108221820_a0968c8

The validate button has been replaced with MiqAjaxButton, and the existing MiqAjaxButton items on the subscription form have been updated with observeQueue boolean included.

I tested immediate registration of both the default repositories, and a modified repository list. Registration was successful.

Comment 12 errata-xmlrpc 2019-02-07 23:00:53 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/RHSA-2019:0212


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