Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-7923

Rework the smoke tester to the techproducts example using bin/solr script to do all the work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.3
    • scripts and tools
    • None

    Description

      In the following run of the smokeTester, notice that the create_core command failed, but the tester still passed.

      Crawl/parse...
      
      Verify...
          test solr example w/ Java 8...
            start Solr instance (log=/home/shalin/work/oss/smoke-5.3.0/unpack/solr-5.3.0/solr-example.log)...
      No process found for Solr node running on port 8983
            starting Solr on port 8983 from /home/shalin/work/oss/smoke-5.3.0/unpack/solr-5.3.0
            startup done
      
      Creating new core 'techproducts' using command:
      http://localhost:8983/solr/admin/cores?action=CREATE&name=techproducts&instanceDir=techproducts
      
      
      ERROR: Error CREATEing SolrCore 'techproducts': Unable to create core [techproducts] Caused by: Lock held by this virtual machine: /home/shalin/work/oss/smoke-5.3.0/unpack/solr-5.3.0/solr/server/solr/techproducts/data/index/write.lock
      
            test utf8...
            index example docs...
            run query...
            stop server using: bin/solr stop -p 8983
      Sending stop command to Solr running on port 8983 ... waiting 5 seconds to allow Jetty process 18756 to stop gracefully.
          check NOTICE
      
      Test Maven artifacts for Lucene and Solr...
          get POM templates
      ..........................................................
          download artifacts
      .........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
          verify that each binary artifact has a deployed POM...
          verify that there is an artifact for each POM template...
          verify Maven artifacts' md5/sha1 digests...
          check for javadoc and sources artifacts...
          verify deployed POMs' coordinates...
          verify maven artifact sigs ...................................................................................................................................................................................
          unpack lucene-5.3.0.tgz...
          unpack solr-5.3.0.tgz...
          verify that Maven artifacts are same as in the binary distribution...
          verify JAR metadata/identity/no javax.* or java.* classes...
          verify JAR metadata/identity/no javax.* or java.* classes...
          unpack lucene-5.3.0.tgz...
      
      SUCCESS! [1:22:31.148021]
      

      The Python code needs to be fixed to check the return code of the bin/solr script. Specifically this call needs to check the return code from the subprocess.call invocation:

          subprocess.call(['bin/solr','create_core','-c','techproducts','-d','sample_techproducts_configs'])
      

      I verified that the bin/solr create_core action does return 1 if there's an error:

      [~/dev/lw/projects/lucene_solr_5_3/solr]$ bin/solr create_core -c techproducts
      
      ERROR: 
      Core 'techproducts' already exists!
      Checked core existence using Core API command:
      http://localhost:8983/solr/admin/cores?action=STATUS&core=techproducts
      
      [~/dev/lw/projects/lucene_solr_5_3/solr]$ echo $?
      1
      

      Attachments

        1. SOLR-7923.patch
          3 kB
          Timothy Potter

        Activity

          People

            thelabdude Timothy Potter
            thelabdude Timothy Potter
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: