Bug 1057976 - Snapshot restore show 'Failed to create logger' for 'ruby/Nodejs' after gear move but without git push
Summary: Snapshot restore show 'Failed to create logger' for 'ruby/Nodejs' after gear ...
Keywords:
Status: CLOSED DUPLICATE of bug 1059429
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Dan Mace
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-26 10:15 UTC by Anping Li
Modified: 2015-05-15 00:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-05 15:59:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Anping Li 2014-01-26 10:15:24 UTC
Description of problem:
Do snapshot save/restore for some cartridge after gears moving. It will show some error message like 'Failed to create logger.....'
If run git push after move, this issue won't be reproduced. 

This problem can be reproduced in Ruby1.9,Nodejs 0.10.

On some builds, such as devenv_4256, and OSE 2.02, The snapshot restore failed , There is one bug 1056394.

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

How reproducible:
Always

Steps to Reproduce:
1.rhc create ry ruby-1.9 or nodejs-0.10
2.move gears between district.
3.rhc snapshot save
4.rhc snapshot restore

Actual results:
Step 4 will show error message like:
[online@dhcp-9-237 ~]$ rhc snapshot restore ry191
Restoring from snapshot ry191.tar.gz...
Removing old git repo: ~/git/ry191.git/
Removing old data dir: ~/app-root/data/*
Restoring ~/git/ry191.git and ~/app-root/data
E, [2014-01-26T03:43:29.127601 #22491] ERROR -- : Failed to create logger; falling back to STDOUT: File exists - /var/log
E, [2014-01-26T03:43:29.128462 #22491] ERROR -- : Failed to create logger; falling back to STDOUT: File exists - /var/log
Activation status: success


Expected results:

No error is show.
Additional info:
Also can be reproduced on devenv_4279

Comment 1 Ben Parees 2014-02-04 22:01:17 UTC
This appears to be happening because the split_trace_logger is being restarted under the context of the gear user which doesn't have the right permissions for touching /var/log/node log files.

not sure yet why it is being restarted in this way.

Comment 2 Ben Parees 2014-02-05 15:59:08 UTC
This is caused by the presence of the empty deployments directory which is being fixed in 1059429

*** This bug has been marked as a duplicate of bug 1059429 ***

Comment 3 Ben Parees 2014-02-05 16:03:05 UTC
(The gory details being that an attempt to process the metadata.json file for the empty deployment ends up throwing a file not found error which results in an attempt to invoke the system logger which tries to write to /var/log, all from within the gear user id context.  Not sure if there's something more we can do to protect against conditions like this as far as invoking the wrong logger)

See deployment_metadata.rb#L65


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