{"issue":{"created_at":"2011-12-06T17:00:40Z","state":"open","updated_at":"2011-12-13T17:59:36Z","user":{"gravatar_id":"bda356eecf83e7a2b75c0c9dd23578f6","id":643308,"url":"https://api.github.com/users/acqant","login":"acqant","avatar_url":"https://secure.gravatar.com/avatar/bda356eecf83e7a2b75c0c9dd23578f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":2,"body":"Changing the OCF_RESKEY_clientspec to a character class makes exportfs_monitor correctly report the status\r\n\r\nFor example:\r\nweb* will not pass the grep and monitor will fail\r\nweb1.full.domain.com will pass the grep and pass monitor\r\n\r\nChanging clientspec web* to web[*] will pass the grep and monitor will work.\r\n\r\n186c148,149\r\n<       exportfs | grep -zqs \"${OCF_RESKEY_directory}[[:space:]]*${OCF_RESKEY_clientspec}\"\r\n---\r\n>       NEW=`echo ${OCF_RESKEY_clientspec} | sed 's/*/[*]/'`\r\n>       exportfs | grep -zqs \"${OCF_RESKEY_directory}[[:space:]]*${NEW}\"\r\n","assignee":{"gravatar_id":"406b40c49a9c2d378df28a064de3e12b","id":638318,"url":"https://api.github.com/users/dmuhamedagic","login":"dmuhamedagic","avatar_url":"https://secure.gravatar.com/avatar/406b40c49a9c2d378df28a064de3e12b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"id":2464578,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":39,"labels":[],"title":"exportfs_monitor in exportfs does not support wildcard exports","html_url":"https://github.com/ClusterLabs/resource-agents/issues/39","closed_at":null,"url":"https://api.github.com/repos/ClusterLabs/resource-agents/issues/39","milestone":null},"action":"created","comment":{"created_at":"2011-12-13T17:59:36Z","updated_at":"2011-12-13T17:59:36Z","user":{"gravatar_id":"bda356eecf83e7a2b75c0c9dd23578f6","id":643308,"url":"https://api.github.com/users/acqant","login":"acqant","avatar_url":"https://secure.gravatar.com/avatar/bda356eecf83e7a2b75c0c9dd23578f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Sorry I don't submit patches much.  I forked and submitted a pull request.\n\nOn Fri, Dec 9, 2011 at 12:13 AM, Dejan Muhamedagic <\nreply@reply.github.com\n> wrote:\n\n> Can you please send me your email address so that I can credit you for the\n> patch. Or clone and submit a pull request. But please add the local\n> statement:\n>\n> --- a/heartbeat/exportfs\n> +++ b/heartbeat/exportfs\n> @@ -181,9 +181,11 @@ END\n>\n>  exportfs_monitor ()\n>  {\n> +       local clientspec_re\n>        # \"grep -z\" matches across newlines, which is necessary as\n>        # exportfs output wraps lines for long export directory names\n> -       exportfs | grep -zqs\n> \"${OCF_RESKEY_directory}[[:space:]]*${OCF_RESKEY_clientspec}\"\n> +       clientspec_re=`echo ${OCF_RESKEY_clientspec} | sed 's/*/[*]/'`\n> +       exportfs | grep -zqs\n> \"${OCF_RESKEY_directory}[[:space:]]*${clientspec_re}\"\n>\n>  #Adapt grep status code to OCF return code\n>        case $? in\n>\n> ---\n> Reply to this email directly or view it on GitHub:\n>\n> https://github.com/ClusterLabs/resource-agents/issues/39#issuecomment-3075627\n>","id":3126710,"url":"https://api.github.com/repos/ClusterLabs/resource-agents/issues/comments/3126710"}}