Skip to content

exportfs agent causes 'error output [ grep: Unmatched ( or \( ]' when cleanup_export_cache called #2070

@scratchings

Description

@scratchings

On attempting a service failover we see the following in the pacemaker logs:

Sep 01 14:55:09.092 hostname.domain.name pacemaker-execd [25360] (log_op_output) info: exportfs-resource_stop_0[3192827] error output [ grep: Unmatched ( or ( ]

Looking at the sources for exportfs we believe this is caused by the function 'cleanup_export_cache()' which attempts to build a regular expression matching all possible fsid's for exported file systems and then compare to the contents of /proc/net/rpc/nfsd.export/content:

The line causing the issue is this:

fsid_re="fsid=(echo forall get_fsid|sed 's/ /|/g'),"

For two exports with fsids 1 and 2 this code results in fsid_re being set to:

fsid=(echo 1 2|sed 's/ /|/g'),

whereas I believe the intention was to set it to:

fsid=(1|2),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions