Project

General

Profile

Actions

Bug #12463

closed

The default settings of foreman-proxy conflict with it's systemd service unit.

Added by brian redbeard over 8 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
RPMs
Target version:
-
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

What:
In configuring system the foreman-proxy service refuses to start. Upon investigation this is due to a conflict in the default settings.yml file and the systemd service unit. In the settings.yml file the default behavior is to run in the foreground while in the systemd service unit the process is specified as forking, utilizing a pid file. Either the settings file for systemd based systems needs to be changed to reflect the intended behavior of the service unit or the service unit needs to be changed to reflect the desired behavior of settings.yml.

Environment:
$ rpm -qi foreman-proxy
Name : foreman-proxy
Version : 1.10.0
Release : 0.1.RC2.fc19
Architecture: noarch
Install Date: Thu 12 Nov 2015 07:54:38 PM UTC
Group : Applications/System
Size : 275684
License : GPLv3+
Signature : RSA/SHA1, Thu 29 Oct 2015 11:51:38 AM UTC, Key ID c1b2621dbe67e9da
Source RPM : foreman-proxy-1.10.0-0.1.RC2.fc19.src.rpm
Build Date : Thu 29 Oct 2015 10:04:29 AM UTC
Build Host : ip-10-91-31-117
Relocations : (not relocatable)
Packager : Koji
Vendor : Koji
URL : http://theforeman.org/projects/smart-proxy
Summary : Restful Proxy for DNS, DHCP, TFTP, PuppetCA and Puppet
Description :
Manages DNS, DHCP, TFTP and puppet settings though HTTP Restful API
Mainly used by the foreman project (http://theforeman.org)

Logs:
Nov 12 22:44:21 provisioner.lab.example.com systemd1: Starting Foreman Proxy...
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: [2015-11-12 22:44:21] INFO WEBrick 1.3.1
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: [2015-11-12 22:44:21] INFO ruby 2.2.3 (2015-08-18) [x86_64-linux]
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: [2015-11-12 22:44:21] INFO
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Certificate:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Data:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Version: 3 (0x2)
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Serial Number: 12 (0xc)
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Signature Algorithm: sha256WithRSAEncryption
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Issuer: O=LAB.EXAMPLE.COM, CN=Certificate Authority
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Validity
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Not Before: Nov 12 20:07:49 2015 GMT
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Not After : Nov 12 20:07:49 2017 GMT
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Subject: O=LAB.EXAMPLE.COM, CN=provisioner.lab.example.com
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Subject Public Key Info:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Public Key Algorithm: rsaEncryption
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Public-Key: (2048 bit)
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Modulus:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: cb:41
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Exponent: 65537 (0x10001)
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: X509v3 extensions:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: X509v3 Authority Key Identifier:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: keyid:94:CE:20:34:9E:6C:33:CC:1E:F0:02:61:0E:BB:F4:B5:F9:95:4E:9D
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Authority Information Access:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: OCSP - URI:http://ipa-ca.lab.example.com/ca/ocsp
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: X509v3 Key Usage: critical
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: X509v3 Extended Key Usage:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: TLS Web Server Authentication, TLS Web Client Authentication
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: X509v3 CRL Distribution Points:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Full Name:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: URI:http://ipa-ca.lab.example.com/ipa/crl/MasterCRL.bin
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: CRL Issuer:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: DirName: O = ipaca, CN = Certificate Authority
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: X509v3 Subject Key Identifier:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: 4D:xx:xx:xx:35:32:BF:29:3C:9F:9B:90:B5:73:D3:9F:2D:72:5A:5F
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: X509v3 Subject Alternative Name:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: DNS:provisioner.lab.example.com, othername:<unsupported>, othername:<unsupported>
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: Signature Algorithm: sha256WithRSAEncryption
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: xx:xx:xx:f4
Nov 12 22:44:21 provisioner.lab.example.com smart-proxy29263: [2015-11-12 22:44:21] INFO WEBrick::HTTPServer#start: pid=29263 port=8443
Nov 12 22:45:51 provisioner.lab.example.com systemd1: foreman-proxy.service: Start operation timed out. Terminating.
Nov 12 22:45:51 provisioner.lab.example.com smart-proxy29263: [2015-11-12 22:45:51] INFO going to shutdown ...
Nov 12 22:45:51 provisioner.lab.example.com smart-proxy29263: [2015-11-12 22:45:51] INFO WEBrick::HTTPServer#start done.
Nov 12 22:45:51 provisioner.lab.example.com systemd1: Failed to start Foreman Proxy.
Nov 12 22:45:51 provisioner.lab.example.com systemd1: foreman-proxy.service: Unit entered failed state.
Nov 12 22:45:51 provisioner.lab.example.com systemd1: foreman-proxy.service: Failed with result 'timeout'.

Test method:
Placing the following systemd drop-in on the host resolves the issue:

$ cat /etc/systemd/system/foreman-proxy.service.d/10-pidfile.conf
[Service]
Type=simple
$ sudo systemctl status foreman-proxy
● foreman-proxy.service - Foreman Proxy
Loaded: loaded (/usr/lib/systemd/system/foreman-proxy.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/foreman-proxy.service.d
└─10-pidfile.conf
Active: active (running) since Thu 2015-11-12 23:50:02 UTC; 44min ago
Main PID: 31274 (ruby-mri)
CGroup: /system.slice/foreman-proxy.service
└─31274 /usr/bin/ruby-mri /usr/share/foreman-proxy/bin/smart-proxy

Nov 12 23:50:03 provisioner.lab.libcore.so smart-proxy31274: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 23:50:03 provisioner.lab.libcore.so smart-proxy31274: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 23:50:03 provisioner.lab.libcore.so smart-proxy31274: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 23:50:03 provisioner.lab.libcore.so smart-proxy31274: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 23:50:03 provisioner.lab.libcore.so smart-proxy31274: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 23:50:03 provisioner.lab.libcore.so smart-proxy31274: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 23:50:03 provisioner.lab.libcore.so smart-proxy31274: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 23:50:03 provisioner.lab.libcore.so smart-proxy31274: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
Nov 12 23:50:03 provisioner.lab.libcore.so smart-proxy31274: xx:xx:xx:f4
Nov 12 23:50:03 provisioner.lab.libcore.so smart-proxy31274: [2015-11-12 23:50:03] INFO WEBrick::HTTPServer#start: pid=31274 port=8443


Related issues 1 (0 open1 closed)

Related to Smart Proxy - Feature #19480: Support systemd's notify service type, call sd_notify on startupClosedDominic Cleal05/09/2017Actions
Actions #1

Updated by Dominic Cleal about 7 years ago

  • Related to Feature #19480: Support systemd's notify service type, call sd_notify on startup added
Actions #2

Updated by Dominic Cleal about 7 years ago

  • Status changed from New to Resolved

Thanks for the report (and PR). I think this has been resolved now via #19480, which changes the service type to 'notify' and uses a command line argument to override the settings file if it differs in configuration.

Actions

Also available in: Atom PDF