RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1035977 - with IPv6 link-local address parse err: invalid character "%"
Summary: with IPv6 link-local address parse err: invalid character "%"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: autofs
Version: 7.0
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Ian Kent
QA Contact: Filesystem QE
URL:
Whiteboard:
Depends On:
Blocks: 1036032 1036033
TreeView+ depends on / blocked
 
Reported: 2013-11-29 05:44 UTC by JianHong Yin
Modified: 2014-06-18 05:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1036032 1036033 (view as bug list)
Environment:
Last Closed: 2014-06-13 10:18:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch - fix ipv6 link local address handling (1.20 KB, patch)
2013-11-30 02:22 UTC, Ian Kent
no flags Details | Diff

Description JianHong Yin 2013-11-29 05:44:09 UTC
Description of problem:
with IPv6 address automount fail with "hostname lookup failed"

Version-Release number of selected component (if applicable):
------------------------------------------------
TimeInfo  : 2013-11-29 00:29:12
CaseName  : /CoreOS/autofs/Regression/bz753964
$HOSTNAME : ibm-p720-02-lp2.rhts.eng.nay.redhat.com
DistroInfo: RedHatEnterpriseServer 7.0 : RHEL-7.0-20131123.0
kernelInfo: Linux ibm-p720-02-lp2.rhts.eng.nay.redhat.com 3.10.0-54.el7.ppc64 #1 SMP Thu Nov 21 15:42:34 EST 2013 ppc64 ppc64 ppc64 GNU/Linux
packageInfo
	autofs-5.0.7-35.el7.ppc64
------------------------------------------------

How reproducible:
y

Steps to Reproduce:
1. [00:29:19 root@ /mnt/tests/CoreOS/autofs/Regression/bz753964]# echo -e "scratchv4 -fstype=nfs4 ${ServerIPv4}:/exports/home
scratchv6 -fstype=nfs4 [${ServerIPv6}]:/exports/home" >/etc/auto.marrow
2. [00:29:31 root@ /mnt/tests/CoreOS/autofs/Regression/bz753964]# timeLimitRun 180 ls -l /mnt/${TESTNAME}/scratchv6
ls: cannot access /mnt/bz753964/scratchv6: No such file or directory
--------------------------------------------------------------------------------
3.

Actual results:
[00:29:31 root@ /mnt/tests/CoreOS/autofs/Regression/bz753964]# timeLimitRun 180 ls -l /mnt/${TESTNAME}/scratchv6
ls: cannot access /mnt/bz753964/scratchv6: No such file or directory
--------------------------------------------------------------------------------

[00:29:32 root@ /mnt/tests/CoreOS/autofs/Regression/bz753964]# cat /var/log/messages | grep "automount\[[0-9]\+\].* calling mount "
:: [   FAIL   ] :: Running 'cat /var/log/messages | grep "automount\[[0-9]\+\].* calling mount "' (Expected 0, got 1)
--------------------------------------------------------------------------------

[00:29:32 root@ /mnt/tests/CoreOS/autofs/Regression/bz753964]# cat /var/log/messages
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: handle_packet: type = 3
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: handle_packet_missing_indirect: token 2, name scratchv6, request pid 15253
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: attempting to mount entry /mnt/bz753964/scratchv6
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: lookup_mount: lookup(file): looking up scratchv6
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: lookup_mount: lookup(file): scratchv6 -> -fstype=nfs4 [fe80::f476:e3ff:fef0:e703]:/exports/home
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: parse_mount: parse(sun): expanded entry: -fstype=nfs4 [fe80::f476:e3ff:fef0:e703]:/exports/home
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: parse_mount: parse(sun): gathered options: fstype=nfs4
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: parse_mount: parse(sun): dequote("[fe80::f476:e3ff:fef0:e703]:/exports/home") -> [fe80::f476:e3ff:fef0:e703]:/exports/home
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: parse_mount: parse(sun): core of entry: options=fstype=nfs4, loc=[fe80::f476:e3ff:fef0:e703]:/exports/home
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: sun_mount: parse(sun): mounting root /mnt/bz753964, mountpoint scratchv6, what [fe80::f476:e3ff:fef0:e703]:/exports/home, fstype nfs4, options
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: mount_mount: mount(nfs): root=/mnt/bz753964 name=scratchv6 what=[fe80::f476:e3ff:fef0:e703]:/exports/home, fstype=nfs4, options=
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: mount_mount: mount(nfs): nfs options="", nobind=0, nosymlink=0, ro=0
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: get_nfs_info: called with host [fe80::f476:e3ff:fef0:e703](fe80::f476:e3ff:fef0:e703) proto 6 version 0x40
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: create_client: hostname lookup failed: Name or service not known
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: mount(nfs): no hosts available
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: dev_ioctl_send_fail: token = 2
Nov 29 00:29:31 ibm-p720-02-lp2 automount[15072]: failed to mount /mnt/bz753964/scratchv6
--------------------------------------------------------------------------------

