Bug 1353597 - CF4.0 to CF4.1 upgrade breaks Networks/Networks UI
Summary: CF4.0 to CF4.1 upgrade breaks Networks/Networks UI
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Documentation
Version: 5.6.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.7.0
Assignee: Dayle Parker
QA Contact: Suyog Sainkar
URL:
Whiteboard: doc
Depends On:
Blocks: 1356703 1511957
TreeView+ depends on / blocked
 
Reported: 2016-07-07 14:11 UTC by Josh Carter
Modified: 2019-11-14 08:38 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1356703 (view as bug list)
Environment:
Last Closed: 2018-04-11 02:01:43 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Josh Carter 2016-07-07 14:11:27 UTC
Description of problem:

After upgrading CF4.0 to 4.1 and launching UI.  Opening networks + networks throws error in UI.
/cloud_network/show_list
The single-table inheritance mechanism failed to locate the subclass: 'ManageIQ::Providers::Openstack::CloudManager::CloudNetwork'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite CloudNetwork.inheritance_column to use another column for that information. [cloud_network/show_list]

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Ladislav Smola 2016-07-15 08:23:59 UTC
The environment most possibly contains Networks that are not associated to any EMS. It can be fixed running these commands in rails c:

CloudNetwork.where(:type => "ManageIQ::Providers::Openstack::CloudManager::CloudNetwork", :external_facing => false).update_all(:type => "ManageIQ::Providers::Openstack::NetworkManager::CloudNetwork::Private")

CloudNetwork.where(:type => "ManageIQ::Providers::Openstack::CloudManager::CloudNetwork", :external_facing => true).update_all(:type => "ManageIQ::Providers::Openstack::NetworkManager::CloudNetwork::Public")


or non associated CloudNetworks can be deleted with:
CloudNetwork.where(:type => "ManageIQ::Providers::Openstack::CloudManager::CloudNetwork", :ems_id => nil).delete_all

Comment 6 Ladislav Smola 2016-07-15 11:15:51 UTC
these 3 commands should work for orphaned network with subnets:
---------------------------------------------------------------

CloudNetwork.where(:type => "ManageIQ::Providers::Openstack::CloudManager::CloudNetwork", :external_facing => false).update_all(:type => "ManageIQ::Providers::Openstack::NetworkManager::CloudNetwork::Private")

CloudNetwork.where(:type => "ManageIQ::Providers::Openstack::CloudManager::CloudNetwork", :external_facing => true).update_all(:type => "ManageIQ::Providers::Openstack::NetworkManager::CloudNetwork::Public")

CloudSubnet.where(:type => "ManageIQ::Providers::Openstack::CloudManager::CloudSubnet").update_all(:type => "ManageIQ::Providers::Openstack::NetworkManager::CloudSubnet")

or delete the orphaned OpenStack networks and subnets:
------------------------------------------------------

CloudNetwork.where(:type => "ManageIQ::Providers::Openstack::CloudManager::CloudNetwork", :ems_id => nil).delete_all

CloudSubnet.where(:type => "ManageIQ::Providers::Openstack::CloudManager::CloudSubnet", :ems_id => nil).delete_all

or delete all orphaned networks and subnets:
--------------------------------------------

CloudNetwork.where(:ems_id => nil).delete_all

CloudSubnet.where(:ems_id => nil).delete_all

Comment 8 Satoe Imaishi 2016-08-23 15:13:39 UTC
Ladislav, can you please add PR link?

Comment 9 Ladislav Smola 2016-08-24 08:52:39 UTC
Satoe, there is no PR, we just agreed with jkrocil to include steps from comment #6 to upgrade docs.

Comment 10 Satoe Imaishi 2016-08-24 13:59:44 UTC
Thanks, Ladislav.

In that case, I'm changing this to Documentation and re-opening..

Comment 12 Andrew Dahms 2018-04-05 00:31:51 UTC
Assigning to Dayle for review.

Dayle - looks like a request to update the older upgrade content to include the steps in comment #6.

Comment 13 Dayle Parker 2018-04-09 04:04:21 UTC
Hi Suyog,

Can you please review the update I made, and let me know if you think it makes sense?

I've added a small section to the end of the procedure on migrating database appliances to describe what is in Comment #6, above. It's called "Additional Steps to Refresh Network Providers" in https://access.redhat.com/articles/2297391. It's published but I'm happy to fix anything you come across.

Thank you,
Dayle

Comment 14 Suyog Sainkar 2018-04-10 02:43:43 UTC
Hi Dayle, 

Thanks for the updates. I've reviewed the new section -- looks good to me.

Thanks,
Suyog

Comment 15 Dayle Parker 2018-04-11 02:01:43 UTC
Thanks for reviewing, Suyog.

The changes are live here, so closing this bug:

https://access.redhat.com/articles/2297391


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