Hide Forgot
Description of problem: Apache 2.4 on F19 does a DNS lookup when it is started and doesn't create a PID file till after DNS lookup is complete. This causes potential race condition in tests/scripts. Version-Release number of selected component (if applicable): Fedora 19, OpenShift Origin (from master) How reproducible: Always Steps to Reproduce: 1. Build F19 Origin image without [1] commit 2. Create a PHP/httpd based app 3. Run runtime-cartridge-php.feature testcase Actual results: Test fails on "And the php file permissions are correct" step because PID file has not been created. Expected results: Test passes Additional info: [1] https://github.com/kraman/origin-server/commit/c55ad9931f41de1dea14c9e41876d6eab1e4b080 Per Apache 2.4 docs, the DNS lookup cannot be disabled. They suggest adding DNS name in hosts file but this is not a viable option.
This has the potential to impact all httpd based cartridges.
Pull request: https://github.com/openshift/origin-server/pull/4168
Commit pushed to master at https://github.com/openshift/li https://github.com/openshift/li/commit/1c20de12f708b180ccf8656be92a6e9d9ad68f8c Bug 1014793 - Added 'wait_for_pid_file' function to Bash SDK
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/c076b6ccaba0915656cce8ae01bfe939cb03c87a Bug 1014793 - Added 'wait_for_pid_file' function to Bash SDK This function is used to wait 10 seconds for PID file to be written by Apache process. All Apache based cartridges were updated to use this function.
Test on the latest nightly origin build. Package version: openshift-origin-cartridge-php-1.18.0-1.git.33.caadcbc.fc19.noarch The test can pass. [root@broker cucumber]# cucumber -r /usr/share/gems/gems/openshift-origin-controller-1.18.0/test/cucumber/ runtime-cartridge-php.feature Using RSpec 2 WARNING: Nokogiri was built against LibXML version 2.9.0, but has dynamically loaded 2.9.1 @cartridge1 Feature: V2 SDK PHP Cartridge Scenario Outline: Add cartridge # runtime-cartridge-php.feature:4 Given a new <cart_name> type application # step_definitions/runtime_steps.rb:107 Then the application git repo will exist # step_definitions/runtime_steps.rb:186 And the platform-created default environment variables will exist # step_definitions/runtime_steps.rb:772 And the <cart_name> cartridge private endpoints will be exposed # step_definitions/runtime_steps.rb:852 And the <cart_name> PHP_VERSION env entry will exist # step_definitions/runtime_steps.rb:764 And a httpd process will be running # step_definitions/runtime_steps.rb:336 And the php file permissions are correct # step_definitions/cartridge-php_steps.rb:33 When I destroy the application # step_definitions/runtime_steps.rb:134 Then the application git repo will not exist # step_definitions/runtime_steps.rb:186 Scenarios: Fedora scenarios | cart_name | | php-5.5 | 1 scenario (1 passed) 9 steps (9 passed) 0m4.840s