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
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.
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 ***
(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