Bug 1014793 - OpenShift SDK needs new function to wait for PID file on F19, Apache 2.4
Summary: OpenShift SDK needs new function to wait for PID file on F19, Apache 2.4
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Michal Fojtik
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-02 19:40 UTC by Krishna Raman
Modified: 2015-05-15 02:21 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-24 03:33:07 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Krishna Raman 2013-10-02 19:40:09 UTC
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.

Comment 1 Jhon Honce 2013-10-02 20:35:27 UTC
This has the potential to impact all httpd based cartridges.

Comment 2 Michal Fojtik 2013-11-12 12:39:57 UTC
Pull request:

https://github.com/openshift/origin-server/pull/4168

Comment 3 openshift-github-bot 2013-11-12 22:01:58 UTC
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

Comment 4 openshift-github-bot 2013-11-12 22:01:59 UTC
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.

Comment 5 Meng Bo 2013-11-28 05:53:01 UTC
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


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