Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: [perl2-111.dev.rhcloud.com run]\> echo > httpd.pid [perl2-111.dev.rhcloud.com run]\> gear restart Cart to restart? 1. perl-5.10 ? 1 (20014)Internal error: Error retrieving pid file run/httpd.pid Remove it before continuing if it is corrupted. An error occurred executing 'gear restart' (exit code: 1) Error message: Failed to execute: 'control restart' for /var/lib/openshift/199053622136432112959488/perl For more details about the problem, try running the command again with the '--trace' option. Version-Release number of selected component (if applicable): int(devenv_3586) devenv_3588 How reproducible: Always Steps to Reproduce: 1. rhc app create perl2 perl-5.10 2. cd /var/lib/openshift/<uuid>/perl/run 3. echo > httpd.pid 4. gear start 5. echo > httpd.pid 6. gear restart Actual results: always got error when gear restart, but it is ok with gear start Expected results: both gear start and gear restart can works normally.
The issue can be reproduced for ruby app: restarting Ruby cart (20014)Internal error: Error retrieving pid file run/httpd.pid Remove it before continuing if it is corrupted. An error occurred executing 'gear restart' (exit code: 1) Error message: Failed to execute: 'control restart' for /var/lib/openshift/51f8c7266cec0e1cbc0000ba/ruby /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.12.5/lib/openshift-origin-node/model/v2_cart_model.rb:1121:in `block in do_control_with_directory' /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.12.5/lib/openshift-origin-node/model/v2_cart_model.rb:931:in `process_cartridges' /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.12.5/lib/openshift-origin-node/model/v2_cart_model.rb:1090:in `do_control_with_directory' /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.12.5/lib/openshift-origin-node/model/v2_cart_model.rb:953:in `do_control' /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.12.5/lib/openshift-origin-node/model/v2_cart_model.rb:1294:in `start_cartridge' /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.12.5/lib/openshift-origin-node/model/application_container_ext/cartridge_actions.rb:408:in `restart' /usr/bin/gear:257:in `block (3 levels) in <main>' /usr/bin/gear:86:in `do_command' /usr/bin/gear:255:in `block (2 levels) in <main>' /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:180:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:180:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:155:in `run' /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/runner.rb:385:in `run_active_command' /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/runner.rb:74:in `run!' /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/delegates.rb:11:in `run!' /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/import.rb:10:in `block in <top (required)>'
Hi Meng, I have fix for the Ruby cartridge, will sent a pull request soon.
Fix for the Ruby cartridge: https://github.com/openshift/origin-server/pull/3341
Just an quick update, I updated the pull request with fix for other HTTPD based cartridges. I manually tested for ruby and php and it seems to work as expected.
verified on INT(devenv_3680). still got error when gear restart with php-5.3 cartridge. but it is ok with ruby-1.8, perl-5.10 cartridges. [php1-11.int.rhcloud.com run]\> echo >httpd.pid [php1-11.int.rhcloud.com run]\> gear restart Cart to restart? 1. php-5.3 ? 1 Restarting PHP cartridge /var/lib/openshift/52142b996cec0e676a00002f/php/bin/control: line 18: ensure_httpd_restart_action: command not found An error occurred executing 'gear restart' (exit code: 127) Error message: Failed to execute: 'control restart' for /var/lib/openshift/52142b996cec0e676a00002f/php For more details about the problem, try running the command again with the '--trace' option. [r18n-111.dev.rhcloud.com run]\> gear restart Cart to restart? 1. ruby-1.8 ? 1 restarting Ruby cart [perl1-11.int.rhcloud.com run]\> gear restart Cart to restart? 1. perl-5.10 ? 1 Restarting Perl cartridge
This pull should fix the problem: https://github.com/openshift/origin-server/pull/3424
test on devenv_3706, test OK with ruby-1.8 , php-5.3 , perl-5.10 cartridges. [php1-111.dev.rhcloud.com run]\> gear restart Cart to restart? 1. php-5.3 ? 1 Restarting PHP cartridge move the bug to verified.