Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1290257 - Anaconda generates invalid fstab for atomic host: mounting on top of symlinks not allowed
Summary: Anaconda generates invalid fstab for atomic host: mounting on top of symlinks...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-09 23:14 UTC by Dusty Mabe
Modified: 2015-12-11 23:49 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-11 23:49:37 UTC
Type: Bug
Embargoed:


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

Description Dusty Mabe 2015-12-09 23:14:52 UTC
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 23:15:35 UTC
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 10:22:17 UTC
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 12:05:52 UTC
(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 13:32:49 UTC
(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 16:17:42 UTC
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 17:30:58 UTC
Thanks for the fix Radek!

Comment 7 Fedora Update System 2015-12-11 06:00:13 UTC
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 20:45:51 UTC
Also tested and seems to solve the problem. Thanks Radek!

Comment 9 Fedora Update System 2015-12-11 23:49:33 UTC
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.