HomeClusterLabs Projects

coroparse: Handle end of special sections
c10ef089150aUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

coroparse: Handle end of special sections

Special sections totem.interface, logging.logger_subsys,
logging.logging_daemon and nodelist.node executes extra code on end of
section. Previously, any end of section triggered handling, including
subsection one.

So for example config like:

nodelist {
  node {
    name: node1
    subs {
      key: val
    }
  }

  node {
    name: node2
    ...

result in node_number increased twice (once for end of "subs" section
and second time for end of "node" section) so node2 got number 2 instead
of 1.

Same was happening for all other special sections and may result in
crash as reported by vikk777 <listratenko1998@mail.ru> in
issues #783 and #784.

Solution is to execute extra code only for real end of section and not
for subsection.

This patch fixes only main problem but it creates keys without
subsection name what is not optimal.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>

Details

Provenance
jfriesseAuthored on Thu, Apr 24, 10:33 AM
Parents
rC65d753bb7e1d: coroparse: Remove unused code
Branches
Unknown
Tags
Unknown

Event Timeline