Solr
  1. Solr
  2. SOLR-282

snapshooter does not work under solaris

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3
    • Component/s: replication (scripts)
    • Labels:
      None
    • Environment:

      solaris

      Description

      http://www.mail-archive.com/solr-user@lucene.apache.org/msg04761.html

      solr is able to find snapshooter but didn't generate any snapshot files after the index is updated. I checked the
      log, everything looks fine, then I run snapshooter from command line. It failed because Solaris doesn't support
      -l option for cp command. I changed command "cp -lr dir1 dir2" to:

      mkdir dir2
      ln dir1/* dir2

      It seems working. Otis suggested to create an issue so that Bill Au & Co. can fix this problem.
      Please note: several other commands under solr/bin also have this problem. You can use grep "cp -lr" to find all of them
      and make similar changes.

      I'm also curious why there is no error log when solr failed running snapshooter. Shouldn't solr log an error message?

      Thanks
      Xuesong

      1. solr-282.patch
        7 kB
        Bill Au
      2. solr-282-solaris-and-osx.patch
        8 kB
        Bill Au

        Activity

        Hide
        Bill Au added a comment -

        I think I will go with:

        mkdir dir2
        cd dir1
        find . -print|cpio -pdlmuv $

        {full_path_name_to_dir2}

        This works closer to cp -lr in that it will take care of any subdirectory nder dir1. I know Lucene does not put any subdirectory inside the data directory. But you never know what people may but there to take advantage of the snapshot distribution.

        Show
        Bill Au added a comment - I think I will go with: mkdir dir2 cd dir1 find . -print|cpio -pdlmuv $ {full_path_name_to_dir2} This works closer to cp -lr in that it will take care of any subdirectory nder dir1. I know Lucene does not put any subdirectory inside the data directory. But you never know what people may but there to take advantage of the snapshot distribution.
        Hide
        Yonik Seeley added a comment -

        lol... is cpio installed by default an all UNIX systems, and are the args the same?
        Perhaps this should be an alternate codepath for solaris?

        Show
        Yonik Seeley added a comment - lol... is cpio installed by default an all UNIX systems, and are the args the same? Perhaps this should be an alternate codepath for solaris?
        Hide
        Bill Au added a comment -

        Yes, I am thinking it will be an alternate codepath for Solaris only, keeping "cp -l" as the default. With so many different OSes out there I am not sure if we can come up with a single solution to works everywhere. I am not sure we want to spend the time to find it even if it exists. I for one only have access to a handful of OSes.

        Show
        Bill Au added a comment - Yes, I am thinking it will be an alternate codepath for Solaris only, keeping "cp -l" as the default. With so many different OSes out there I am not sure if we can come up with a single solution to works everywhere. I am not sure we want to spend the time to find it even if it exists. I for one only have access to a handful of OSes.
        Hide
        Bill Au added a comment -

        Yes, I am thinking it will be an alternate codepath for Solaris only,
        keeping "cp -l" as the default.
        With so many different OSes out there I am not sure if we can come up with a
        single solution to works everywhere. I am not sure we want to spend the
        time to find it even if it exists. I for one only have access to a handful
        of OSes.

        Bill

        Show
        Bill Au added a comment - Yes, I am thinking it will be an alternate codepath for Solaris only, keeping "cp -l" as the default. With so many different OSes out there I am not sure if we can come up with a single solution to works everywhere. I am not sure we want to spend the time to find it even if it exists. I for one only have access to a handful of OSes. Bill
        Hide
        Bill Au added a comment -

        Attached is a patch for using cpio instead of "cp -l" when the scripts are run on SunOS. While I was at it, I also updated the commit and optimize related scripts to be able to handle both the old and new response format.

        Show
        Bill Au added a comment - Attached is a patch for using cpio instead of "cp -l" when the scripts are run on SunOS. While I was at it, I also updated the commit and optimize related scripts to be able to handle both the old and new response format.
        Hide
        Bill Au added a comment -

        I have tested my patch on the only Solaris box that I have access to. That is running Solaris 8. It will be good if someone with access to a more recent version of Solaris check it out too.

        Show
        Bill Au added a comment - I have tested my patch on the only Solaris box that I have access to. That is running Solaris 8. It will be good if someone with access to a more recent version of Solaris check it out too.
        Hide
        Bill Au added a comment -

        Attached is an updated patch that works for both Solaris and OS X.

        Show
        Bill Au added a comment - Attached is an updated patch that works for both Solaris and OS X.
        Hide
        Bill Au added a comment -

        I have committed the patch.

        Show
        Bill Au added a comment - I have committed the patch.

          People

          • Assignee:
            Bill Au
            Reporter:
            Xuesong Luo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development