Bug 1059430 - dao: always use management bridge name from vdc_options
Summary: dao: always use management bridge name from vdc_options
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.4.0
Assignee: Eli Mesika
QA Contact: Martin Pavlik
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-29 20:38 UTC by Alon Bar-Lev
Modified: 2016-02-10 19:13 UTC (History)
12 users (show)

Fixed In Version: av1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 23894 0 None None None Never
oVirt gerrit 23928 0 None None None Never

Description Alon Bar-Lev 2014-01-29 20:38:07 UTC
Currently we have the following downstream patch:

-INSERT INTO network (id,name,description,storage_pool_id) SELECT v_id_0009, 'ovirtmgmt', 'Management Network', v_storage_pool_id;
+INSERT INTO network (id,name,description,storage_pool_id) SELECT v_id_0009, 'rhevm', 'Management Network', v_storage_pool_id;

It is the last remaining customization we are doing at downstream, I would like to eliminate this as well.

The simplest solution is to have place holder in this table, such as '@MGMT_BRIDGE@' and in dao or stored procedures replace value of 'name' fetched with '@MGMT_BRIDGE@' with value of ConfigValues.ManagementNetwork.

Last one! Last effort.

Comment 1 Eli Mesika 2014-01-30 09:29:22 UTC
(In reply to Alon Bar-Lev from comment #0)
Its is not just the DAO , there are  SPs & Views referring to the network name and making this change impractical 

Why not :

1) Have a default for MGMT_BRIDGE in config.sql
2) Ask for @MGMT_BRIDGE@ value in setup before creating the database
3) concatenate a call to fn_db_update_config_value with the value accepted to the end of config.sql , this will override the former setting no matter what it is 
4) insert_data.sql will be modified to get the network name from MGMT_BRIDGE in vdc_options
5) upon installation the right value is updated in config.sql and network table will be initialized with the selected name

Comment 2 Alon Bar-Lev 2014-01-30 09:35:55 UTC
Sad to read... :(

Easier for me is just to update the database post installation.

Can you please provide an update statement I can use that will work both on clean database and upgrade?

Thanks!

Comment 3 Alon Bar-Lev 2014-01-30 09:42:29 UTC
Better... can you please provide stp I can call to set management bridge name, this stp will do whatever required (vdc_option, this table, etc...)

Comment 4 Sandro Bonazzola 2014-02-07 11:06:46 UTC
referenced patches have been merged, shouldn't this be in modified?

Comment 5 Alon Bar-Lev 2014-02-07 11:51:44 UTC
(In reply to Sandro Bonazzola from comment #4)
> referenced patches have been merged, shouldn't this be in modified?

yes.

Comment 6 Martin Pavlik 2014-02-07 16:02:04 UTC
Eli, can you please advise on how to test this?

Comment 7 Alon Bar-Lev 2014-02-07 16:16:34 UTC
using the next 3.4 snapshot after installation/upgrade you should see that rhevm bridge name is used for management bridge. if you see the ovirtmgmt then something is wrong.

Comment 8 Martin Pavlik 2014-02-18 12:39:44 UTC
verified on  
Red Hat Enterprise Virtualization Manager Version: 3.4.0-0.2.master.el6ev 
host is installed with rhevm as management bridge

Comment 9 Itamar Heim 2014-06-12 14:09:36 UTC
Closing as part of 3.4.0


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