UPDATE network_cluster nc1
SET management = TRUE
WHERE network_id IN (SELECT id
                     FROM network
                     WHERE name = (SELECT COALESCE((SELECT option_value
                                                    FROM vdc_options
                                                    WHERE option_name = 'DefaultManagementNetwork'
                                                          AND version = 'general'),
                                                   'ovirtmgmt')))
      AND NOT exists(SELECT 1
                     FROM network_cluster nc2
                     WHERE nc1.cluster_id = nc2.cluster_id
                           AND nc2.management = TRUE);

Set management network in upgrade
engine: Set management network in upgrade

Set management network in upgrade (take 2).

The patch re-dones upgrade script 03_06_0840
as the related configuration key was renamed in the pre-upgrade phase.

Change-Id: I8c68c2bfe758beacb41a74912dacc2080cb621a6
Bug-Url: https://bugzilla.redhat.com/1279955
Signed-off-by: Yevgeny Zaspitsky <5867ea5dedc3cfe9465a973c57fc72f1d7b5bacc@redhat.com>
