Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-3430

Always allow declaring and undeclaring a package

    XMLWordPrintable

Details

    • Improvement
    • Status: Won't Fix
    • Resolution: Done
    • None
    • eups
    • None
    • SQuaRE

    Description

      It is possible for eups to get into a state whereby it is impossible to declare, undeclare or setup a package. I'm not sure how I got into this situation, but I think one can reproduce the problem by taking a properly declared package and breaking it by deleting its information in ups_db, e.g. the file ups_db/<package>/<version>.version.

      In this situation eups will refuse to declare, undeclare or setup the package and the error messages explaining what is wrong are too terse, making it difficult to diagnose and fix the problem. Fortunately at least one of commands does produce a message mentioning ups_db.

      It would be ideal if both "eups declare" and "eups undeclare" worked in this situation, e.g. if they were robust enough to manage incomplete existing information. If that was the case then the current message produced by "setup" would probably suffice to suggest a solution, though a bit more information would be nice.

      Attachments

        Issue Links

          Activity

            I can't reproduce this:

            $ eups declare -r ~/sss/goo/1.0 
            Warning: path /Users/rhl/sss/goo/1.0 is absolute, not relative to EUPS_PATH
            $ eups admin info goo
            /Users/lsst/products/ups_db/goo/1.0.version
            $ rm /Users/lsst/products/ups_db/goo/1.0.version 
            $ eups list goo
            eups list: Unable to find product goo
            

            rhl Robert Lupton added a comment - I can't reproduce this: $ eups declare -r ~/sss/goo/1.0 Warning: path /Users/rhl/sss/goo/1.0 is absolute, not relative to EUPS_PATH $ eups admin info goo /Users/lsst/products/ups_db/goo/1.0.version $ rm /Users/lsst/products/ups_db/goo/1.0.version $ eups list goo eups list: Unable to find product goo
            rowen Russell Owen added a comment - - edited

            I agree that my suggested way to reproduce the problem is overly simplistic and doesn't do the job. Here is the log of my attempts when I had the problem (from HipChat August 6 1:18 PM Pacific time):

            localhost$ eups list afwdata -v
              8.0.0.1+17 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/code/testdata/afwdata                    b873 b871 b870 b877 b875 b874 b878 b860 b861 b862 b864 b865 b867 b868 b869
              8.0.0.1+18 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/code/testdata/afwdata                    b879
              8.0.0.1+19 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/code/testdata/afwdata                    b883 b880 b881 b884 b866
              8.0.0.1+20 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/code/testdata/afwdata                
              8.0.0.1+21 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata/8.0.0.1+21    b888
              8.0.0.1+22 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata/8.0.0.1+22    b889
              8.0.0.1+23 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata/8.0.0.1+23    b891 b890
              8.0.0.1+24 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata/8.0.0.1+24    b892
              8.0.0.1+25 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata/8.0.0.1+25    b893
              git        /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/code/testdata/afwdata                
            localhost$ setup afwdata  8.0.0.1+25
            Failed to setup afwdata 8.0.0.1+25: Product afwdata 8.0.0.1+25 not found
            localhost$ eups undeclare afwdata  8.0.0.1+25
            eups undeclare: Product afwdata 8.0.0.1+25 for DarwinX86 not found in /Users/rowen/LSST/lsstsw/stack/ups_db
            localhost$ ls /Users/rowen/LSST/lsstsw/stack/ups_db/afwdata
            8.0.0.1+17.version  8.0.0.1+19.version  b861.chain      b864.chain      b866.chain      b886.chain
            8.0.0.1+18.version  b860.chain      b862.chain      b865.chain      b879.chain      git.version
            localhost$ ls -l /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata
            total 72
            lrwxr-xr-x  1 rowen  staff  39 May  1 12:06 8.0.0.1+17 -> /Users/rowen/LSST/code/testdata/afwdata
            lrwxr-xr-x  1 rowen  staff  39 Jul 20 13:22 8.0.0.1+18 -> /Users/rowen/LSST/code/testdata/afwdata
            lrwxr-xr-x  1 rowen  staff  39 May  1 12:05 8.0.0.1+19 -> /Users/rowen/LSST/code/testdata/afwdata
            lrwxr-xr-x  1 rowen  staff  39 Aug  6 11:38 8.0.0.1+20 -> /Users/rowen/LSST/code/testdata/afwdata
            lrwxr-xr-x  1 rowen  staff  39 Jul 20 13:20 8.0.0.1+21 -> /Users/rowen/LSST/code/testdata/afwdata
            lrwxr-xr-x  1 rowen  staff  39 Jul 20 13:20 8.0.0.1+22 -> /Users/rowen/LSST/code/testdata/afwdata
            lrwxr-xr-x  1 rowen  staff  39 Jul 20 13:20 8.0.0.1+23 -> /Users/rowen/LSST/code/testdata/afwdata
            lrwxr-xr-x  1 rowen  staff  39 Aug  6 11:38 8.0.0.1+24 -> /Users/rowen/LSST/code/testdata/afwdata
            lrwxr-xr-x  1 rowen  staff  39 Aug  6 13:16 8.0.0.1+25 -> /Users/rowen/LSST/code/testdata/afwdata
            localhost$ eups declare -r /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata/8.0.0.1+25 afwdata 8.0.0.1+25
            localhost$ setup afwdata 8.0.0.1+25 
            Failed to setup afwdata 8.0.0.1+25: Product afwdata 8.0.0.1+25 not found
            localhost$ eups undeclare afwdata  8.0.0.1+25 --force
            eups undeclare: Product afwdata 8.0.0.1+25 for DarwinX86 not found in /Users/rowen/LSST/lsstsw/stack/ups_db
            localhost$ eups list afwdata
              8.0.0.1+17  b873 b871 b870 b877 b875 b874 b878 b860 b861 b862 b864 b865 b867 b868 b869
              8.0.0.1+18  b879
              8.0.0.1+19  b883 b880 b881 b884 b866
              8.0.0.1+20 
              8.0.0.1+21  b888
              8.0.0.1+22  b889
              8.0.0.1+23  b891 b890
              8.0.0.1+24  b892
              8.0.0.1+25  b893
              git        
            

            What started the whole mess is a failed lsstsw "rebuild" command, where the error message made me realize that the package was missing from /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata. I always use a symlink to avoid having multiple copies of afwdata, so I made the symlink manually. At that point I was left in the state shown above. In particular:

            • "eups list" showed the product
            • I could not setup the product, and the error message was too vague to be helpful
            • I could not undeclare the product, but the error message as a bit more helpful, since it mentioned ups_db
            • I could declare the product without an error message, but it didn't work, since it left things in exactly the same state (though that is not shown above)
            • I tried logging out and logging in again and it changed nothing

            What finally worked was to create the missing .../ups_db/afwdata/ version file. I copied an existing file and edited it until eups was happy.

            rowen Russell Owen added a comment - - edited I agree that my suggested way to reproduce the problem is overly simplistic and doesn't do the job. Here is the log of my attempts when I had the problem (from HipChat August 6 1:18 PM Pacific time): localhost$ eups list afwdata -v 8.0.0.1+17 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/code/testdata/afwdata b873 b871 b870 b877 b875 b874 b878 b860 b861 b862 b864 b865 b867 b868 b869 8.0.0.1+18 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/code/testdata/afwdata b879 8.0.0.1+19 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/code/testdata/afwdata b883 b880 b881 b884 b866 8.0.0.1+20 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/code/testdata/afwdata 8.0.0.1+21 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata/8.0.0.1+21 b888 8.0.0.1+22 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata/8.0.0.1+22 b889 8.0.0.1+23 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata/8.0.0.1+23 b891 b890 8.0.0.1+24 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata/8.0.0.1+24 b892 8.0.0.1+25 /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata/8.0.0.1+25 b893 git /Users/rowen/LSST/lsstsw/stack /Users/rowen/LSST/code/testdata/afwdata localhost$ setup afwdata 8.0.0.1+25 Failed to setup afwdata 8.0.0.1+25: Product afwdata 8.0.0.1+25 not found localhost$ eups undeclare afwdata 8.0.0.1+25 eups undeclare: Product afwdata 8.0.0.1+25 for DarwinX86 not found in /Users/rowen/LSST/lsstsw/stack/ups_db localhost$ ls /Users/rowen/LSST/lsstsw/stack/ups_db/afwdata 8.0.0.1+17.version 8.0.0.1+19.version b861.chain b864.chain b866.chain b886.chain 8.0.0.1+18.version b860.chain b862.chain b865.chain b879.chain git.version localhost$ ls -l /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata total 72 lrwxr-xr-x 1 rowen staff 39 May 1 12:06 8.0.0.1+17 -> /Users/rowen/LSST/code/testdata/afwdata lrwxr-xr-x 1 rowen staff 39 Jul 20 13:22 8.0.0.1+18 -> /Users/rowen/LSST/code/testdata/afwdata lrwxr-xr-x 1 rowen staff 39 May 1 12:05 8.0.0.1+19 -> /Users/rowen/LSST/code/testdata/afwdata lrwxr-xr-x 1 rowen staff 39 Aug 6 11:38 8.0.0.1+20 -> /Users/rowen/LSST/code/testdata/afwdata lrwxr-xr-x 1 rowen staff 39 Jul 20 13:20 8.0.0.1+21 -> /Users/rowen/LSST/code/testdata/afwdata lrwxr-xr-x 1 rowen staff 39 Jul 20 13:20 8.0.0.1+22 -> /Users/rowen/LSST/code/testdata/afwdata lrwxr-xr-x 1 rowen staff 39 Jul 20 13:20 8.0.0.1+23 -> /Users/rowen/LSST/code/testdata/afwdata lrwxr-xr-x 1 rowen staff 39 Aug 6 11:38 8.0.0.1+24 -> /Users/rowen/LSST/code/testdata/afwdata lrwxr-xr-x 1 rowen staff 39 Aug 6 13:16 8.0.0.1+25 -> /Users/rowen/LSST/code/testdata/afwdata localhost$ eups declare -r /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata/8.0.0.1+25 afwdata 8.0.0.1+25 localhost$ setup afwdata 8.0.0.1+25 Failed to setup afwdata 8.0.0.1+25: Product afwdata 8.0.0.1+25 not found localhost$ eups undeclare afwdata 8.0.0.1+25 --force eups undeclare: Product afwdata 8.0.0.1+25 for DarwinX86 not found in /Users/rowen/LSST/lsstsw/stack/ups_db localhost$ eups list afwdata 8.0.0.1+17 b873 b871 b870 b877 b875 b874 b878 b860 b861 b862 b864 b865 b867 b868 b869 8.0.0.1+18 b879 8.0.0.1+19 b883 b880 b881 b884 b866 8.0.0.1+20 8.0.0.1+21 b888 8.0.0.1+22 b889 8.0.0.1+23 b891 b890 8.0.0.1+24 b892 8.0.0.1+25 b893 git What started the whole mess is a failed lsstsw "rebuild" command, where the error message made me realize that the package was missing from /Users/rowen/LSST/lsstsw/stack/DarwinX86/afwdata. I always use a symlink to avoid having multiple copies of afwdata, so I made the symlink manually. At that point I was left in the state shown above. In particular: "eups list" showed the product I could not setup the product, and the error message was too vague to be helpful I could not undeclare the product, but the error message as a bit more helpful, since it mentioned ups_db I could declare the product without an error message, but it didn't work, since it left things in exactly the same state (though that is not shown above) I tried logging out and logging in again and it changed nothing What finally worked was to create the missing .../ups_db/afwdata/ version file. I copied an existing file and edited it until eups was happy.

            This will never be fixed and clearly we are working with it. 

            womullan Wil O'Mullane added a comment - This will never be fixed and clearly we are working with it. 

            People

              Unassigned Unassigned
              rowen Russell Owen
              Kian-Tat Lim, Robert Lupton, Russell Owen, Wil O'Mullane
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.