Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make camptocamp/systemd a hard dependency #825

Merged
merged 1 commit into from
Apr 16, 2020
Merged

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Apr 16, 2020

8bc1ba3 made the default deployment use the Puma service. That means the default requires systemd and a soft dependency no longer makes sense.

It also updates the documentation in README to match.

metadata.json Outdated Show resolved Hide resolved
Copy link
Contributor

@wbclark wbclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the logic behind this change and agree it makes sense. I think this should be merged once the typo in metadata.json is addressed.

8bc1ba3 made the default deployment use
the Puma service. That means the default requires systemd and a soft
dependency no longer makes sense.

It also updates the documentation in README to match.
@wbclark
Copy link
Contributor

wbclark commented Apr 16, 2020

The one test failed again, for the same reason as before

@mmoll
Copy link
Contributor

mmoll commented Apr 16, 2020

I'm very sure this is the known multithread DB migration issue.

@mmoll mmoll merged commit eaf2fcb into theforeman:master Apr 16, 2020
@mmoll
Copy link
Contributor

mmoll commented Apr 16, 2020

merged, bedankt @ekohl!

@ekohl ekohl deleted the systemd branch April 16, 2020 20:21
@ekohl
Copy link
Member Author

ekohl commented Apr 16, 2020

For completeness: https://projects.theforeman.org/issues/29429

@juliantaylor
Copy link

juliantaylor commented Jun 16, 2020

any chance this can be made optional? not everyone is using the camptocamp systemd module

here is a patch to use eyplib/systemd in case someone needs it (does not remove the obsolete templates):

--- a/manifests/config.pp
+++ b/manifests/config.pp
@@ -56,16 +56,21 @@ class foreman::config {
   }
 
   if $foreman::use_foreman_service {
-    systemd::dropin_file { 'foreman-socket':
-      filename => 'installer.conf',
-      unit     => "${foreman::foreman_service}.socket",
-      content  => template('foreman/foreman.socket-overrides.erb'),
+    systemd::socket { $foreman::foreman_service:
+      listen_stream => ['', $listen_socket],
     }
 
-    systemd::dropin_file { 'foreman-service':
-      filename => 'installer.conf',
-      unit     => "${foreman::foreman_service}.service",
-      content  => template('foreman/foreman.service-overrides.erb'),
+    systemd::service::dropin { $foreman::foreman_service:
+      user     => $foreman::user,
+      env_vars => [
+        "FOREMAN_ENV=${foreman::rails_env}",
+        "FOREMAN_HOME=${foreman::app_root}",
+        "FOREMAN_BIND=${foreman::foreman_service_bind}",
+        "FOREMAN_PORT=${foreman::foreman_service_port}",
+        "FOREMAN_PUMA_THREADS_MIN=${foreman::foreman_service_puma_threads_min}",
+        "FOREMAN_PUMA_THREADS_MAX=${foreman::foreman_service_puma_threads_max}",
+        "FOREMAN_PUMA_WORKERS=${foreman::foreman_service_puma_workers}",
+      ],
     }
   }
 
diff --git a/metadata.json b/metadata.json
index cbb9cec..65d1002 100644
--- a/metadata.json
+++ b/metadata.json
@@ -13,8 +13,8 @@
   ],
   "dependencies": [
     {
-      "name": "camptocamp/systemd",
-      "version_requirement": ">= 2.2.0 < 3.0.0"
+      "name": "eyplib/systemd",
+      "version_requirement": ">= 0.2.0 < 1.0.0"
     },
     {
       "name": "puppetlabs/apache",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants