Bug 1540255

Summary: hosted-engine deployment via cockpit stopped when moving between tabs
Product: [oVirt] cockpit-ovirt Reporter: Ido Rosenzwig <irosenzw>
Component: Hosted EngineAssignee: Ryan Barry <rbarry>
Status: CLOSED DUPLICATE QA Contact: Yihui Zhao <yzhao>
Severity: high Docs Contact:
Priority: unspecified    
Version: 0.11.6CC: bugs, cshao, stirabos
Target Milestone: ---Flags: rule-engine: ovirt-4.2?
cshao: testing_ack?
Target Release: ---   
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: 2018-02-01 10:07:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screen capture none

Description Ido Rosenzwig 2018-01-30 15:54:11 UTC
Created attachment 1388510 [details]
Screen capture

Description of problem:
while deploying hosted-engine via cockpit, if one switch the tabs on the GUI from hosted-engine to Dashbaord the deployment stopped.
When you go back to the Hosted-engine tab you will see the initial page instead of the page you left from.

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


How reproducible:
100%

Steps to Reproduce:
1. run hosted-engine deployment via cockpit
2. switch tab at any stage of the deployment process
3.

Actual results:
deployment stops

Expected results:
deployment should continue 

Additional info:
video attached

Comment 1 Sandro Bonazzola 2018-01-30 16:04:39 UTC
Duplicate of bug #1422544 ?

Comment 2 Simone Tiraboschi 2018-01-30 16:52:07 UTC
(In reply to Sandro Bonazzola from comment #1)
> Duplicate of bug #1422544 ?

Now the cockpit plugin should directly consume ansible playbooks with no connection to hosted-engine-setup so I'd keep them distinct although the result are similar.

Comment 3 Ryan Barry 2018-02-01 10:07:42 UTC
From my point of view, this is definitely a duplicate.

Even if ansible is being used instead of otopi, the behavior is identical, and all of the same caveats in bug #1422544 apply.

We can try to serialize the object and reconnect to it, but it's also a UX question. Many web applications, for years, have behaved in the same way. Leaving or refreshing the page allows users to restart the process from the beginning.

If we do not want to do this, we will instead need to leave the cockpit channel open, serialize it, and reconnect.

Note that this will not work and resolve the original bug (#1422544) if the connection actually drops, since it will not be possible to serialize the object to the disk of the server without a connection to cockpit's dbus backend.

IMO, it would be best to pop up a "are you sure" modal when switching tabs to resolve this bug.

Something like:

this.state = {
  allowReconnect = true
}

reconnectConfirmation(e) {
  this.setState({allowReconnect: e.confirmed})
  if (this.state.allowReconnect) {
    serializeObject(...)
  }
}

componentWillMount() {
  try {
    loadSavedState(...)
  }
  catch {
    // do default operation
  }
}

In the worst case, to resolve the original bug, we can serialize the object once we actually invoke otopi/ansible, so a disconnect will preserve it.

Note that cockpit itself does not do this. If the page is switched while in the RHSM plugin, it starts from the beginning. If the page is refreshed while in the cockpit terminal, it starts from scratch on reload. We should try to match this behavior if possible.

That said, closing as a duplicate.

*** This bug has been marked as a duplicate of bug 1422544 ***