Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-28402

ShellExecutor must be able to trace the executed command in 10.10

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF29
    • Component/s: Convert

      Description

      The org.nuxeo.ecm.platform.commandline.executor.service.executors.ShellExecutor is used for all convertion and more.
      Today we can have the template command used by activating the debug log:

          <Logger name="org.nuxeo.ecm.platform.commandline.executor.service.executors" level="debug" />
      

      This trace thing like:

      ... Running system command: convert -define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -strip -thumbnail #{size} -background transparent -gravity center -format png -quality 75 #{inputFilePath}[0] #{outputFilePath}
      

      Which is not very interesting in case of hang processing, because a thread dump could give you the code path and the contribution with the same information:

         <command name="resizer" enabled="true">
            <commandLine>convert</commandLine>
            <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -depth #{targetDepth} #{inputFilePath}[0] jpg:- | convert - -resize #{targetWidth}x#{targetHeight} #{outputFilePath}</parameterString> ...
      

      What is needed is the exact executed command.
      ------------------------------------------------------------------------------------
      Now the command parameter values are logged as in this sample output:

      Running system command: convert -define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -background white -flatten -depth #{targetDepth} #{inputFilePath}[0] jpg:- | convert - -resize #{targetWidth}x#{targetHeight} #{outputFilePath} with parameters: java.io.tmpdir=/home/ataillefer/sources/nuxeo/modules/platform/nuxeo-platform-imaging/nuxeo-platform-imaging-core/target/nxruntime-main-16518976727212162978.tmp/tmp, targetHeight=300.0, nuxeo.tmp.dir=/home/ataillefer/sources/nuxeo/modules/platform/nuxeo-platform-imaging/nuxeo-platform-imaging-core/target/nxruntime-main-16518976727212162978.tmp/tmp, inputFilePath=/home/ataillefer/sources/nuxeo/modules/platform/nuxeo-platform-imaging/nuxeo-platform-imaging-core/target/test-classes/images/test.jpg, targetDepth=-2, targetWidth=150.0, outputFilePath=/home/ataillefer/sources/nuxeo/modules/platform/nuxeo-platform-imaging/nuxeo-platform-imaging-core/target/nxruntime-main-16518976727212162978.tmp/tmp/nuxeoImageTarget14126625152522126693.jpg
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h