Merge ~gabrielcocenza/juju-lint:bug/1994977 into juju-lint:master

Proposed by Gabriel Cocenza
Status: Merged
Approved by: Erhan Sunar
Approved revision: 30312ac3127bf707525c126b54a292e3b0fba994
Merged at revision: 670a2d7dff89157954330bd2b505a684339d14a5
Proposed branch: ~gabrielcocenza/juju-lint:bug/1994977
Merge into: juju-lint:master
Diff against target: 139 lines (+75/-1)
4 files modified
contrib/includes/networking/ovn.yaml (+5/-0)
contrib/includes/networking/ovs.yaml (+5/-0)
contrib/includes/openstack.yaml (+39/-1)
tests/unit/test_jujulint.py (+26/-0)
Reviewer Review Type Date Requested Status
🤖 prod-jenkaas-bootstack continuous-integration Approve
Erhan Sunar (community) Approve
Mert Kirpici (community) Approve
Review via email: mp+432421@code.launchpad.net

Commit message

check that worker-multiplier is set

- added worker-multiplier config check for keystone, neutron-api,
  glance, nova-compute, nova-cloud-controller, cinder, octavia and
  placement.

Closes-Bug: #1994977

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Mert Kirpici (mertkirpici) wrote :

thanks Gabriel, +1 from me.
Also since CI is down, I ran lint && unit && func. all looks good.

https://pastebin.ubuntu.com/p/QzWHTDmCcv/

review: Approve
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
Erhan Sunar (esunar) wrote :

LGTM

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Failed to merge change (unable to merge source repository due to conflicts), setting status to needs review.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 670a2d7dff89157954330bd2b505a684339d14a5

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/contrib/includes/networking/ovn.yaml b/contrib/includes/networking/ovn.yaml
2index bba04d5..fff0e72 100644
3--- a/contrib/includes/networking/ovn.yaml
4+++ b/contrib/includes/networking/ovn.yaml
5@@ -10,6 +10,11 @@ openstack config networking: &openstack-config-networking
6 Usable MTU for a tenant network is less than 1500.
7 global-physnet-mtu:
8 eq: 9000
9+ worker-multiplier:
10+ neq: ""
11+ log-level: warning
12+ custom-message:
13+ Default 4 workers is too low for production clouds.
14
15 openstack mandatory charms networking: &openstack-mandatory-charms-networking
16 - ovn-central
17diff --git a/contrib/includes/networking/ovs.yaml b/contrib/includes/networking/ovs.yaml
18index 4cba606..53501c0 100644
19--- a/contrib/includes/networking/ovs.yaml
20+++ b/contrib/includes/networking/ovs.yaml
21@@ -7,6 +7,11 @@ openstack config networking: &openstack-config-networking
22 Usable MTU for a tenant network is less than 1500.
23 global-physnet-mtu:
24 eq: 9000
25+ worker-multiplier:
26+ neq: ""
27+ log-level: warning
28+ custom-message:
29+ Default 4 workers is too low for production clouds.
30
31 openstack mandatory charms networking: &openstack-mandatory-charms-networking
32 - neutron-openvswitch
33diff --git a/contrib/includes/openstack.yaml b/contrib/includes/openstack.yaml
34index e0b0f8d..5814fac 100644
35--- a/contrib/includes/openstack.yaml
36+++ b/contrib/includes/openstack.yaml
37@@ -14,11 +14,21 @@ openstack config base: &openstack-config-base
38 glance:
39 ceph-osd-replication-count:
40 eq: 3
41+ worker-multiplier:
42+ neq: ""
43+ log-level: warning
44+ custom-message:
45+ Default 4 workers is too low for production clouds.
46 nova-compute:
47 cpu-model:
48 neq: ""
49 ceph-osd-replication-count:
50 eq: 3
51+ worker-multiplier:
52+ neq: ""
53+ log-level: warning
54+ custom-message:
55+ Default 4 workers is too low for production clouds.
56 rabbitmq-server:
57 cluster-partition-handling:
58 eq: "pause_minority"
59@@ -27,6 +37,11 @@ openstack config base: &openstack-config-base
60 keystone:
61 token-expiration:
62 gte: 86400
63+ worker-multiplier:
64+ neq: ""
65+ log-level: warning
66+ custom-message:
67+ Default 4 workers is too low for production clouds.
68 sysconfig:
69 governor:
70 eq: "performance"
71@@ -36,7 +51,30 @@ openstack config base: &openstack-config-base
72 isolcpus is deprecated as mentioned in the linux kernel documentation.
73 You are advised to use cpu-affinity-range to achieve similar feature.
74 log-level: warning
75-
76+ nova-cloud-controller:
77+ worker-multiplier:
78+ neq: ""
79+ log-level: warning
80+ custom-message:
81+ Default 4 workers is too low for production clouds.
82+ cinder:
83+ worker-multiplier:
84+ neq: ""
85+ log-level: warning
86+ custom-message:
87+ Default 4 workers is too low for production clouds.
88+ octavia:
89+ worker-multiplier:
90+ neq: ""
91+ log-level: warning
92+ custom-message:
93+ Default 4 workers is too low for production clouds.
94+ placement:
95+ worker-multiplier:
96+ neq: ""
97+ log-level: warning
98+ custom-message:
99+ Default 4 workers is too low for production clouds.
100
101 openstack config:
102 << : [ *openstack-config-base, *openstack-config-networking, *openstack-config-database ]
103diff --git a/tests/unit/test_jujulint.py b/tests/unit/test_jujulint.py
104index 9f95f43..8f548d6 100644
105--- a/tests/unit/test_jujulint.py
106+++ b/tests/unit/test_jujulint.py
107@@ -1717,6 +1717,32 @@ applications:
108 assert path_mtu["log-level"] == "warning"
109 assert path_mtu["custom-message"]
110
111+ def test_worker_multiplier_rules(self, linter, rules_files):
112+ """Test that API charms set worker-multiplier."""
113+ charms = [
114+ "keystone",
115+ "neutron-api",
116+ "glance",
117+ "nova-compute",
118+ "nova-cloud-controller",
119+ "cinder",
120+ "octavia",
121+ "placement",
122+ ]
123+ for rule in [rules_file for rules_file in rules_files if "fcb" in rules_file]:
124+ for charm in charms:
125+ linter.filename = rule
126+ linter.read_rules()
127+ worker_multiplier = linter.lint_rules["openstack config"][charm][
128+ "worker-multiplier"
129+ ]
130+ assert worker_multiplier["neq"] == ""
131+ assert worker_multiplier["log-level"] == "warning"
132+ assert (
133+ worker_multiplier["custom-message"]
134+ == "Default 4 workers is too low for production clouds."
135+ )
136+
137 @pytest.mark.parametrize(
138 "message, log_level, error",
139 [

Subscribers

People subscribed via source and target branches