Uploaded image for project: 'Service Design and Creation'
  1. Service Design and Creation
  2. SDC-249

Temporary files and directories not completely removed during execution

XMLWordPrintable

    • SDC Sprint 9

      Whilst using SDC-TOSCA and ultimately TOSCA in our project we discovered that TOSCA decompresses  csar files to the temp directory.  When finished the code makes a call to delete the decompressed folder and its contents.

      During testing we discovered that the decompressed folders were still in the temp directory after processing was complete.  These folders can be identified because they all start with 'JTP' as the name of the folder.

      The decompressed folder it contains the Definitions folder and all the yml files that had been decompressed.

      It turns out that in TOSCA there are 6 instances where a new FileInputStream is created but not closed.  As a result file handles on the yml files are still open and the files cannot be deleted.

      The usages of FileInputStream are found in:

      org.openecomp.sdc.toscaparser.api.ImportsLoader (1 occurrence)

      org.openecomp.sdc.toscaparser.api.ToscaTemplate (1 occurrence)

      org.openecomp.sdc.toscaparser.api.elements.EntityType (1 occurrence)

      org.openecomp.sdc.toscaparser.api.extensions.ExtTools (1 occurrence)

      org.openecomp.sdc.toscaparser.api.prereq.CSAR (2 occurrences)

      Over time the temp folder could eventually fill up and processing of further CSARs would not be possible.

       

            priyanshua priyanshua
            seamussinghamd seamussinghamd
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 3 days
                3d
                Remaining:
                Remaining Estimate - 3 days
                3d
                Logged:
                Time Spent - Not Specified
                Not Specified