Bug 1298355
Summary: | kickstart stuck at "Reached Target Shutdown" stage when removing media before shutdown completes | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | jcastran | |
Component: | systemd | Assignee: | systemd-maint | |
Status: | CLOSED ERRATA | QA Contact: | Branislav Blaškovič <bblaskov> | |
Severity: | high | Docs Contact: | ||
Priority: | urgent | |||
Version: | 7.2 | CC: | bblaskov, fkrska, h.teunis, jcastran, jkoduvathra, jruemker, kwalker, mrichter, mschena, rsawhill, systemd-maint-list, systemd-maint, thierry.laurion, vagrawal, yann.lopez | |
Target Milestone: | rc | Keywords: | ZStream | |
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | systemd-219-31.el7 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1421712 (view as bug list) | Environment: | ||
Last Closed: | 2017-08-01 09:09:52 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1383699, 1421712 |
Description
jcastran
2016-01-13 21:39:04 UTC
Customer Comment/Request: Hello, As discussed, we have been using the procedure of disconnecting the DVD image before reboot in RHEL5/6 and even in RHEL7.1. If we cannot get the same procedure working in RHEL7.2 we will have to make lot of changes in build process and the standards followed in VM creation. If it's a matter of very limited number of servers workaround's are fine. But when it comes to huge number of servers and changing process and procedures followed by different team, it makes it very complicated. What I am requesting is to find what behavior is changed from RHEL7.1 to 7.2 and is that a customizable parameter ? Thanks. Joseph Koduvathra (1/22/2016 4:42 PM) I have exactly the same problem. VM Shutdown and Reboot stop at: [ OK ] Stopped Remount Root and Kernel Filesystems. Stopping Remount Root and Kernel Filesystems... [ OK ] Reached Target Shutdown However there is no DVD or any other media involved, thus it does not depend just on media removal as reported above. After the last message the VM hangs and fails to shutdown or reboot requiring manual intervention. This should be considered a "blocking" bug as it impacts essential server automation. After further investigation I found that: - systemd hangs on shutdown/reboot when there is a tmpfs filesystem. - By removing every tmpfs filesystem it no longer hangs. This is because systemd runs swapoff (remove all swaps) before tmpfs are unmounted and this causes the system to hang. A fix is available in systemd 229: https://github.com/systemd/systemd/issues/1902 Swap units are deactivated too early This is linked to Bug 1031158 As this affects system operations and availability (remote VMs hang when rebooted and require manual intervention) I recommend to raise the priority to HIGH. Can someone confirm if a fix is available yet ? how is RHEL7.3 ? Unfortunately I am not allowed to open github at my workplace. qa acking for 7.4 (In reply to Branislav Blaškovič from comment #11) > qa acking for 7.4 Thank you. I believe the same bug happens for Atomic Hosts after prelonged time of running Docker containers. fix merged to upstream staging branch -> https://github.com/lnykryn/systemd-rhel/commit/4fec67c88f7ddd02fecf711996f42ed4c9d24da6 https://github.com/lnykryn/systemd-rhel/commit/81c1781b3d148fb3853af8cc72bb403846a2b7ed -> post The change proposed in Comment 14, although necessary, does not resolve the problem (already tried). The issue occurs whether there is a tmpfs mounted or not. Having a tmpfs mounted only exacerbates the problem because the system runs out of physical memory earlier and consistently when the swap is turned off, for example on a Virtual Machine that has a small amount of "physical" memory allocated. The issue occurs because during the shutdown/reboot process systemd calls swapoff that attempts to remove every swap device. If there isn't sufficient physical memory to hold what was being held in the swap area, then the system hangs indefinitely. In previous RedHat versions (up to 6) swapoff was never called during shutdown/reboot. I wonder what has changed in RHEL 7 that now requires a swapoff. Couldn't we just do without and solve the problem? After all it should not be necessary to "remove" memory to shutdown a system. > In previous RedHat versions (up to 6) swapoff was never called during > shutdown/reboot. > I don't think that is true: https://github.com/fedora-sysv/initscripts/blob/rhel6-branch/rc.d/init.d/halt#L117 That is "halt" Nevertheless. Is it necessary to call swapoff? And why? It should be safe to halt the system without calling swapoff. For example you can use a swap file instead of partition. Then you need to call swapoff first otherwise you won't be able to unmount the partition, where the swap file is stored. *** Bug 1379268 has been marked as a duplicate of this bug. *** Still not fixed. https://bugzilla.redhat.com/show_bug.cgi?id=1379268 marked falsely as a duplicate. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:2297 |