[ClusterLabs] Notice: SLES11SP4 broke exportfs!

Dejan Muhamedagic dejanmm at fastmail.fm
Mon Dec 21 10:41:14 UTC 2015


Hi,

On Sat, Dec 12, 2015 at 10:06:57AM +0300, Andrei Borzenkov wrote:
> 11.12.2015 21:27, Ulrich Windl пишет:
> > Hi!
> > 
> > After updating from SLES11SP3 (june version) to SLES11SP4 (todays version) exportfs fails to get the export status. I have message like this in syslog:
> > 
> > Dec 11 19:22:09 h04 crmd[11128]:   notice: process_lrm_event: rksaph04-prm_nfs_c11_mnt_exp_monitor_0:93 [ /usr/lib/ocf/resource.d/heartbeat/exportfs: line 178: 4f838db1: value too great for base (error token is "4f838db1")\n ]
> > 
> > Why is such broken code released? Here's the diff:
> > 
> > --- /usr/lib/ocf/resource.d/heartbeat/exportfs  2015-03-11 07:00:04.000000000 +0100
> ...
> 
> > @@ -165,18 +171,48 @@
> >         !
> >  }
> > 
> > +reset_fsid() {
> > +       CURRENT_FSID=$OCF_RESKEY_fsid
> > +}
> > +bump_fsid() {
> > +       let $((CURRENT_FSID++))
> > +}
> 
> Here is where error comes from.
> 
> > +get_fsid() {
> > +       echo $CURRENT_FSID
> > +}
> > +
> > +# run a function on all directories
> > +forall() {
> > +       local func=$1
> > +       shift 1
> > +       local fast_exit=""
> > +       local dir rc=0
> > +       if [ "$2" = fast_exit ]; then
> > +               fast_exit=1
> > +               shift 1
> > +       fi
> > +       reset_fsid
> > +       for dir in $OCF_RESKEY_directory; do
> > +               $func $dir "$@"
> > +               rc=$(($rc | $?))
> > +               bump_fsid
> 
> called here
> 
> > +               [ "$fast_exit" ] && continue
> > +               [ $rc -ne 0 ] && return $rc
> > +       done
> > +       return $rc
> > +}
> > +
> ...
> 
> >  exportfs_validate_all ()
> >  {
> > -       if [ ! -d $OCF_RESKEY_directory ]; then
> > -               ocf_log err "$OCF_RESKEY_directory does not exist or is not a directory"
> > +       if [ `echo "$OCF_RESKEY_directory" | wc -w` -gt 1 ] &&
> > +                       ! ocf_is_decimal "$OCF_RESKEY_fsid"; then
> > +               ocf_log err "use integer fsid when exporting multiple directories"
> > +               return $OCF_ERR_CONFIGURED
> > +       fi
> > +       if ! forall testdir; then
> >                 return $OCF_ERR_INSTALLED
> >         fi
> >  }
> 
> It is validated to be decimal, but only if more than one directory is
> present, while it is always being incremented, even if only single
> directory is defined.

Good catch!

Thanks,

Dejan

> Same code present upstream (178 line number is a bit off).
> 
> Workaround is to change FSID, but yes, it looks like upstream bug.
> 
> 
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org




More information about the Users mailing list