Bug 1003969 - Failure to delete non-existent cartridge ERBs during processing should be non-fatal
Failure to delete non-existent cartridge ERBs during processing should be non...
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Dan Mace
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-09-03 11:14 EDT by Dan Mace
Modified: 2015-05-14 19:27 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-19 12:48:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dan Mace 2013-09-03 11:14:42 EDT
Description of problem:

When rendering ERBs for cartridges (https://github.com/openshift/origin-server/blob/master/node/lib/openshift-origin-node/model/v2_cart_model.rb#L660), a failure to delete the input file due to the file no longer being present (a possible race condition inherent to all File.exists checks) should not raise an exception back up the stack.

Version-Release number of selected component (if applicable):

How reproducible:

Difficult; it's not clear under what circumstances the input is getting deleted following the actual ERB rendering but prior to the explicit delete call, but it happens every release during upgrades for some small portion of gear upgrades.

Steps to Reproduce:

Actual results:

"No such file or directory" exception from File.delete call to the input erb file.

Expected results:

No exception.

Additional info:
Comment 2 openshift-github-bot 2013-09-03 16:14:34 EDT
Commit pushed to master at https://github.com/openshift/origin-server

Bug 1003969: Don't raise if processed ERBs no longer exist to delete
Comment 3 Meng Bo 2013-09-04 02:11:52 EDT
Checked on devenv-stage_461,

Manually delete the erb files from the gear home dir, when the gear dir just being created.

Check the log for the ERB processing. It will skip the Rendering ERB step and will not throw an exception.

For my cartridge, there are 5 erbs in total, and I deleted them manually in the middle of the process.

It will jump to the 'install' step directly.

September 04 02:01:54 INFO Processing ERB templates for php
September 04 02:01:55 INFO Shell command '/sbin/runuser -s /bin/sh 293753520653506126544896 -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c0,c504' /bin/sh -c \"/usr/bin/oo-erb -S 2 -- /var/lib/openshift/293753520653506126544896/php/metadata/jenkins_shell_command.erb > /var/lib/openshift/293753520653506126544896/php/metadata/jenkins_shell_command\""' ran. rc=0 out=
September 04 02:01:55 INFO Running install for 293753520653506126544896/php

Move bug to verified.

Note You need to log in before you can comment on or make changes to this bug.