Bug 692326

Summary: readonly-root not working
Product: [Fedora] Fedora Reporter: sfriend
Component: systemdAssignee: Lennart Poettering <lpoetter>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 15CC: johannbg, lpoetter, metherid, mschmidt, notting, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-31 17:55:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 692594    
Bug Blocks:    
Attachments:
Description Flags
More Info and fstab none

Description sfriend 2011-03-31 02:37:55 UTC
In the previous versions of Fedora, setting the READONLY=yes flag in /etc/sysconfig/readonly-root file caused the system to protect the file system drive making it readonly. In fedora 15 alpha it makes tmpfs but does not set the system drive to readonly. 


Fedora 15 Beta

How reproducible:
Edit /etc/sysconfig/readonly-root

Set READONLY=yes
Set TEMPORARY_STATE=yes


  
Actual results:
File system is still writable

Expected results:
File system to be read only

Additional info:
Worked on Fedora 14

Comment 1 Lennart Poettering 2011-03-31 12:30:49 UTC
We apply the options from /etc/fstab on your root fs during boot. Maybe you don't use ro on / in fstab?

Please paste your fstab.

Comment 2 sfriend 2011-03-31 13:14:49 UTC
Created attachment 489072 [details]
More Info and fstab

Attached is fstab, We never used the ro flag for Fedora14 or 11 (same fstab) and they changed  to the file system readonly. 
Setting the ro flag is an acceptable solution , since it was different , we thought it might be a bug.
Thanks

Comment 3 Lennart Poettering 2011-03-31 15:07:00 UTC
So, does it work if you add ro to the flags in fstab?

If so I guess I can close the bug?

Comment 4 sfriend 2011-03-31 15:22:15 UTC
It does work for us, however setting it to ro in fstab breaks other services like samba.

Just wanted to point that it works different from past version.

so if you want to close it , its up to you.
Thanks for your help.

Comment 5 Lennart Poettering 2011-03-31 15:31:51 UTC
(In reply to comment #4)
> It does work for us, however setting it to ro in fstab breaks other services
> like samba.

It does? In which way? Can you elaborate?
 
> Just wanted to point that it works different from past version.

Yupp, it does. We are trying to get rid of duplicate options though and standardize this across distributions. And I think listing "ro" in fstab is the nicest and most natural way to configure this.

Comment 6 sfriend 2011-03-31 15:55:36 UTC
The smb and nmb service don't start because the smb and nmb scripts in /etc/rc.d/init.d are checking to see if /etc/samba/smb.conf is writable.

We got smb starting by adding /etc/samba/smb.conf to rwtab.

Still working on getting nmb running , it fails with following log errors :

[2011/03/31 16:50:38,  0] nmbd/nmbd.c:863(main)
  nmbd version 3.6.0pre1-64pre1.fc15 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2010
[2011/03/31 16:50:38.432996,  0] lib/util_sock.c:876(open_socket_in)
  bind failed on port 137 socket_addr = 192.168.1.14.
  Error = Cannot assign requested address
[2011/03/31 16:50:38.433546,  0] nmbd/nmbd_subnetdb.c:104(make_subnet)
  nmbd_subnetdb:make_subnet()
    Failed to open nmb socket on interface 192.168.1.14 for port 137.  Error was Cannot assign requested address
[2011/03/31 16:50:38.433647,  0] nmbd/nmbd.c:977(main)
  ERROR: Failed when creating subnet lists. Exiting.

Comment 7 Bill Nottingham 2011-03-31 16:05:10 UTC
(In reply to comment #6)
> The smb and nmb service don't start because the smb and nmb scripts in
> /etc/rc.d/init.d are checking to see if /etc/samba/smb.conf is writable.

... That's a bug in that code, not in the readonly root code. I'll file that.

Comment 8 sfriend 2011-03-31 16:20:24 UTC
Do you think our nmb startup problem is a bug?, should I open a new bug ?

Thanks

Comment 9 Lennart Poettering 2011-03-31 17:54:24 UTC
OK, then I guess I can close this?

Comment 10 Lennart Poettering 2011-03-31 17:55:30 UTC
Yes, please file a bug against samba for the "Cannot assign requested address" issue.