Skip to content
This repository was archived by the owner on Jul 25, 2018. It is now read-only.

httpd-default restart at every chef-client run #127

@pdion891

Description

@pdion891

Cookbook version

httpd (0.6.1)

Chef-client version

12.21.31

Platform Details

CentOS 7.4 using kitchen-cloudstack

Scenario:

When using the default deployement scenario:

httpd_service 'default' do
  action [:create, :start]
end

httpd_config 'default' do
  source 'mysite.cnf.erb'
  notifies :restart, 'httpd_service[default]'
  action :create
end

The service 'httpd-default' is restarted at every chef-client run.

Steps to Reproduce:

Everytime chef-client is executed using kitchen converge on CentOS 7 the service httpd-default is restarted.

[root@VM-2cbead58-53f3-46d0-a93a-7721f19259c0 cca-user]# systemctl status httpd-default
● httpd-default.service - The Apache HTTP Server
   Loaded: loaded (/etc/systemd/system/httpd-default.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2018-01-06 13:26:29 EST; 1min 49s ago
 Main PID: 9303 (httpd-default)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd-default.service
           ├─9303 /usr/sbin/httpd-default -f /etc/httpd-default/conf/httpd.conf -DFOREGROUND
           ├─9304 /usr/sbin/httpd-default -f /etc/httpd-default/conf/httpd.conf -DFOREGROUND
           ├─9305 /usr/sbin/httpd-default -f /etc/httpd-default/conf/httpd.conf -DFOREGROUND
           └─9306 /usr/sbin/httpd-default -f /etc/httpd-default/conf/httpd.conf -DFOREGROUND

1min 49s ago

to test the behavior, download a large file from apache, then run chef-client or kitchen converge then the download fail because of the restart of httpd.

Expected Result:

When there is not configuration change as this example, the service should not be restart automatically or event reload.
If 'reload' is specified in httpd_config then the service should be reload, not restart.

Actual Result:

This service restart kill all existing connections to httpd.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions