aboutsummaryrefslogtreecommitdiffstats
path: root/docs/drools/feature_clmgt.rst
blob: 63cdb015e1527d4a3734765e80d0cbed3eee57a5 (plain)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0

********************************
Feature: Control Loop Management
********************************

.. contents::
    :depth: 3

Summary
^^^^^^^

The Control Loop Management feature augments the telemetry tooling to allow
introspection of runtime operational policies.

Usage
^^^^^

The feature is enabled by default.  The lifecycle "enabled" property can be toggled with
the "features" command line tool.

    .. code-block:: bash
       :caption: PDPD Features Command

        policy stop

        features disable controlloop-management   # enable/disable toggles the activation of the feature.

        policy start

The "telemetry" tool can be used to list the control loops and associated Operational Polices at runtime.

    .. code-block:: bash
       :caption: PDPD Features Command

       bash-4.4$ telemetry
       Version: 1.0.0
       https://localhost:9696/policy/pdp/engine> cd controllers/usecases/drools/facts/usecases/controlloops
       https://localhost:9696/policy/pdp/engine/controllers/usecases/drools/facts/usecases/controlloops> get
       HTTP/1.1 200 OK
       Content-Length: 132
       Content-Type: application/json
       Date: Mon, 03 Jun 2019 20:23:38 GMT
       Server: Jetty(9.4.14.v20181114)

       [
           "LOOP_vLoadBalancerMS_v3_0_vLoadBalancerMS0_k8s-tca-clamp-policy-05162019",
           "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e"
       ]

       https://localhost:9696/policy/pdp/engine/controllers/usecases/drools/facts/usecases/controlloops> get ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e/policy
       HTTP/1.1 200 OK
       Content-Length: 612
       Content-Type: text/plain
       Date: Mon, 03 Jun 2019 20:23:58 GMT
       Server: Jetty(9.4.14.v20181114)

       controlLoop:
         version: 2.0.0
         controlLoopName: ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
         trigger_policy: unique-policy-id-1-restart
         timeout: 3600
         abatement: true

       policies:
         - id: unique-policy-id-1-restart
           name: Restart the VM
           description:
           actor: APPC
           recipe: Restart
           target:
             type: VM
           retry: 3
           timeout: 1200
           success: final_success
           failure: final_failure
           failure_timeout: final_failure_timeout
           failure_retries: final_failure_retries
           failure_exception: final_failure_exception
           failure_guard: final_failure_guard

       https://localhost:9696/policy/pdp/engine/controllers/usecases/drools/facts/usecases/controlloops>

End of Document