Bug 1059430

Summary: dao: always use management bridge name from vdc_options
Product: Red Hat Enterprise Virtualization Manager Reporter: Alon Bar-Lev <alonbl>
Component: ovirt-engineAssignee: Eli Mesika <emesika>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Pavlik <mpavlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: acathrow, alonbl, eedri, emesika, gklein, iheim, lpeer, pstehlik, Rhev-m-bugs, sbonazzo, sherold, yeylon
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: av1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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