Expected results:
mount success

Additional info:

Comment 2 Ian Kent 2013-11-30 01:02:25 UTC
I don't see anything in /CoreOS/autofs/Regression/bz753964 to
deal with ipv6 link local addresses.

I don't think that test can work with link local addresses.

It's true that there is a bug in autofs where it will choke
on correctly specified link local addresses but you haven't
provided one.

Comment 3 Ian Kent 2013-11-30 02:22:30 UTC
Created attachment 830809 [details]
Patch - fix ipv6 link local address handling

This patch will stop autofs from choking on valid ipv6 link
local addresses.

It will replace the name lookup error with messages like:
create_client: connect() failed: Invalid argument
which is essentially accurate since the address is invalid.

Once autofs gets to probing using the UDP protocol the
address will work without specifying an interface but
mount.nfs will choke on it because it's a link local
address without and interface.

You'll then see:
>> mount.nfs: an incorrect mount option was specified
and the resulting mount failure.

Comment 4 Ian Kent 2013-11-30 05:47:14 UTC
I can commit this and build a package if you'd like.

Of course you'll need to change the test to specify the interface
to use when you see a link local prefix (ie."fe80::") and you'll
need to use a fixed nfs-utils package (like to one I sent to you)
to test it since the mount will hang otherwise.

Comment 5 Ian Kent 2013-12-03 01:46:22 UTC
(In reply to Ian Kent from comment #4)
> I can commit this and build a package if you'd like.
> 
> Of course you'll need to change the test to specify the interface
> to use when you see a link local prefix (ie."fe80::") and you'll
> need to use a fixed nfs-utils package (like to one I sent to you)
> to test it since the mount will hang otherwise.

The reason I haven't committed this is because I wanted
feedback on my comments relating to IPv6 link local handling.

Comments please?

Comment 6 JianHong Yin 2013-12-03 01:55:47 UTC
(In reply to Ian Kent from comment #5)
> (In reply to Ian Kent from comment #4)
> > I can commit this and build a package if you'd like.
> > 
> > Of course you'll need to change the test to specify the interface
> > to use when you see a link local prefix (ie."fe80::") and you'll
> > need to use a fixed nfs-utils package (like to one I sent to you)
> > to test it since the mount will hang otherwise.
> 
> The reason I haven't committed this is because I wanted
> feedback on my comments relating to IPv6 link local handling.
> 
> Comments please?
Hi Ian

  sorry for the late. got it and please commit that, I will test.

Comment 7 Ian Kent 2013-12-03 02:07:13 UTC
(In reply to Yin.JianHong from comment #6)
> (In reply to Ian Kent from comment #5)
> > (In reply to Ian Kent from comment #4)
> > > I can commit this and build a package if you'd like.
> > > 
> > > Of course you'll need to change the test to specify the interface
> > > to use when you see a link local prefix (ie."fe80::") and you'll
> > > need to use a fixed nfs-utils package (like to one I sent to you)
> > > to test it since the mount will hang otherwise.
> > 
> > The reason I haven't committed this is because I wanted
> > feedback on my comments relating to IPv6 link local handling.
> > 
> > Comments please?
> Hi Ian
> 
>   sorry for the late. got it and please commit that, I will test.

Please remember that IPv6 link local addresses mostly require an
interface to be specified, ie. <IPv6 link local address>%<interfcae>,
particularly when using a connection oriented protocol like TCP.

Comment 8 JianHong Yin 2013-12-03 02:20:31 UTC
(In reply to Ian Kent from comment #7)
> (In reply to Yin.JianHong from comment #6)
> > (In reply to Ian Kent from comment #5)
> > > (In reply to Ian Kent from comment #4)
> > > > I can commit this and build a package if you'd like.
> > > > 
> > > > Of course you'll need to change the test to specify the interface
> > > > to use when you see a link local prefix (ie."fe80::") and you'll
> > > > need to use a fixed nfs-utils package (like to one I sent to you)
> > > > to test it since the mount will hang otherwise.
> > > 
> > > The reason I haven't committed this is because I wanted
> > > feedback on my comments relating to IPv6 link local handling.
> > > 
> > > Comments please?
> > Hi Ian
> > 
> >   sorry for the late. got it and please commit that, I will test.
> 
> Please remember that IPv6 link local addresses mostly require an
> interface to be specified, ie. <IPv6 link local address>%<interfcae>,
> particularly when using a connection oriented protocol like TCP.

yes I know, there is getDefaultIp() in my toolbox;
[root@dhcp-13-194 ~]# getDefaultIp 6nfs
fe80::a00:27ff:fe05:8ed4%eth0

---------------------------------------
getIp() {
  local ret
  local nic=$1
  local ver=$2
  local sc=${3}
  local ipaddr=`ip addr show $nic`;
  [ -z "$sc" ] && {
      sc=global;
      echo "$ipaddr"|grep -q 'inet6.*global' || sc=link;
  }
  local flg='(global|host lo)'

  case $ver in
  6|6nfs)
      ret=`echo "$ipaddr" |
          awk '/inet6.*'$sc'/{match($0,"inet6 ([0-9a-f:]+)",M); print M[1]}'`
      [ -n "$ret" -a $ver = 6nfs ] && ret=$ret%$nic;;
  4|*)
      ret=`echo "$ipaddr" |
          awk '/inet .*'"$flg"'/{match($0,"inet ([0-9.]+)",M); print M[1]}'`;;
  esac

  echo "$ret"
  [ -z "$ret" ] && return 1 || return 0
}

getDefaultNic() {
  ip route | awk '/default/{match($0,"dev ([^ ]+)",M); print M[1]}'
}

getDefaultIp() {
  local nic=`getDefaultNic`
  [ -z "$nic" ] && return 1

  getIp "$nic" "$@"
}

Comment 10 JianHong Yin 2013-12-03 05:46:50 UTC
Hi Ian:
before patched:
[00:17:04 root@ /mnt/tests/CoreOS/autofs/Regression/bz753964]# cat /var/log/messages
Dec  3 00:17:04 hp-sl390s-01 automount[11355]: handle_packet: type = 3
Dec  3 00:17:04 hp-sl390s-01 automount[11355]: handle_packet_missing_indirect: token 3, name scratchv6l, request pid 13946
Dec  3 00:17:04 hp-sl390s-01 automount[11355]: attempting to mount entry /mnt/bz753964/scratchv6l
Dec  3 00:17:04 hp-sl390s-01 automount[11355]: lookup_mount: lookup(file): looking up scratchv6l
Dec  3 00:17:04 hp-sl390s-01 automount[11355]: lookup_mount: lookup(file): scratchv6l -> -fstype=nfs4 [fe80::0:1040:214:5eff:fe5b:8faa%enp57s2]:/exports/home
Dec  3 00:17:04 hp-sl390s-01 automount[11355]: parse_mount: parse(sun): expanded entry: -fstype=nfs4 [fe80::0:1040:214:5eff:fe5b:8faa%enp57s2]:/exports/home
Dec  3 00:17:04 hp-sl390s-01 automount[11355]: parse_mount: parse(sun): gathered options: fstype=nfs4
Dec  3 00:17:04 hp-sl390s-01 automount[11355]: validate_location: invalid character "%" found in location [fe80::0:1040:214:5eff:fe5b:8faa%enp57s2]:/exports/home
Dec  3 00:17:04 hp-sl390s-01 automount[11355]: dev_ioctl_send_fail: token = 3
Dec  3 00:17:04 hp-sl390s-01 automount[11355]: failed to mount /mnt/bz753964/scratchv6l

after patch:

[00:12:50 root@ /mnt/tests/CoreOS/autofs/Regression/bz753964]# cat /var/log/messages
Dec  3 00:12:46 hp-dl385pg8-03 automount[11051]: handle_packet: type = 3
Dec  3 00:12:46 hp-dl385pg8-03 automount[11051]: handle_packet_missing_indirect: token 3, name scratchv6l, request pid 13634
Dec  3 00:12:46 hp-dl385pg8-03 automount[11051]: attempting to mount entry /mnt/bz753964/scratchv6l
Dec  3 00:12:46 hp-dl385pg8-03 automount[11051]: lookup_mount: lookup(file): looking up scratchv6l
Dec  3 00:12:46 hp-dl385pg8-03 automount[11051]: lookup_mount: lookup(file): scratchv6l -> -fstype=nfs4 [fe80::0:4257:213:20ff:fefb:4d96%em1]:/exports/home
Dec  3 00:12:46 hp-dl385pg8-03 automount[11051]: parse_mount: parse(sun): expanded entry: -fstype=nfs4 [fe80::0:4257:213:20ff:fefb:4d96%em1]:/exports/home
Dec  3 00:12:46 hp-dl385pg8-03 automount[11051]: parse_mount: parse(sun): gathered options: fstype=nfs4
Dec  3 00:12:46 hp-dl385pg8-03 automount[11051]: parse_mount: parse(sun): dequote("[fe80::0:4257:213:20ff:fefb:4d96%em1]:/exports/home") -> [fe80::0:4257:213:20ff:fefb:4d96%em1]:/exports/home
Dec  3 00:12:46 hp-dl385pg8-03 automount[11051]: parse_mount: parse(sun): core of entry: options=fstype=nfs4, loc=[fe80::0:4257:213:20ff:fefb:4d96%em1]:/exports/home
Dec  3 00:12:46 hp-dl385pg8-03 automount[11051]: sun_mount: parse(sun): mounting root /mnt/bz753964, mountpoint scratchv6l, what [fe80::0:4257:213:20ff:fefb:4d96%em1]:/exports/home, fstype nfs4, options
Dec  3 00:12:46 hp-dl385pg8-03 automount[11051]: mount_mount: mount(nfs): root=/mnt/bz753964 name=scratchv6l what=[fe80::0:4257:213:20ff:fefb:4d96%em1]:/exports/home, fstype=nfs4, options=
Dec  3 00:12:46 hp-dl385pg8-03 automount[11051]: mount_mount: mount(nfs): nfs options="", nobind=0, nosymlink=0, ro=0
Dec  3 00:12:46 hp-dl385pg8-03 automount[11051]: get_nfs_info: called with host [fe80::0:4257:213:20ff:fefb:4d96%em1](fe80::4257:213:20ff:fefb:4d96) proto 6 version 0x40
Dec  3 00:12:49 hp-dl385pg8-03 automount[11051]: mount(nfs): no hosts available
Dec  3 00:12:49 hp-dl385pg8-03 automount[11051]: dev_ioctl_send_fail: token = 3
Dec  3 00:12:49 hp-dl385pg8-03 automount[11051]: failed to mount /mnt/bz753964/scratchv6l

Comment 11 Ian Kent 2013-12-03 08:24:55 UTC
What does this do?
        run 'ServerIPv6nfs=`ssh ${SERVER} getDefaultIp 6nfs`'

Comment 12 JianHong Yin 2013-12-03 08:38:06 UTC
(In reply to Ian Kent from comment #11)
> What does this do?
>         run 'ServerIPv6nfs=`ssh ${SERVER} getDefaultIp 6nfs`'

1. this is a multihost test, get the server's ipv6 address:
  the getDefaultIp commands get the Ip address of the default NIC;
  getDefaultIp 6     #get the <ipv6 address>
  getDefaultIp 6nfs  #get the <ipv6 address>%<NIC> format for nfs.

2. now in this test case, I forge a local fe80:: address, for test the local ipv6
   and I just grep the 'automount[]: mount_mount: mount(nfs): ' if match test OK:
        run '>/var/log/messages' -
        run 'timeLimitRun 180 ls -l /mnt/${TESTNAME}/scratchv6l' -
        run 'cat /var/log/messages | grep "automount\[[0-9]\+\]: *mount_mount: *mount(nfs):"'
        [ $? != 0 ] && run 'cat /var/log/messages' -

Comment 13 Ian Kent 2013-12-03 09:04:05 UTC
(In reply to Yin.JianHong from comment #12)
> (In reply to Ian Kent from comment #11)
> > What does this do?
> >         run 'ServerIPv6nfs=`ssh ${SERVER} getDefaultIp 6nfs`'
> 
> 1. this is a multihost test, get the server's ipv6 address:
>   the getDefaultIp commands get the Ip address of the default NIC;
>   getDefaultIp 6     #get the <ipv6 address>
>   getDefaultIp 6nfs  #get the <ipv6 address>%<NIC> format for nfs.

I don't see how this can get the nic on the client which needs
to be used to send out the request.

The nic might be the same on the client as it is on the server
but that's often not the case for checked out machines.

IIUC link local addresses must be usable in the absence of a
router on the network, hence the target (server) address and
the source (client) interface, the where to send the packets,
must be supplied.

The machines I checked out to test this certainly didn't have
the same interface names and it worked for me. I'm checking out
two machines again to make sure.

Comment 14 Ian Kent 2013-12-03 09:47:46 UTC
(In reply to Ian Kent from comment #13)
> (In reply to Yin.JianHong from comment #12)
> > (In reply to Ian Kent from comment #11)
> > > What does this do?
> > >         run 'ServerIPv6nfs=`ssh ${SERVER} getDefaultIp 6nfs`'
> > 
> > 1. this is a multihost test, get the server's ipv6 address:
> >   the getDefaultIp commands get the Ip address of the default NIC;
> >   getDefaultIp 6     #get the <ipv6 address>
> >   getDefaultIp 6nfs  #get the <ipv6 address>%<NIC> format for nfs.
> 
> I don't see how this can get the nic on the client which needs
> to be used to send out the request.
> 
> The nic might be the same on the client as it is on the server
> but that's often not the case for checked out machines.
> 
> IIUC link local addresses must be usable in the absence of a
> router on the network, hence the target (server) address and
> the source (client) interface, the where to send the packets,
> must be supplied.

I think I've lead you astray here a bit.

I'm not certain about this link local stuff but ...

Using the link local address is probably not useful at all for
testing since we often get hosts that are on a different subnets
so the link local addresses can't work (they aren't routed).

I think it's more sensible to select the address of the default
interface that's marked as global to get IPv6 testing to function
reliably.

> 
> The machines I checked out to test this certainly didn't have
> the same interface names and it worked for me. I'm checking out
> two machines again to make sure.

The two machines I just checked out were on different subnets so
I couldn't even ping6 one to the other.

Using the IPv6 address marked global worked fine for ping6 and
automounting with revision 37 worked fine, and would probably
work with 35 too since it doesn't require an interface to be
given.

I think the patch here should remain for people that do want to
use link local addresses but as for out testing I'm not sure what
to do.

Ian

Comment 15 JianHong Yin 2013-12-04 02:21:58 UTC
(In reply to Ian Kent from comment #14)
> (In reply to Ian Kent from comment #13)
> > (In reply to Yin.JianHong from comment #12)
> > > (In reply to Ian Kent from comment #11)
> > > > What does this do?
> > > >         run 'ServerIPv6nfs=`ssh ${SERVER} getDefaultIp 6nfs`'
> > > 
> > > 1. this is a multihost test, get the server's ipv6 address:
> > >   the getDefaultIp commands get the Ip address of the default NIC;
> > >   getDefaultIp 6     #get the <ipv6 address>
> > >   getDefaultIp 6nfs  #get the <ipv6 address>%<NIC> format for nfs.
> > 
> > I don't see how this can get the nic on the client which needs
> > to be used to send out the request.
> > 
> > The nic might be the same on the client as it is on the server
> > but that's often not the case for checked out machines.
> > 
> > IIUC link local addresses must be usable in the absence of a
> > router on the network, hence the target (server) address and
> > the source (client) interface, the where to send the packets,
> > must be supplied.
> 
> I think I've lead you astray here a bit.
> 
> I'm not certain about this link local stuff but ...
> 
> Using the link local address is probably not useful at all for
> testing since we often get hosts that are on a different subnets
> so the link local addresses can't work (they aren't routed).
> 
> I think it's more sensible to select the address of the default
> interface that's marked as global to get IPv6 testing to function
> reliably.
> 
> > 
> > The machines I checked out to test this certainly didn't have
> > the same interface names and it worked for me. I'm checking out
> > two machines again to make sure.
> 
> The two machines I just checked out were on different subnets so
> I couldn't even ping6 one to the other.
> 
> Using the IPv6 address marked global worked fine for ping6 and
> automounting with revision 37 worked fine, and would probably
> work with 35 too since it doesn't require an interface to be
> given.
> 
> I think the patch here should remain for people that do want to
> use link local addresses but as for out testing I'm not sure what
> to do.
> 
> Ian

Got it, I will learn some knowledge about IPv6 local link by google.

getDefaultIp has the third argument, I will use it to confirm the test condition
$(getDefaultIp 6 global)     #this mount ok
$(getDefaultIp 6nfs link)    #this just check the messages
                              see if get root= name= what= OK.
right?

Comment 16 Ian Kent 2013-12-04 03:07:11 UTC
(In reply to Yin.JianHong from comment #15)
> (In reply to Ian Kent from comment #14)
> > (In reply to Ian Kent from comment #13)
> > > (In reply to Yin.JianHong from comment #12)
> > > > (In reply to Ian Kent from comment #11)
> > > > > What does this do?
> > > > >         run 'ServerIPv6nfs=`ssh ${SERVER} getDefaultIp 6nfs`'
> > > > 
> > > > 1. this is a multihost test, get the server's ipv6 address:
> > > >   the getDefaultIp commands get the Ip address of the default NIC;
> > > >   getDefaultIp 6     #get the <ipv6 address>
> > > >   getDefaultIp 6nfs  #get the <ipv6 address>%<NIC> format for nfs.
> > > 
> > > I don't see how this can get the nic on the client which needs
> > > to be used to send out the request.
> > > 
> > > The nic might be the same on the client as it is on the server
> > > but that's often not the case for checked out machines.
> > > 
> > > IIUC link local addresses must be usable in the absence of a
> > > router on the network, hence the target (server) address and
> > > the source (client) interface, the where to send the packets,
> > > must be supplied.
> > 
> > I think I've lead you astray here a bit.
> > 
> > I'm not certain about this link local stuff but ...
> > 
> > Using the link local address is probably not useful at all for
> > testing since we often get hosts that are on a different subnets
> > so the link local addresses can't work (they aren't routed).
> > 
> > I think it's more sensible to select the address of the default
> > interface that's marked as global to get IPv6 testing to function
> > reliably.
> > 
> > > 
> > > The machines I checked out to test this certainly didn't have
> > > the same interface names and it worked for me. I'm checking out
> > > two machines again to make sure.
> > 
> > The two machines I just checked out were on different subnets so
> > I couldn't even ping6 one to the other.
> > 
> > Using the IPv6 address marked global worked fine for ping6 and
> > automounting with revision 37 worked fine, and would probably
> > work with 35 too since it doesn't require an interface to be
> > given.
> > 
> > I think the patch here should remain for people that do want to
> > use link local addresses but as for out testing I'm not sure what
> > to do.
> > 
> > Ian
> 
> Got it, I will learn some knowledge about IPv6 local link by google.
> 
> getDefaultIp has the third argument, I will use it to confirm the test
> condition
> $(getDefaultIp 6 global)     #this mount ok
> $(getDefaultIp 6nfs link)    #this just check the messages
>                               see if get root= name= what= OK.
> right?

Not quite.

automount will not be able to probe availability of these when
they aren't reachable so you should get the "no hosts available"
message and no mount attempt.

That's what the probe is for, to prevent long waits for mount
attempts to timeout.

Ian

Comment 17 JianHong Yin 2013-12-04 03:20:23 UTC
> > Got it, I will learn some knowledge about IPv6 local link by google.
> > 
> > getDefaultIp has the third argument, I will use it to confirm the test
> > condition
> > $(getDefaultIp 6 global)     #this mount ok
> > $(getDefaultIp 6nfs link)    #this just check the messages
> >                               see if get root= name= what= OK.
> > right?
> 
> Not quite.
> 
> automount will not be able to probe availability of these when
> they aren't reachable so you should get the "no hosts available"
> message and no mount attempt.
> 
> That's what the probe is for, to prevent long waits for mount
> attempts to timeout.

yes I see. I have added condition for the test, to ensure the addr available
[ -n "$ServerIPv6g" ] && {
        run '>/var/log/messages' -
        run 'timeLimitRun 180 ls -l /mnt/${TESTNAME}/scratchv6g' -
        ...judge
}
[ -n "$ServerIPv6l" ] && {
        run '>/var/log/messages' -
        run 'timeLimitRun 180 ls -l /mnt/${TESTNAME}/scratchv6l' -
        ...judge
}

> 
> Ian

Comment 18 JianHong Yin 2013-12-04 03:26:43 UTC
verified in autofs-5.0.7-37.el7 at 'RHBA-2013:16105'
https://beaker.engineering.redhat.com/jobs/555498

Comment 19 Ludek Smid 2014-06-13 10:18:30 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.