Comment 8 for bug 1025817

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

A slightly more detailed analysis (meaning I've actually looked at the code, and its history) suggests we go for two bugs.

This bugs might address the dhcp issue, as:

    def _output_opts_file(self):
        """Write a dnsmasq compatible options file."""
        # TODO (mark): add support for nameservers
        options = []
        for i, subnet in enumerate(self.network.subnets):
            if subnet.ip_version == 6:
                continue
            else:
                options.append((self._TAG_PREFIX % i,
                                'option',
                                'router',
                                subnet.gateway_ip))

        name = self.get_conf_file_name('opts')
        replace_file(name, '\n'.join(['tag:%s,%s:%s,%s' % o for o in options]))
        return name

Will always assign the dhcp router option no matter what is in the gateway_ip attribute.
For the API layer, we need a solution for specifying subnets without a default gateway. Nachi, could you please file another bug report for it?