My only concern is that in the function get_mon_hosts, it is possible that NXDOMAIN (which certainly seems could potentially happen) will result in None:6789 as one of the items in the hosts list:
hosts.append( '{}:6789'.format(utils.get_host_ip( utils.relation_get('private-address', unit, relid)))
This list is then passed on to ceph via /etc/ceph/ceph.conf, so this may be fine. But it also seems potentially problematic.
Maybe instead we should simply not append an unresolved address to hosts. Another possibility is to do a retry on get_host_ip. Alternatively instead of swallowing the error, we could force the juju admin to resolve this problem. That does sound more painful however.
My only concern is that in the function get_mon_hosts, it is possible that NXDOMAIN (which certainly seems could potentially happen) will result in None:6789 as one of the items in the hosts list:
This list is then passed on to ceph via /etc/ceph/ ceph.conf, so this may be fine. But it also seems potentially problematic.
Maybe instead we should simply not append an unresolved address to hosts. Another possibility is to do a retry on get_host_ip. Alternatively instead of swallowing the error, we could force the juju admin to resolve this problem. That does sound more painful however.