Skip to content

Commit

Permalink
fix(LinstorVolumeManager): ensure we always use IPs in _get_controlle…
Browse files Browse the repository at this point in the history
…r_uri

Otherwise if a hostname is returned, we can't use it if the XCP-ng pool
is configurer using static IPs instead of DHCP.

Signed-off-by: Ronan Abhamon <ronan.abhamon@vates.fr>
  • Loading branch information
Wescoeur committed May 12, 2022
1 parent 7b66d2b commit df92fcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/linstorvolumemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def _get_controller_uri():
if distutils.util.strtobool(
session.xenapi.host.call_plugin(host_ref, PLUGIN, PLUGIN_CMD, {})
):
return 'linstor://' + host_record['hostname']
return 'linstor://' + host_record['address']
except:
# Not found, maybe we are trying to create the SR...
pass
Expand Down

0 comments on commit df92fcf

Please sign in to comment.