Red Hat Bugzilla – Bug 832972
[engine][setupNetworks] Sync network configuration on failure too
Last modified: 2016-02-10 14:47:01 EST
Description of problem:
If setup networks fails, the network configuration will not be synced from the host but it might be different there than what the engine knows.
Therefore, if the setup networks fails on the host, the engine should sync the configuration (getVdsCaps) to what the host knows.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Call setup networks and attach a network (non VLAN) to ethX
2. Delete the network_name from ethX in the vds_interfaces table
3. Call setup networks again an attach a different network (non VLAN) to ethX
VDSM should fail because a network is already attached to ethX, but this will not be seen on the interface in the UI/REST.
The already attached network should appear on the interface, even though setup networks had failed.
Also it's possible not to sync at the end, but instead mark network config as "unknown" so that the user has indication that the engine is out-of-sync, and try to remedy the situation (either automatically or manually).
You can reproduce this, instead of altering in the DB, like this:
1. Create bridge on the host with any name you want (In the network-scripts folder) and assign it to ethX.
2. Make sure you DON'T bring the host up.
3. Call setup networks, and try to attach a (non VLAN) network to ethX.
refreshing the network configuration from the host in case of a failure is problematic as it is a blocking command and the UI is stuck.
This should be fix as part of enabling manual refresh capabilities or refresh network configuration