Uploaded image for project: 'Puppet Server'
  1. Puppet Server
  2. SERVER-1193

Consume stdin in ruby-autosign-executable-false test script

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: SERVER 2.3.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Sub-team:
    • Story Points:
      1
    • Sprint:
      Server Emerald 2016-03-09

      Description

      The ruby-autosign-executable-false script, used by the handle-put-certificate-request!-test, needs to consume all stdin now because of a race condition between the use of JDK 8 and the new shellutils library that the CA uses to launch autosign executables, per the changes integrated in SERVER-1094. Not consuming all of stdin otherwise can cause the test to fail periodically with error output like the following:

      lein test :only puppetlabs.services.ca.certificate-authority-core-test/handle-put-certificate-request!-test
       
      ERROR in (handle-put-certificate-request!-test) (ShellUtils.java:96)
      Uncaught exception, not in assertion.
      expected: nil
        actual: java.lang.IllegalStateException: Exception while executing '/home/travis/build/puppetlabs/puppet-server/./dev-resources/puppetlabs/services/ca/certificate_authority_core_test/autosign/ruby-autosign-executable-false': Stream closed
       at com.puppetlabs.puppetserver.ShellUtils.executeCommand (ShellUtils.java:96)
          com.puppetlabs.puppetserver.ShellUtils.executeCommand (ShellUtils.java:158)
          puppetlabs.puppetserver.shell_utils$eval20050$execute_command_streamed__20059$fn__20062.invoke (shell_utils.clj:75)
          puppetlabs.puppetserver.shell_utils$eval20050$execute_command_streamed__20059.invoke (shell_utils.clj:64)
          puppetlabs.puppetserver.shell_utils$eval20092$execute_command__20101$fn__20104.invoke (shell_utils.clj:94)
          puppetlabs.puppetserver.shell_utils$eval20092$execute_command__20101.invoke (shell_utils.clj:85)
        puppetlabs.puppetserver.certificate_authority$eval21015$execute_autosign_command_BANG___21020$fn__21021.invoke (certificate_authority.clj:758)
          puppetlabs.puppetserver.certificate_authority$eval21015$execute_autosign_command_BANG___21020.invoke (certificate_authority.clj:739)
          puppetlabs.puppetserver.certificate_authority$eval21148$autosign_csr_QMARK___21153$fn__21154.invoke (certificate_authority.clj:825)
          puppetlabs.puppetserver.certificate_authority$eval21148$autosign_csr_QMARK___21153.invoke (certificate_authority.clj:813)
          puppetlabs.puppetserver.certificate_authority$eval21340$process_csr_submission_BANG___21345$fn__21349.invoke (certificate_authority.clj:949)
          puppetlabs.puppetserver.certificate_authority$eval21340$process_csr_submission_BANG___21345.invoke (certificate_authority.clj:934)
        puppetlabs.services.ca.certificate_authority_core$eval32213$handle_put_certificate_request_BANG___32218$fn__32219.invoke (certificate_authority_core.clj:49)
          puppetlabs.services.ca.certificate_authority_core$eval32213$handle_put_certificate_request_BANG___32218.invoke (certificate_authority_core.clj:44)
      puppetlabs.services.ca.certificate_authority_core_test$fn__32455$fn__32458$fn__32459$fn__32462$fn__32511$fn__32516.invoke (certificate_authority_core_test.clj:159)
          puppetlabs.services.ca.certificate_authority_core_test$fn__32455$fn__32458$fn__32459$fn__32462$fn__32511.invoke (certificate_authority_core_test.clj:155)
          puppetlabs.services.ca.certificate_authority_core_test$fn__32455$fn__32458$fn__32459$fn__32462.invoke (certificate_authority_core_test.clj:147)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jeremy.barlow Jeremy Barlow
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support