]> git.proxmox.com Git - mirror_corosync.git/commitdiff
AUG: add support for resources section & quorum/quorate
authorAngus Salkeld <asalkeld@redhat.com>
Mon, 27 Sep 2010 21:14:06 +0000 (21:14 +0000)
committerAngus Salkeld <asalkeld@redhat.com>
Mon, 27 Sep 2010 21:14:06 +0000 (21:14 +0000)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3055 fd59a12c-fef9-0310-b244-a6a79926bd2f

conf/lenses/corosync.aug
conf/lenses/tests/test_corosync.aug

index 23458f34c5202dc54c1c44e67bf9095c9f4e23c8..f3257e9d1ba1083cb41156d22149ed4d939b45ff 100644 (file)
@@ -110,6 +110,35 @@ let logging =
   section "logging" setting
 
 
+(* The resource section *)
+let common_resource =
+   kv "max" Rx.decimal
+   |kv "poll_period" Rx.integer
+   |kv "recovery" /reboot|shutdown|watchdog|none/
+
+let memory_used =
+    let setting =
+    common_resource in
+  section "memory_used" setting
+
+
+let load_15min =
+    let setting =
+    common_resource in
+  section "load_15min" setting
+
+let system =
+    let setting =
+     load_15min
+     |memory_used in
+   section "system" setting
+
+(* The resources section *)
+let resources =
+  let setting =
+    system in
+  section "resources" setting
+
 (* The amf section *)
 let amf =
   let setting =
@@ -125,6 +154,7 @@ let quorum =
    |kv "quorumdev_poll" Rx.integer
    |kv "leaving_timeout" Rx.integer
    |kv "disallowed" Rx.integer
+   |kv "quorate" Rx.integer
    |kv "two_node" Rx.integer in
   section "quorum" setting
 
@@ -140,6 +170,6 @@ let uidgid =
    qstr /uid|gid/ in
   section "uidgid" setting
 
-let lns = (comment|empty|compatibility|totem|quorum|logging|amf|service|uidgid)*
+let lns = (comment|empty|compatibility|totem|quorum|logging|resources|amf|service|uidgid)*
 
 let xfm = transform lns (incl "/etc/corosync/corosync.conf")
index bae7db6501d73fbfe36cf9a8999dbdd80fc93316..a0fe1d54455f764c375ad6a12f6a4c332f42fabd 100644 (file)
@@ -50,9 +50,23 @@ quorum {
     quorumdev_poll: 2
     leaving_timeout: 2
     disallowed: 0
+    quorate: 1
     two_node: 0
 }
 
+resources {
+       system {
+               memory_used {
+                       recovery: reboot
+                       max: 80
+               }
+               load_15min {
+                       recovery: watchdog
+                       max: 8.56
+               }
+       }
+}
+
 uidgid {
     uid: 0
     gid: 0
@@ -109,7 +123,17 @@ test Corosync.lns get conf =
     { "quorumdev_poll" = "2" }
     { "leaving_timeout" = "2" }
     { "disallowed" = "0" }
+    { "quorate" = "1" }
     { "two_node" = "0" } }
+  { }
+    { "resources"
+         { "system"
+               { "memory_used"
+                       { "recovery" = "reboot" }
+                       { "max" = "80" } }
+               { "load_15min"
+                       { "recovery" = "watchdog" }
+                       { "max" = "8.56" } } } }
   { }
   { "uidgid"
     { "uid" = "0" }