Removed the host FQDN from the exception message
Deletion of an instance after disabling the hypervisor by a non-admin user leaks the host fqdn in fault msg of instance.Removing the 'host' field from the error message of HypervisorUnavaiable cause it's leaking host fqdn to non-admin users. The admin user will see the Hypervisor unavailable exception msg but will be able to figure on which compute host the guest is on and that the connection is broken. Change-Id: I0eae19399670f59c17c9a1a24e1bfcbf1b514e7b Closes-Bug: #1851587
This commit is contained in:
parent
2f3a380c3c
commit
a89ffab832
|
@ -506,7 +506,7 @@ class ComputeResourcesUnavailable(ServiceUnavailable):
|
||||||
|
|
||||||
|
|
||||||
class HypervisorUnavailable(NovaException):
|
class HypervisorUnavailable(NovaException):
|
||||||
msg_fmt = _("Connection to the hypervisor is broken on host: %(host)s")
|
msg_fmt = _("Connection to the hypervisor is broken on host")
|
||||||
|
|
||||||
|
|
||||||
class ComputeServiceUnavailable(ServiceUnavailable):
|
class ComputeServiceUnavailable(ServiceUnavailable):
|
||||||
|
|
|
@ -509,7 +509,7 @@ class Host(object):
|
||||||
payload)
|
payload)
|
||||||
compute_utils.notify_about_libvirt_connect_error(
|
compute_utils.notify_about_libvirt_connect_error(
|
||||||
ctxt, ip=CONF.my_ip, exception=ex)
|
ctxt, ip=CONF.my_ip, exception=ex)
|
||||||
raise exception.HypervisorUnavailable(host=CONF.host)
|
raise exception.HypervisorUnavailable()
|
||||||
|
|
||||||
return conn
|
return conn
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ class _HostMountStateManager(object):
|
||||||
with self.cond:
|
with self.cond:
|
||||||
state = self.state
|
state = self.state
|
||||||
if state is None:
|
if state is None:
|
||||||
raise exception.HypervisorUnavailable(host=CONF.host)
|
raise exception.HypervisorUnavailable()
|
||||||
self.use_count += 1
|
self.use_count += 1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue