Bug 1211649 - management bridge called ovirtmgmt instead of rhevm
Summary: management bridge called ovirtmgmt instead of rhevm
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Eli Mesika
QA Contact: Nelly Credi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-14 13:47 UTC by Nelly Credi
Modified: 2016-04-20 01:10 UTC (History)
21 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-20 01:10:12 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 39881 0 master ABANDONED packaging: dbscripts: fix RenameManagementNetwork Never
oVirt gerrit 39885 0 master MERGED core: fix default network rename Never

Description Nelly Credi 2015-04-14 13:47:45 UTC
Description of problem:
Default network on rhevm network is named ovirtmgmt it should be named rhevm

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


How reproducible:
100%

Steps to Reproduce:
1./ovirt-engine/api/clusters/SOME_UUID/networks 
2.
3.

Actual results:
'ovirtmgmt' network exists
<networks>
    <network href="/ovirt-engine/api/clusters/faea8dde-da96-4b20-a10f-136e4700c69a/networks/a865c653-5341-43b2-8fef-0f8a464f8b2f" id="a865c653-5341-43b2-8fef-0f8a464f8b2f">
        <name>ovirtmgmt</name>
        <description>Management Network</description>
        <data_center href="/ovirt-engine/api/datacenters/abf49a20-1bba-4d47-9d75-419825d0dca8" id="abf49a20-1bba-4d47-9d75-419825d0dca8"/>
        <cluster href="/ovirt-engine/api/clusters/faea8dde-da96-4b20-a10f-136e4700c69a" id="faea8dde-da96-4b20-a10f-136e4700c69a"/>
        <stp>false</stp>
        <status>
            <state>operational</state>
        </status>
        <display>true</display>
        <mtu>0</mtu>
        <usages>
            <usage>vm</usage>
            <usage>display</usage>
            <usage>migration</usage>
            <usage>management</usage>
        </usages>
        <required>true</required>
    </network>
</networks>

Expected results:
'rhevm' network should exist

Additional info:

Comment 1 Nelly Credi 2015-04-14 13:54:20 UTC
Im putting it automation blocker, as this is blocking create vm flow

Comment 2 Yedidyah Bar David 2015-04-15 08:34:57 UTC
In 3.5, the db schema script just sets the management network name to be ovirtmgmt:

select fn_db_add_config_value('ManagementNetwork','ovirtmgmt','general');

and then a module from the downstream-only package rhevm-setup-plugins renames it:

2015-03-02 23:05:16 DEBUG otopi.context context._executeMethod:138 Stage misc METHOD otopi.plugins.ovirt_engine_setup.rhevm_setup_plugins.distro-rhel.config.Plugin._network
2015-03-02 23:05:16 DEBUG otopi.ovirt_engine_setup.database database.execute:167 Database: 'None', Statement: '
                select RenameManagementNetwork(%(name)s)
            ', args: {'name': 'rhevm'}
2015-03-02 23:05:16 DEBUG otopi.ovirt_engine_setup.database database.execute:217 Result: [{'renamemanagementnetwork': ''}]

(Sadly, the log does not show if it worked or not etc., but I guess it did).

In 3.6, we have quite many other places dealing with this name:

INSERT INTO network (id, name, description, type, addr, subnet, gateway, vlan_id, stp, storage_pool_id, mtu, vm_network, provider_network_provider_id, provider_network_external_id, free_text_comment) VALUES ('00000000-0000-0000-0000-000000000009', 'ovirtmgmt', 'Management Network', NULL, NULL, NULL, NULL, NULL, false, '00000001-0001-0001-0001-0000000001f5', NULL, true, NULL, NULL, NULL);

INSERT INTO vnic_profiles (id, name, network_id, port_mirroring, custom_properties, description, _create_date, _update_date, network_qos_id) VALUES ('0000000a-000a-000a-000a-000000000398', 'ovirtmgmt', '00000000-0000-0000-0000-000000000009', false, NULL, NULL, '2015-02-02 13:47:16.002849+02', NULL, NULL);

select fn_db_add_config_value('ManagementNetwork','ovirtmgmt','general');

update network_cluster
set management = true
where network_id in (select id
                     from network
                     where name=(select COALESCE((select option_value
                                                  from vdc_options
                                                  where option_name='ManagementNetwork'
                                                  and version='general'),
                                                 'ovirtmgmt')));

Some options I can think of:

1. Just update the rhevm-setup-plugins package to updates these places too

2. Make all the other callers in dbscripts parametric, and pass them somehow the correct name

3. Split the schema script to two parts - one sets the name, the other includes all the code that uses this name, and use the name in the db (and not hard coded). Then make the rhevm-setup-plugins plugin run in between the two.

(1.) is simplest, but is not that scalable - it will break if more such places are added in the future.

Sandro - what do you think?

Comment 3 Yedidyah Bar David 2015-04-15 08:37:30 UTC
There is, btw, another option - to just give up on branding the network name and leave it ovirtmgmt in downstream. We'll then have to deal with upgrades, might not be trivial either.

Comment 4 Sandro Bonazzola 2015-04-15 09:10:22 UTC
I suggest to go with 1 for allowing automation to continue to test the rest of the code and ask PM and infra about comment #3 and options 2 and 3.

Comment 5 Yedidyah Bar David 2015-04-15 12:29:13 UTC
It seems to me like it should have worked - RenameManagementNetwork does change all places. Looking further.

Comment 6 Yedidyah Bar David 2015-04-15 12:56:12 UTC
Seems like a bug in [1], setting the version to 'genenral' instead of 'general'.

Eli will fix by adding a new update file.

Comment 7 Yedidyah Bar David 2015-04-15 12:57:08 UTC
[1] https://gerrit.ovirt.org/32810

Comment 8 wanghui 2015-10-19 07:37:51 UTC
Hi Nelly,

I still encounter this issue in Red Hat Enterprise Virtualization Manager Version: 3.6.0-0.18.el6(rhevm-backend-3.6.0-0.18.el6.noarch.rpm). 

Please let me know which rhevm-backend version includes this fix.

Thanks!

Hui Wang

Comment 9 Fabian Deutsch 2015-10-19 07:45:58 UTC
Eli/Simone, can you answer Hui's question in comment 8?

Comment 10 Simone Tiraboschi 2015-10-19 08:04:07 UTC
The issue Didi was talking about has been fixed here:
https://gerrit.ovirt.org/#/c/39885/
a few month ago.

On 3.6 the management network is called by default ovirtmgmt also downstream and the user can also change it to a different value. Please see:
https://bugzilla.redhat.com/show_bug.cgi?id=1231799#c5


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