Add license headers where missing
[fuel.git] / mcp / patches / 0010-maas-region-allow-timeout-override.patch
1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2017 Mirantis Inc., Enea AB and others.
3 :
4 : All rights reserved. This program and the accompanying materials
5 : are made available under the terms of the Apache License, Version 2.0
6 : which accompanies this distribution, and is available at
7 : http://www.apache.org/licenses/LICENSE-2.0
8 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
9 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
10 Date: Sat, 23 Sep 2017 02:03:01 +0200
11 Subject: [PATCH] maas: region: allow timeout override
12
13 Poor implementation that allows overiding comissioning/deploying
14 timeouts, which are hardcoded in MaaS source code.
15
16 Add the following reclass _param:
17 - opnfv_maas_timeout_comissioning;
18 - opnfv_maas_timeout_deploying;
19
20 The defaults are now 10/15 minutes (MaaS defaults to 20/40 min).
21
22 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
23 ---
24
25 diff --git a/maas/region.sls b/maas/region.sls
26 --- a/maas/region.sls
27 +++ b/maas/region.sls
28 @@ -19,6 +19,26 @@
29    - require:
30      - pkg: maas_region_packages
31
32 +maas_timeout_commissioning:
33 +  file.replace:
34 +    - name: "/usr/lib/python3/dist-packages/maasserver/node_status.py"
35 +    - pattern: '^(\s+NODE_STATUS.COMMISSIONING:)\s+\d+,$'
36 +    - repl: \1 {{ salt['pillar.get']('_param:opnfv_maas_timeout_comissioning', '10') }},
37 +    - require:
38 +      - pkg: maas_region_packages
39 +    - require_in:
40 +      - service: maas_region_services
41 +
42 +maas_timeout_deploying:
43 +  file.replace:
44 +    - name: "/usr/lib/python3/dist-packages/maasserver/node_status.py"
45 +    - pattern: '^(\s+NODE_STATUS.DEPLOYING:)\s+\d+,$'
46 +    - repl: \1 {{ salt['pillar.get']('_param:opnfv_maas_timeout_deploying', '15') }},
47 +    - require:
48 +      - pkg: maas_region_packages
49 +    - require_in:
50 +      - service: maas_region_services
51 +
52  {%- if region.get('enable_iframe', False)  %}
53
54  /etc/apache2/conf-enabled/maas-http.conf: