Comment 2 for bug 1959750

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hello Sahid:

Good catch.

The segments belong to a single network only. You can use this field to execute or not the scheduling:

        for network_id in network_ids:
            for segment in (s for s in segments if s['network_id'] == network_id):
                self._schedule_network(
                    payload.context, network_id, dhcp_notifier,
                    candidate_hosts=segment['hosts'])

In each "network_id" loop, only those segments belonging to this network will be scheduled; each segment will be scheduled only once.

Thanks again for the bug report.

Regards.