Bug 1340506

Summary: state of "View and Accept Hosts" page is lost on reload
Product: [Red Hat Storage] Red Hat Storage Console Reporter: Martin Bukatovic <mbukatov>
Component: UIAssignee: Nishanth Thomas <nthomas>
Status: CLOSED WONTFIX QA Contact: sds-qe-bugs
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2CC: deb, nthomas, sankarshan, vsarmila
Target Milestone: ---   
Target Release: 3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-23 04:11:13 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:
Attachments:
Description Flags
screenshot of "View and Accept Hosts" page none

Description Martin Bukatovic 2016-05-27 15:20:52 UTC
Description of problem
======================

State of "View and Accept Hosts" page (which is part of "Create Cluster"
workflow) is lost on page reload. This also means that one can't get back
to this page later (no matter if there is a link to it or not).

Version-Release
===============

rhscon-ui-0.0.34-1.el7scon.noarch

Related packages on RHSC 2.0 server machine:

rhscon-core-0.0.19-1.el7scon.x86_64
rhscon-ceph-0.0.18-1.el7scon.x86_64
ceph-installer-1.0.11-1.el7scon.noarch
ceph-ansible-1.0.5-15.el7scon.noarch

Related packages on RHSC 2.0 Ceph server machines:

rhscon-agent-0.0.8-1.el7scon.noarch

How reproducible
================

100 %

Steps to Reproduce
==================

1. Install RHSC 2.0 following the documentation, make sure you have few nodes
   ready to be accepted later.
2. Go to Clusters page and click on "Create Cluster" to start the wizard.
3. Modal window with warning stating "Unaccepted Hosts Detected" should be
   shown. Click on "View and Accept" button to go to "View and Accept Hosts"
   page, where you click on "Accept All" button and *stay on this page*.
4. Force a reload of the page (in Firefox via control-F5) while the accept
   process is still running.

Actual results
==============

The state of the page is cleared on reload and the content is lost.

Expected results
================

The state is preserved (in the same was as it's done for *Tasks* page for
example) and it's possible to revisit this page later.

Comment 1 Martin Bukatovic 2016-05-27 15:23:39 UTC
Created attachment 1162514 [details]
screenshot of "View and Accept Hosts" page

Attaching screenshot of "View and Accept Hosts" page after the reload while the
accept tasks are still running.

Comment 2 :Deb 2016-06-22 13:29:11 UTC
================================
TL;DR: Most likely, not a UI bug
================================

Summarized explanation: As long as backend doesn't consider "In progress of being accepted" as "unmanaged", this will be auto fixed in the frontend. Don't change "unmanaged" flag (in backend) while accepting host is initiated, but while it's finished (success or failure).


Long explanation:

So I went through the code & apparently the moment accepting host is triggered, I think, backend removes their "discovered hosts" flag & also they don't have "accepted host" flag yet - so they're in a limbo. Hence, API doesn't return those hosts for the unmanaged_hosts list (or provide any alternative API call).

As they're not returned in the unmanaged_hosts call, frontend doens't see those hosts in consecutive API calls, and can't list them.

Frontend code (seems good): kitoon/app/components/rest/server.ts:155-163
Backend code that probably needs update: skyring/apps/skyring/nodes.go:313..

If you think it still should be fixed in the frontend, feel free to correct me and give directions.

Comment 3 :Deb 2016-06-22 13:53:24 UTC
Found the actual bug which causes this.