File: allow-using-uwsgi.patch

package info (click to toggle)
puppet-module-cloudkitty 14.0.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,056 kB
  • sloc: ruby: 2,270; python: 38; sh: 10; makefile: 10
file content (68 lines) | stat: -rw-r--r-- 2,898 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Description: Allow using uwsgi
Author: Thomas Goirand <zigo@debian.org>
Forwarded: https://review.opendev.org/c/openstack/puppet-cloudkitty/+/782292
Last-Update: 2018-12-30

Index: puppet-module-cloudkitty/manifests/api.pp
===================================================================
--- puppet-module-cloudkitty.orig/manifests/api.pp
+++ puppet-module-cloudkitty/manifests/api.pp
@@ -57,7 +57,7 @@ class cloudkitty::api (
   $port                         = $facts['os_service_default'],
   $pecan_debug                  = $facts['os_service_default'],
   Boolean $sync_db              = true,
-  $service_name                 = 'httpd',
+  $service_name                 = $::cloudkitty::params::api_service_name,
   $enable_proxy_headers_parsing = $facts['os_service_default'],
   $max_request_body_size        = $facts['os_service_default'],
 ) {
@@ -103,6 +103,14 @@ class cloudkitty::api (
 
       # we need to make sure cloudkitty-api/eventlet is stopped before trying to start apache
       Service['cloudkitty-api'] -> Service[$service_name]
+    } elsif $service_name == 'cloudkitty-api' {
+      service { 'cloudkitty-api':
+        enable     => $enabled,
+        name       => 'cloudkitty-api',
+        hasstatus  => true,
+        hasrestart => true,
+        tag        => 'cloudkitty-service',
+      }
     } else {
       fail('Invalid service_name. Only httpd for being run by a httpd server')
     }
Index: puppet-module-cloudkitty/manifests/params.pp
===================================================================
--- puppet-module-cloudkitty.orig/manifests/params.pp
+++ puppet-module-cloudkitty/manifests/params.pp
@@ -6,7 +6,6 @@ class cloudkitty::params {
   include openstacklib::defaults
 
   $client_package_name    = 'python3-cloudkittyclient'
-  $api_service_name       = 'cloudkitty-api'
   $processor_service_name = 'cloudkitty-processor'
   $user                   = 'cloudkitty'
   $group                  = 'cloudkitty'
@@ -16,6 +15,7 @@ class cloudkitty::params {
     'RedHat': {
     # package names
     $api_package_name              = 'openstack-cloudkitty-api'
+    $api_service_name              = 'cloudkitty-api'
     $processor_package_name        = 'openstack-cloudkitty-processor'
     $common_package_name           = 'openstack-cloudkitty-common'
     $cloudkitty_wsgi_script_source = '/usr/bin/cloudkitty-api'
@@ -24,6 +24,14 @@ class cloudkitty::params {
     'Debian': {
     # package names
     $api_package_name              = 'cloudkitty-api'
+    case $::os_package_type {
+      'debian': {
+        $api_service_name              = 'cloudkitty-api'
+      }
+      default: {
+        $api_service_name              = 'httpd'
+      }
+    }
     $processor_package_name        = 'cloudkitty-processor'
     $common_package_name           = 'cloudkitty-common'
     $cloudkitty_wsgi_script_source = '/usr/bin/cloudkitty-api'