Bug 1691992
| Summary: | [v2v] : Migration shows blank page if provider is removed from CFME | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Shveta <sshveta> | ||||||
| Component: | V2V | Assignee: | Fabien Dupont <fdupont> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Shveta <sshveta> | ||||||
| Severity: | high | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | ||||||
| Priority: | high | ||||||||
| Version: | 5.10.2 | CC: | bthurber, dmetzger, jprause, kkulkarn, mturley, mzazrivec, smallamp, vconzola | ||||||
| Target Milestone: | GA | Keywords: | Regression, TestOnly, ZStream | ||||||
| Target Release: | 5.11.0 | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | V2V | ||||||||
| Fixed In Version: | 5.11.0.1 | Doc Type: | If docs needed, set a value | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | |||||||||
| : | 1696421 (view as bug list) | Environment: | |||||||
| Last Closed: | 2019-12-13 15:08:46 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | Bug | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | V2V | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 1696421 | ||||||||
| Attachments: |
|
||||||||
|
Description
Shveta
2019-03-23 03:43:06 UTC
BY provider I mean OSP provider . I removed OSP provider to recreate the BZ. Did this work correctly in 5.10.1, or more generally what was the last known working release? I see it last working on 5.10.0.24.20181113213923_03b81fd. https://bugzilla.redhat.com/show_bug.cgi?id=1672702 fixed/Verified in 5.10.1 FYI: That is a related BZ.. not following the same exact steps as this BZ. Targeting 5.10.3 @shveta @sshveta Can you provide more details? How was the migration started - scheduled or manual click of Migrate button? Which page is supposed to be displayed in the screenshot - Migration Plans? If the provider has been removed the infra mapping should become invalid and the Migrate button for any plans using that mapping should be disabled. 1) Created Infrastructure mapping. 2) Created Migration plan and started immediately . 3) Once the plan starts , I deleted OSP. 4) Navigated to Compute - Migration Plans - Blank page The relevant error here is:
...
react-dom.production.min.js:171 TypeError: Cannot read property 'ems_id' of undefined
...
The failing code in particular:
$ cat app/javascript/react/screens/App/Overview/helpers.js
...
export const attachTargetProvider = (plan, providers, clusters, targetProviderType) => {
if (!plan.transformation_mapping) {
return plan;
}
const {
transformation_mapping: { transformation_mapping_items }
} = plan;
const clusterMapping = transformation_mapping_items.find(
item => item.destination_type === TRANSFORMATION_MAPPING_ITEM_DESTINATION_TYPES[targetProviderType].cluster
);
const targetCluster = clusters.find(cluster => cluster.id === clusterMapping.destination_id);
const targetProvider = providers.find(provider => provider.id === targetCluster.ems_id);
return { ...plan, targetProvider };
};
Pasting the full error stack here:
vendor-340c92bee2eeaef68d4f.js:sourcemap:619 TypeError: Cannot read property 'ems_id' of undefined
at helpers.js:33
at Array.find (<anonymous>)
at t.attachTargetProvider (helpers.js:33)
at OverviewSelectors.js:75
at Array.map (<anonymous>)
at Array.<anonymous> (vendor-340c92bee2eeaef68d4f.js:sourcemap:13)
at t.attachTargetProviderToOspPlans (OverviewSelectors.js:69)
at Function.mapToProps (index.js:29)
at o (vendor-340c92bee2eeaef68d4f.js:sourcemap:166)
at vendor-340c92bee2eeaef68d4f.js:sourcemap:230
si @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
n.callback @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
io @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
oo @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
pa @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
fa @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
da @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
ji @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
enqueueSetState @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
b.setState @ vendor-340c92bee2eeaef68d4f.js:sourcemap:627
o.onStateChange @ vendor-340c92bee2eeaef68d4f.js:sourcemap:166
y @ vendor-340c92bee2eeaef68d4f.js:sourcemap:138
(anonymous) @ vendor-340c92bee2eeaef68d4f.js:sourcemap:504
(anonymous) @ vendor-340c92bee2eeaef68d4f.js:sourcemap:504
(anonymous) @ vendor-340c92bee2eeaef68d4f.js:sourcemap:504
dispatch @ vendor-340c92bee2eeaef68d4f.js:sourcemap:138
(anonymous) @ vendor-340c92bee2eeaef68d4f.js:sourcemap:504
Promise.then (async)
(anonymous) @ vendor-340c92bee2eeaef68d4f.js:sourcemap:504
(anonymous) @ vendor-340c92bee2eeaef68d4f.js:sourcemap:504
(anonymous) @ vendor-340c92bee2eeaef68d4f.js:sourcemap:504
dispatch @ vendor-340c92bee2eeaef68d4f.js:sourcemap:138
(anonymous) @ OverviewActions.js:123
(anonymous) @ vendor-340c92bee2eeaef68d4f.js:sourcemap:504
(anonymous) @ vendor-340c92bee2eeaef68d4f.js:sourcemap:504
(anonymous) @ vendor-340c92bee2eeaef68d4f.js:sourcemap:230
(anonymous) @ Overview.js:45
Promise.then (async)
value @ Overview.js:44
pa @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
fa @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
da @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
ji @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
ba @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
_a @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
xa.render @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
(anonymous) @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
ya @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
Ta @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
render @ vendor-340c92bee2eeaef68d4f.js:sourcemap:619
n @ application-common-e00a08200dbdb5bf73ff.js:1
create @ application-common-e00a08200dbdb5bf73ff.js:1
f @ application-common-e00a08200dbdb5bf73ff.js:1
t.componentFactory @ application-common-e00a08200dbdb5bf73ff.js:1
(anonymous) @ plans:1480
helpers.js:33 Uncaught (in promise) TypeError: Cannot read property 'ems_id' of undefined
at helpers.js:33
at Array.find (<anonymous>)
at t.attachTargetProvider (helpers.js:33)
at OverviewSelectors.js:75
at Array.map (<anonymous>)
at Array.<anonymous> (vendor-340c92bee2eeaef68d4f.js:sourcemap:13)
at t.attachTargetProviderToOspPlans (OverviewSelectors.js:69)
at Function.mapToProps (index.js:29)
at o (vendor-340c92bee2eeaef68d4f.js:sourcemap:166)
at vendor-340c92bee2eeaef68d4f.js:sourcemap:230
The PR is now merged. Fabien, do you mind moving this to POST? New commits detected on ManageIQ/manageiq-v2v/master: https://github.com/ManageIQ/manageiq-v2v/commit/eef8437db69db455db389b26e19f4c2c749d8dac commit eef8437db69db455db389b26e19f4c2c749d8dac Author: Milan Zazrivec <mzazrivec> AuthorDate: Fri Mar 29 08:39:07 2019 -0400 Commit: Milan Zazrivec <mzazrivec> CommitDate: Fri Mar 29 08:39:07 2019 -0400 Migration Plans in Progress page: fix error with deleted target provider https://bugzilla.redhat.com/show_bug.cgi?id=1691992 app/javascript/react/screens/App/Overview/helpers.js | 3 + 1 file changed, 3 insertions(+) https://github.com/ManageIQ/manageiq-v2v/commit/5fbab3104dea1e52591450ac2f0dc7588e6d6887 commit 5fbab3104dea1e52591450ac2f0dc7588e6d6887 Author: Mike Turley <mturley> AuthorDate: Wed Apr 3 10:22:48 2019 -0400 Commit: Mike Turley <mturley> CommitDate: Wed Apr 3 10:22:48 2019 -0400 Guard against plan.targetProvider being undefined https://bugzilla.redhat.com/show_bug.cgi?id=1691992 app/javascript/react/screens/App/Overview/components/Migrations/MigrationsInProgressCard.js | 3 +- 1 file changed, 2 insertions(+), 1 deletion(-) On CFME Version 5.11.0.11 I do not see page going blank. Please see attached screenshot with the UI that shows "Missing Providers" message as expected. Created attachment 1586838 [details]
Screenshot
|