Comment 1 for bug 1827492

Revision history for this message
pandatt (pandatt) wrote :

I found the root cause, the `required_by` function in `nova.virt.config_drive` module did not take the case as follows into consideration:
"""
def required_by(instance):
    image_prop = instance.image_meta.properties.get(
        "img_config_drive",
        fields.ConfigDrivePolicy.OPTIONAL)

    return (instance.config_drive or
            CONF.force_config_drive or
            image_prop == fields.ConfigDrivePolicy.MANDATORY
            )
"""
When instances ,initially booted without `--config-drive` option and host `force_config_drive=True` option,
are hard rebooted in host with `force_config_drive=True` newly configured and virt XML needs to be re-generated,
they should not be enforced to have config drives. Only the newly-built ones should be.