Bug 1290257 - Anaconda generates invalid fstab for atomic host: mounting on top of symlinks not allowed
Anaconda generates invalid fstab for atomic host: mounting on top of symlinks...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-09 18:14 EST by Dusty Mabe
Modified: 2015-12-11 18:49 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-11 18:49:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Script to recreate issue. (1.80 KB, application/x-shellscript)
2015-12-09 18:14 EST, Dusty Mabe
no flags Details

  None (edit)
Description Dusty Mabe 2015-12-09 18:14:52 EST
Created attachment 1104184 [details]
Script to recreate issue.

Description of problem:

If I run through an install of the Atomic ISO installer [1] I allowed for auto partitioning and it gave me a /home LV and subsequently put it into the fstab. This results in a system that fails to boot (dropping into dracut emergency shell). This is because /home fails to mount because in atomic /home -> /var/home

```
Dec 09 17:16:40 localhost.localdomain systemd[1]: home.mount: Mount on symlink /home not allowed.
Dec 09 17:16:40 localhost.localdomain systemd[1]: home.mount: Failed to run 'mount' task: Too many levels of symbolic links
Dec 09 17:16:40 localhost.localdomain systemd[1]: Failed to mount /home.
Dec 09 17:16:40 localhost.localdomain systemd[1]: Dependency failed for Local File Systems.
Dec 09 17:16:40 localhost.localdomain systemd[1]: Dependency failed for Mark the need to relabel after reboot.
Dec 09 17:16:40 localhost.localdomain systemd[1]: fedora-autorelabel-mark.service: Job fedora-autorelabel-mark.service/start failed with result 'dependency'.
Dec 09 17:16:40 localhost.localdomain systemd[1]: Dependency failed for Relabel all filesystems, if necessary.
Dec 09 17:16:40 localhost.localdomain systemd[1]: fedora-autorelabel.service: Job fedora-autorelabel.service/start failed with result 'dependency'.
Dec 09 17:16:40 localhost.localdomain systemd[1]: local-fs.target: Job local-fs.target/start failed with result 'dependency'.
Dec 09 17:16:40 localhost.localdomain systemd[1]: local-fs.target: Triggering OnFailure= dependencies.
Dec 09 17:16:40 localhost.localdomain systemd[1]: home.mount: Unit entered failed state.
```

This fails because systemd refuses to mount over a symlink [2].

It was suggested that Anaconda need to be made aware of this and create an fstab that is compliant. 

[1] https://download.fedoraproject.org/pub/fedora/linux/releases/23/Cloud_Atomic/x86_64/iso/Fedora-Cloud_Atomic-x86_64-23.iso
[2] https://github.com/systemd/systemd/commit/5261ba901845c084de5a8fd06500ed09bfb0bd80

Version-Release number of selected component (if applicable):
https://download.fedoraproject.org/pub/fedora/linux/releases/23/Cloud_Atomic/x86_64/iso/Fedora-Cloud_Atomic-x86_64-23.iso

How reproducible:
Always


Steps to Reproduce:
Reproduce with attached script that contains embedded kickstart.
Comment 1 Dusty Mabe 2015-12-09 18:15:35 EST
To work around type in password at emergency shell and replace `/home` in /etc/fstab with `/var/home`.
Comment 2 Radek Vykydal 2015-12-10 05:22:17 EST
IIRC, default partitioning for Atomic should not create separate /home [1]. For some reason Atomic installclass with the partitioning fails to be imported when installing from the iso (/tmp/anaconda.log):

09:54:54,858 WARN anaconda: module import of installclass_atomic failed: <class 'ImportError'>
09:54:54,862 WARN anaconda: module import of installclass_atomic failed: <class 'ImportError'>
09:54:54,862 INFO anaconda: Fedora is the highest priority installclass, using it

So first I'd try to debug why it fails.

Does having separate /home for Atomic installations make sense?
Should Anaconda really be aware that Atomic (rpmostreepayload install) is actually linking /home to /var/home? Or deal with this situation (mount points being symlinks) genrally? 

[1] seems so: https://github.com/projectatomic/fedora-productimg-atomic/blob/master/installclass_atomic.py
Comment 3 Radek Vykydal 2015-12-10 07:05:52 EST
(In reply to Radek Vykydal from comment #2)
> IIRC, default partitioning for Atomic should not create separate /home [1].
> For some reason Atomic installclass with the partitioning fails to be
> imported when installing from the iso (/tmp/anaconda.log):
> 
> 09:54:54,858 WARN anaconda: module import of installclass_atomic failed:
> <class 'ImportError'>
> 09:54:54,862 WARN anaconda: module import of installclass_atomic failed:
> <class 'ImportError'>
> 09:54:54,862 INFO anaconda: Fedora is the highest priority installclass,
> using it
> 
> So first I'd try to debug why it fails.

Couple of quick fixes, updating installclass to F23 anaconda/blivet:
https://github.com/projectatomic/fedora-productimg-atomic/pull/2
Comment 4 Radek Vykydal 2015-12-10 08:32:49 EST
(In reply to Radek Vykydal from comment #3)
 
> Couple of quick fixes, updating installclass to F23 anaconda/blivet:
> https://github.com/projectatomic/fedora-productimg-atomic/pull/2

updates image with the fix can be checked by adding
updates=https://rvykydal.fedorapeople.org/updates.atomic_instclass.img
boot option
Comment 5 Fedora Update System 2015-12-10 11:17:42 EST
fedora-productimg-atomic-23-6.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-1b6b8653f0
Comment 6 Colin Walters 2015-12-10 12:30:58 EST
Thanks for the fix Radek!
Comment 7 Fedora Update System 2015-12-11 01:00:13 EST
fedora-productimg-atomic-23-6.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update fedora-productimg-atomic'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-1b6b8653f0
Comment 8 Joe Brockmeier 2015-12-11 15:45:51 EST
Also tested and seems to solve the problem. Thanks Radek!
Comment 9 Fedora Update System 2015-12-11 18:49:33 EST
fedora-productimg-atomic-23-6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.