Actually, looking at the code further [1], the docstring says that the host_name variable will only be set when the user has specified a target host for a cold migration. So, a resize without a target host specified will be able to land on the same host if CONF.allow_resize_to_same_host = True. BUT, a resize with a target host specified will be rejected. Prior to that change, it was not possible to specify a target host during a resize, at all.
David, you are specifying a target host in your resize command, I assume?
I'm unsure if the code was written intentionally to reject self host, given CONF.allow_resize_to_same_host. We should discuss this with the wider team and find out more about the original target host feature.
Actually, looking at the code further [1], the docstring says that the host_name variable will only be set when the user has specified a target host for a cold migration. So, a resize without a target host specified will be able to land on the same host if CONF.allow_ resize_ to_same_ host = True. BUT, a resize with a target host specified will be rejected. Prior to that change, it was not possible to specify a target host during a resize, at all.
David, you are specifying a target host in your resize command, I assume?
I'm unsure if the code was written intentionally to reject self host, given CONF.allow_ resize_ to_same_ host. We should discuss this with the wider team and find out more about the original target host feature.
[1] https:/ /github. com/openstack/ nova/blob/ 9419c3e05499e55 beda93d664197a7 b0f0011ff7/ nova/compute/ api.py# L3524-L3525