[virtual] Extend cinder volume size
[fuel.git] / mcp / patches / 0010-maas-region-allow-timeout-override.patch
1 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2 Date: Sat, 23 Sep 2017 02:03:01 +0200
3 Subject: [PATCH] maas: region: allow timeout override
4
5 Poor implementation that allows overiding comissioning/deploying
6 timeouts, which are hardcoded in MaaS source code.
7
8 Add the following reclass _param:
9 - opnfv_maas_timeout_comissioning;
10 - opnfv_maas_timeout_deploying;
11
12 The defaults are now 10/15 minutes (MaaS defaults to 20/40 min).
13
14 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
15 ---
16
17 diff --git a/maas/region.sls b/maas/region.sls
18 --- a/maas/region.sls
19 +++ b/maas/region.sls
20 @@ -19,6 +19,26 @@
21    - require:
22      - pkg: maas_region_packages
23
24 +maas_timeout_commissioning:
25 +  file.replace:
26 +    - name: "/usr/lib/python3/dist-packages/maasserver/node_status.py"
27 +    - pattern: '^(\s+NODE_STATUS.COMMISSIONING:)\s+\d+,$'
28 +    - repl: \1 {{ salt['pillar.get']('_param:opnfv_maas_timeout_comissioning', '10') }},
29 +    - require:
30 +      - pkg: maas_region_packages
31 +    - require_in:
32 +      - service: maas_region_services
33 +
34 +maas_timeout_deploying:
35 +  file.replace:
36 +    - name: "/usr/lib/python3/dist-packages/maasserver/node_status.py"
37 +    - pattern: '^(\s+NODE_STATUS.DEPLOYING:)\s+\d+,$'
38 +    - repl: \1 {{ salt['pillar.get']('_param:opnfv_maas_timeout_deploying', '15') }},
39 +    - require:
40 +      - pkg: maas_region_packages
41 +    - require_in:
42 +      - service: maas_region_services
43 +
44  {%- if region.get('enable_iframe', False)  %}
45
46  /etc/apache2/conf-enabled/maas-http.conf: