Created attachment 1547188 [details] blank migration page Description of problem: If provider is removed from CFME, migration plan page shows blank . Guess the plan is referencing to null provider in db . Version-Release number of selected component (if applicable): 5.10.2.2.20190319204241_4304a7d How reproducible: Steps to Reproduce: 1. Add OSP and vmware provider . 2. Create infrastructure mapping and migration plan. 3. Remove Provider . Actual results: Migration starts showing blank page . Even after provider is added back , blank page is shown Expected results: Additional info: Appliance : https://10.8.198.237 Logs do not show any error .
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
https://github.com/ManageIQ/manageiq-v2v/pull/923
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