| Summary: | Hang up with virsh destroy a VM when the connection of nfs storage is blocked | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Nan Zhang <nzhang> |
| Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
| Status: | CLOSED NOTABUG | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.2 | CC: | berrange, dallan, dyuan |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-05-25 03:37:42 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Nan Zhang
2011-05-24 11:47:50 UTC
> Attach a nfs volume to a VM, and block the connection of the nfs by using
> iptables, to destroy the VM will cause libvirt hang up.
This is expected behaviour with NFS by default. NFS mounts default to using the 'hard' flag. This means that if the NFS server goes away (eg due to network connectivity lost / blocked), the client will retry indefinitely. The application (like libvirt) does not have any say in this matter, the kernel retries forever and the system won't ever return an error to userspace.
If the NFS mount uses 'soft' flag, then the kernel will timeout after N retries (controlled by the retrans mount flag), and return an error to userspace.
When you kill a guest with libvirt, one of the things it has todo is restore security labelling. THis obviously involves I/O operations, so if the NFS server is blocked/dead and 'hard' mount option is set, then libvirtd will "hang" until the NFS server recovers. If you mount with 'soft', then libvirt shouldn't "hang", but introduces some risk to data integrity.
|