[Ocfs2-test-devel] [Ocfs2-tools-devel] [PATCH 09/10] Trigger udev rescan to get volume label that mkfs made remotely.

eric zren at suse.com
Tue Sep 29 22:42:29 PDT 2015


Hi Junxiao,

I've found out the root cause. This problem matters /etc/blkid.conf.
It works after using the default value of EVALUATE.

Quote from man blkid: "EVALUATE=method Defines LABEL and UUID evaluation 
method(s). Currently,
the libblkid library supports "udev" and "scan" methods. More than one 
methods may be specified
in a comma separated list. Default is "udev,scan". The "udev" method 
uses udev /dev/disk/by-* symlinks and the "scan"
method scans all block devices from the /proc/partitions file. "
blkid.conf effects on libblkid that used by "mount".

So, drop this patch. Thanks for helping work this out.

Thanks,
Eric Ren

On 09/24/15 14:05, eric wrote:
> Hi Junxiao,
>
> I tried this patch, and it worked now.
>
>> Mounting device /dev/sdb to nodes(m1,m2):+
>> /usr/lib64/mpi/gcc/openmpi/bin/mpirun --allow-run-as-root -mca btl
>> tcp,self -mca plm_rsh_agent ssh:rsh -np 2 --host m1,m2
>> /home/ocfs2test/bin/ocfs2/bin/command.py --mount -l
>> ocfs2-xattr-multi-test-x86_64 -m /mnt/shared [ PASS ]
>> But here report mount PASS?
> It's report on node1. Yeah, I also noticed this concern. I checked
> node2, and actually mount failed.
> So, I looked some code source.
>
> 1.remote_mount.py
> ret = o2tf.openmpi_run(DEBUGON,
>                    nproc,
>                    str('%s' % command),
>                    options.nodelist,
>                    remote_method,
>                    options.interface,
>                    logfile,
>                    'WAIT')
>
> if ret:
>           sys.exit(1)
> else:
>           sys.exit(0)                ===> it's fine.
>
> 2. command.py
>    if not mounted:               ===> not return exit code!
>                           o2tf.SudoMount(options.DEBUGON, logfile,
>                                          options.mountpoint, options.label,
>                                          mt_options)
>                   else:
>                           o2tf.printlog('Partition already mounted.',
>                                   logfile, 0, '')
>                           sys.exit(1)
>
> Maybe, it's a problem. We cannot depend on that PASS status.
>
> And I also checked detailed test log, it failed because testing files on
> node2 cannot be found.
>>> [1] Check Namespace&Filetype of Multinode Xattr on
>>> Ocfs2:                      [FAILED]
>> This is a test error.
> Caused by mounting failure on node2.
>>> ....
>>>
>>> On node2:
>>> ocfs2test at m2:~/bin/ocfs2/log> ls
>>> o2t.log
>>> ocfs2test at m2:~/bin/ocfs2/log> cat o2t.log
>>> Sep 23 18:02:24 m2 o2tf.SudoMount:  Mount failed (RC=256)
>>> Sep 23 18:02:24 m2 o2tf.SudoMount:  mount: can't find
>>> LABEL=ocfs2-xattr-multi-test-x86_64
>> Test log recorded in other nodes in your setup?
> In fact, I didn't change log location.
>> Log only exist in the node issued the test in our side.
> For all test log but o2t.log. F.E, remote_mount.py and command.py will
> output error to
> logfile = config.LOGFILE on which node it run, and LOGFILE = O2TDIR +
> '/log/o2t.log' is in config.py.
>
> Thanks,
> Eric Ren
>> Thanks,
>> Junxiao.
>>
>>> Thanks,
>>> Eric
>>>
>>> On 09/23/15 16:52, eric wrote:
>>>> Hi Junxiao,
>>>>
>>>> Thanks for your help.
>>>>
>>>> On multiple nodes, say, start testing on node1, then testing on node2
>>>> would
>>>> break at some time. From the log, it complained testing file cannot be
>>>> found. Finally,
>>>> I found it's because disk had not been mounted on node2. Some
>>>> sub-tests mount
>>>> disk by "-L" instead of device name. But, label "XXX" cannot found on
>>>> node2.
>>>>
>>>> Here is my initial record for this:
>>>> https://github.com/renzhengeek/issues/issues/3
>>>>
>>>> For more details:
>>>>
>>>> https://bugzilla.suse.com/show_bug.cgi?id=925564
>>>>
>>>> It's very odd. Do I make it clear?
>>>> I wouldn't believe this problem could be true ;-)
>>>>
>>>> Thanks,
>>>> Eric
>>>>
>>>>
>>>>
>>>> On 09/23/15 14:16, Junxiao Bi wrote:
>>>>> On 09/23/2015 10:07 AM, Eric Ren wrote:
>>>>>> Hello Junxiao and all,
>>>>>>
>>>>>> I'd like to confirm with you on this problem again. Because I
>>>>>> "mkfs.ext4 -L
>>>>>> xxx /dev/sda" on one node, and cannot "mount -L xxx /mnt" on another
>>>>>> node, only got "-L xxx cannnot found" error message. It seems not a
>>>>>> ocfs2-specific problem. /dev/sda is an iscsi disk. So, I doubt if it's
>>>>>> an iscsi problem.
>>>>>>
>>>>> Maybe my mistake, i can't mount also when i try today with iscsi disk.
>>>>> But i never see a failure during my ocfs2-test. What is the issue the
>>>>> patch fixing?
>>>>>
>>>>> Thanks,
>>>>> Junxiao.
>>>>>> Here's this problem on bugzilla:
>>>>>> https://bugzilla.suse.com/show_bug.cgi?id=925564
>>>>>>
>>>>>> My QUESTIONs are:
>>>>>> 1. was /dev/sda an iscsi disk in your case?
>>>>>>
>>>>>> 2. Could you try ext4 in that way for this? Cause I want to see how
>>>>>> things would go beyond our SUSE environment.
>>>>>> I really appreciate your help ;-)
>>>>>>
>>>>>> Thanks,
>>>>>> Eric Ren
>>>>>>
>>>>>> On Fri, Sep 11, 2015 at 04:32:24AM -0600, Eric Ren wrote:
>>>>>>> Hi Junxiao,
>>>>>>>
>>>>>>> Thanks very much for your view!
>>>>>>>
>>>>>>> I reported this problem to ocfs2 devel list long time ago. You can
>>>>>>> see here:
>>>>>>> https://oss.oracle.com/pipermail/ocfs2-devel/2015-March/010691.html
>>>>>>>
>>>>>>> And I just now test this gain, and the another node cannot find the
>>>>>>> LABEL on cluster with good condition.
>>>>>>> If thing's OK on your side, It may be relative to distribution,or
>>>>>>> other factors.
>>>>>>>
>>>>>>> Anyway, I'll take more care about this. Thanks again ;-)
>>>>>>>
>>>>>>> -- 
>>>>>>> Eric Ren
>>>>>>>
>>>>>>>     >>>
>>>>>>>> Hi Eric,
>>>>>>>>     On 09/10/2015 02:54 PM, zren at suse.com wrote:
>>>>>>>>> From: Eric Ren <zren at suse.com>
>>>>>>>>>     Volume label used to mount disk remotely is not visible on remote
>>>>>>>>> node. So before mounting, trigger udevadm rescan to get volume
>>>>>>>>> label.
>>>>>>>> Is this needed? mount can detect the new label.
>>>>>>>> I "mkfs.ocfs2 -L xxx /dev/sda" one one node, and can "mount -L xxx
>>>>>>>> /mnt"
>>>>>>>> on another node.
>>>>>>>>     Thanks,
>>>>>>>> Junxiao.
>>>>>>>>>     Signed-off-by: Eric Ren <zren at suse.com>
>>>>>>>>> Reviewed-by: Gang He <ghe at suse.com>
>>>>>>>>> ---
>>>>>>>>>     programs/python_common/remote_mount.py | 16 ++++++++++++++--
>>>>>>>>>     1 file changed, 14 insertions(+), 2 deletions(-)
>>>>>>>>>     diff --git a/programs/python_common/remote_mount.py
>>>>>>>> b/programs/python_common/remote_mount.py
>>>>>>>>> index 7520405..088ba46 100755
>>>>>>>>> --- a/programs/python_common/remote_mount.py
>>>>>>>>> +++ b/programs/python_common/remote_mount.py
>>>>>>>>> @@ -126,8 +126,20 @@ command = str('%s -l %s -m %s %s' % (buildcmd,
>>>>>>>>>         mt_options))
>>>>>>>>>     #
>>>>>>>>>     o2tf.OpenMPIInit(DEBUGON, options.nodelist, logfile, 'ssh')
>>>>>>>>> -#
>>>>>>>>> -#
>>>>>>>>> +
>>>>>>>>> +# tigger udev rescan
>>>>>>>>> +ret = o2tf.openmpi_run(DEBUGON,
>>>>>>>>> +                nproc,
>>>>>>>>> +                'udevadm trigger',
>>>>>>>>> +                options.nodelist,
>>>>>>>>> +                remote_method,
>>>>>>>>> +                options.interface,
>>>>>>>>> +                logfile,
>>>>>>>>> +                'WAIT')
>>>>>>>>> +
>>>>>>>>> +#wait for completing udev rescan.10s is only tested on 3-nodes.
>>>>>>>>> +time.sleep(10)
>>>>>>>>> +
>>>>>>>>>     ret = o2tf.openmpi_run(DEBUGON,
>>>>>>>>>              nproc,
>>>>>>>>>              str('%s' % command),
>>>>>>> _______________________________________________
>>>>>>> Ocfs2-tools-devel mailing list
>>>>>>> Ocfs2-tools-devel at oss.oracle.com
>>>>>>> https://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel
>>>>>>>
>
> _______________________________________________
> Ocfs2-test-devel mailing list
> Ocfs2-test-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-test-devel
>




More information about the Ocfs2-test-devel mailing list