Bug 1003969 - Failure to delete non-existent cartridge ERBs during processing should be non-fatal
Summary: Failure to delete non-existent cartridge ERBs during processing should be non...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Dan Mace
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-03 15:14 UTC by Dan Mace
Modified: 2015-05-14 23:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-19 16:48:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dan Mace 2013-09-03 15:14:42 UTC
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:
1.
2.
3.

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 20:14:34 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/ddc4605aec1ee2fadcdd419ea6077207f70851e9
Bug 1003969: Don't raise if processed ERBs no longer exist to delete

Comment 3 Meng Bo 2013-09-04 06:11:52 UTC
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.