Uploaded image for project: 'GPII - Global Public Inclusive Infrastructure'
  1. GPII - Global Public Inclusive Infrastructure
  2. GPII-95

USB User listener not running well under newer versions of udisks

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: USB Listener - Linux
    • Labels:
      None
    • Environment:

      Fedora 18 and openSUSE 12.2

      Description

      In newer versions of udisks, when you plug a USB device you get 2 mountpoints while we're expecting just a one-line output from mount.

      When I plug an USB drive mount's command output:

      /dev/sdb1 on /run/media/jhernandez/New Volume type ext3 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
      /dev/sdb1 on /var/run/media/jhernandez/New Volume type ext3 (rw,nosuid,nodev,relatime,data=ordered)

        Activity

        Hide
        jhernandez Javier Hernández added a comment -

        pull request solving this issue is coming

        cheers!

        Show
        jhernandez Javier Hernández added a comment - pull request solving this issue is coming cheers!
        Hide
        jhernandez Javier Hernández added a comment -

        This bug has been confirmed on Fedora 18 and openSUSE 12.3

        The point is that the use of /media for mounting devices is being deprecated in Linux and they are moving it to /var/run/media (tmpfs). [1]
        AND
        tmpfs is being mounted on /run and /var/run directories, and that's the reason why the 'mount' command now is showing these two mount points for the same device. This behavior produces a bug on the handleUserDeviceEvent.sh script, which does not find the .gpii-user-token.txt filepath in order to trigger the user login process.
        I really don't know if this is a temporary solution on some GNU/Linux distributions and if this situation will stand in the future. You can read more information about it here [2][3]

        I just added a "head -n 1" to the command used when the 'mountLocation' var is being initialized. Here is a pull request of it [4].

        Cheers,
        Javi

        [1]: http://cgit.freedesktop.org/systemd/systemd/commit/?id=231931ffba1bca9d8759bbd6f797e56f8c6971fa
        [2]: http://askubuntu.com/questions/57297/why-has-var-run-been-migrated-to-run
        [3]: http://forums.opensuse.org/english/get-technical-help-here/pre-release-beta/473837-opensuse-factory-warning-announce-upcoming-changes-upstreamsystemd-regarding-media-tmp-var-run-var-lock.html
        [4]: https://github.com/GPII/linux/pull/20

        Show
        jhernandez Javier Hernández added a comment - This bug has been confirmed on Fedora 18 and openSUSE 12.3 The point is that the use of /media for mounting devices is being deprecated in Linux and they are moving it to /var/run/media (tmpfs). [1] AND tmpfs is being mounted on /run and /var/run directories, and that's the reason why the 'mount' command now is showing these two mount points for the same device. This behavior produces a bug on the handleUserDeviceEvent.sh script, which does not find the .gpii-user-token.txt filepath in order to trigger the user login process. I really don't know if this is a temporary solution on some GNU/Linux distributions and if this situation will stand in the future. You can read more information about it here [2] [3] I just added a "head -n 1" to the command used when the 'mountLocation' var is being initialized. Here is a pull request of it [4] . Cheers, Javi [1] : http://cgit.freedesktop.org/systemd/systemd/commit/?id=231931ffba1bca9d8759bbd6f797e56f8c6971fa [2] : http://askubuntu.com/questions/57297/why-has-var-run-been-migrated-to-run [3] : http://forums.opensuse.org/english/get-technical-help-here/pre-release-beta/473837-opensuse-factory-warning-announce-upcoming-changes-upstreamsystemd-regarding-media-tmp-var-run-var-lock.html [4] : https://github.com/GPII/linux/pull/20
        Hide
        sgithens Steven Githens added a comment -

        I've merged this in to master. As noted by Javi, I do think this is a short term fix. At some point we should write some code for dealing with the USB user handlers that doesn't rely on quite so much parsing of shell outputs, since it's brittle and needs a fix everytime they change. ( and it's part of a linux subsystem that does seem to be changing on a regular basis )

        Show
        sgithens Steven Githens added a comment - I've merged this in to master. As noted by Javi, I do think this is a short term fix. At some point we should write some code for dealing with the USB user handlers that doesn't rely on quite so much parsing of shell outputs, since it's brittle and needs a fix everytime they change. ( and it's part of a linux subsystem that does seem to be changing on a regular basis )
        Hide
        kasper Kasper Markus added a comment -

        Closing as these were resolved more than a year ago and haven't been updated since

        Show
        kasper Kasper Markus added a comment - Closing as these were resolved more than a year ago and haven't been updated since

          People

          • Assignee:
            kasper Kasper Markus
            Reporter:
            jhernandez Javier Hernández
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: