Browse Source

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.

Conflicts:
    nova/virt/libvirt/host.py

NOTE(melwitt): The conflict is because change
I7d2287ce06d77c0afdef0ea8bdfb70f6c52d3c50 is not in Rocky.

Change-Id: I0eae19399670f59c17c9a1a24e1bfcbf1b514e7b
Closes-Bug: #1851587
(cherry picked from commit a89ffab832)
(cherry picked from commit ff82601204)
(cherry picked from commit c5abbd17b5)
(cherry picked from commit d5ff9f87c8)
changes/12/749612/1
Praharshitha Metla 11 months ago
committed by melanie witt
parent
commit
8c4af53d77
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      nova/exception.py
  2. +1
    -1
      nova/virt/libvirt/host.py
  3. +1
    -1
      nova/virt/libvirt/volume/mount.py

+ 1
- 1
nova/exception.py View File

@ -505,7 +505,7 @@ class ComputeResourcesUnavailable(ServiceUnavailable):
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):


+ 1
- 1
nova/virt/libvirt/host.py View File

@ -466,7 +466,7 @@ class Host(object):
rpc.get_notifier('compute').error(nova_context.get_admin_context(),
'compute.libvirt.error',
payload)
raise exception.HypervisorUnavailable(host=CONF.host)
raise exception.HypervisorUnavailable()
return conn


+ 1
- 1
nova/virt/libvirt/volume/mount.py View File

@ -86,7 +86,7 @@ class _HostMountStateManager(object):
with self.cond:
state = self.state
if state is None:
raise exception.HypervisorUnavailable(host=CONF.host)
raise exception.HypervisorUnavailable()
self.use_count += 1
try:


Loading…
Cancel
Save