Bug 328808

Summary: Solid should list an entry for autofs shares, regardless if they are in use or not.
Product: [Unmaintained] solid Reporter: mathieu.beliveau.1
Component: libsolidAssignee: Lukáš Tinkl <lukas>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: matej, mathieu.beliveau.1
Priority: NOR    
Version First Reported In: 4.11.3   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Output of solid-hardware list details when the cifs share is mounted with autofs and is not actively accessed
Output of solid-hardware list details when autofs has been shutdown
Output of solid-hardware list details when the cifs share is mounted with autofs and is actively accessed

Description mathieu.beliveau.1 2013-12-14 18:55:20 UTC
From what I gathered, Solid's current behaviour regarding autofs mounted shares is that: if the share is not currently in use, it will not be listed by Solid regardless if it has been previously mounted and accessed.

Given that some applications (Amarok, Nepomuk, etc.) may keep an index on the content of some autofs mounted folder and rely on Solid to know whether or not this folder refers to a network mounted drive (that might or might not be accessible), the absence of any entry in Solid regarding this location when the share is not being actively accessed will cause those applications to void their index. It follows that when the share will again become available, those applications will need to rebuild their index (which in most case, might be very time consuming).

Once it has detected an autofs mounted share, the correct behaviour for Solid would then be to always keep this share's location in set the StorageAcess.accessible = true/false attribute as appropriate.

Reproducible: Always

Steps to Reproduce:
1. Mount a CIFS share to /somelocation using autofs (with --ghost option)
2. start autofs
3. Access /somelocation (triggering the automount) 
4. Issue: solid-hardware list details in a terminal and confirm that the CIFS entry is indeed listed.
5. stop autofs (and ensure you're not accessing the share's location)
6. Issue: solid-hardware list details in a terminal and confirm that the CIFS entry is NOT listed.
Actual Results:  
When autofs is off, the share is not listed.

Expected Results:  
Solid should always list the share once it's been known to exist and set the  StorageAccess.accessible = true  (bool) attribute as appropriate.

udi = '/org/kde/fstab///192.168.1.150/share/'
  parent = '/org/kde/fstab'  (string)
  vendor = 'share/'  (string)
  product = '192.168.1.150'  (string)
  description = 'share/ on 192.168.1.150'  (string)
  StorageAccess.accessible = true  (bool)
  StorageAccess.filePath = '/home/strav/nas/share'  (string)
  StorageAccess.ignored = false  (bool)
  NetworkShare.type = 'Cifs'  (0x2)  (enum)
  NetworkShare.url = 'smb://192.168.1.150/share/'  (string)
Comment 1 mathieu.beliveau.1 2013-12-14 19:01:47 UTC
Created attachment 84091 [details]
Output of solid-hardware list details when the cifs share is mounted with autofs and is not actively accessed
Comment 2 mathieu.beliveau.1 2013-12-14 19:02:22 UTC
Created attachment 84092 [details]
Output of solid-hardware list details when autofs has been shutdown
Comment 3 mathieu.beliveau.1 2013-12-14 19:02:56 UTC
Created attachment 84093 [details]
Output of solid-hardware list details when the cifs share is mounted with autofs and is actively accessed
Comment 4 mathieu.beliveau.1 2013-12-14 19:04:28 UTC
*** Bug 328543 has been marked as a duplicate of this bug. ***
Comment 5 Jonathan Riddell 2015-03-11 19:04:08 UTC
This bug is reported on libsolid which is the kdelibs4 version of the solid library.  It is now in maintenance mode.  If you think it should still be fixed in the KDE Frameworks 5 version of solid please move it to or report a bug on frameworks-solid.
Comment 6 Andrew Crouthamel 2018-09-04 15:45:06 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I am closing this bug. Please try again with the latest version and submit a new bug to frameworks-solid if your issue persists. Thank you!