Parsers for the Corosync Cluster Engine configurations

Parsers included in this module are:

CorosyncConf - file /etc/corosync/corosync.conf

class insights.parsers.corosync.CorosyncConf(context)[source]

Bases: ConfigParser

Parse the output of the file /etc/corosync/corosync.conf using the ConfigParser base class. It exposes the corosync configuration through the parsr query interface.

The parameters in the directives are referred from the manpage of corosync.conf. See man 8 corosync.conf for more info.

Sample content of the file /etc/corosync/corosync.conf

totem {
    version: 2
    secauth: off
    cluster_name: tripleo_cluster
    transport: udpu
    token: 10000

nodelist {
    node {
        ring0_addr: overcloud-controller-0
        nodeid: 1

    node {
        ring0_addr: overcloud-controller-1
        nodeid: 2

    node {
        ring0_addr: overcloud-controller-2
        nodeid: 3

quorum {
    provider: corosync_votequorum

logging {
    to_logfile: yes
    logfile: /var/log/cluster/corosync.log
    to_syslog: yes


>>> from insights.parsr.query import first, last
>>> corosync_conf['quorum']['provider'][first].value
>>> corosync_conf['totem']['token'][first].value
>>> corosync_conf['nodelist']['node']['nodeid'][last].value