Nova passes a configured host value[1] which also defaults to socket.gethostname()[2].
You are correct that cinder doesn't pass any value for the host field[3] and os-brick uses socket.gethostname() again[4].
A similar case can be seen in the glance cinder store where we also pass socket.gethostname()[5]
One way to address this in cinder and glance_store is to add a config option for "host" field and operators can configure it in cinder.conf file. By default, the config option will use socket.gethostname() value.
Hi Rodrigo,
Nova passes a configured host value[1] which also defaults to socket. gethostname( )[2]. gethostname( ) again[4]. gethostname( )[5]
You are correct that cinder doesn't pass any value for the host field[3] and os-brick uses socket.
A similar case can be seen in the glance cinder store where we also pass socket.
One way to address this in cinder and glance_store is to add a config option for "host" field and operators can configure it in cinder.conf file. By default, the config option will use socket. gethostname( ) value.
[1] https:/ /github. com/openstack/ nova/blob/ b9ac827491fff76 eb6e4cd243d9be3 1304ea338d/ nova/virt/ libvirt/ driver. py#L1799 /opendev. org/openstack/ nova/src/ commit/ b9ac827491fff76 eb6e4cd243d9be3 1304ea338d/ nova/conf/ netconf. py#L53 /github. com/openstack/ cinder/ blob/b75c29c7d8 e0e6ac212b59f9a d8d140874e55251 /cinder/ volume/ volume_ utils.py# L1391-L1394 /github. com/openstack/ os-brick/ blob/b6f0f3c25e cda80861ff233ca 8526d338319bd49 /os_brick/ initiator/ connector. py#L224 /github. com/openstack/ glance_ store/blob/ 6741951591ca7d6 144f6089678df8c ee4f0a7030/ glance_ store/_ drivers/ cinder/ store.py# L713
[2] https:/
[3] https:/
[4] https:/
[5] https:/