testmii doesn't work unless the interface is configured

Bug #1813 reported by John Fettig
4
Affects Status Importance Assigned to Milestone
whereami (Debian)
Fix Released
Unknown
whereami (Ubuntu)
Fix Released
Low
MOTU

Bug Description

Unless the interface being tested is configured (ifconfig $if up), testmii will not work properly.

I put a check in to make sure the
interfaces is up. The test does "sleep 10" because
ifconfig returns before the interface is actually ready to be tested. 5
was too short -- testmii will work after 5 but testarp won't. Didn't
test to find the absolute shortest time. It would be nice if there was
some way to force ifconfig to wait until the interface is usable before
returning.

This is documented in the forums as well -- http://ubuntuforums.org/showthread.php?p=309224#post309224

Revision history for this message
In , Daniel Bonniot (bonniot) wrote : whereami: +1

Package: whereami
Version: 0.3.20
Followup-For: Bug #285703

I ran into the same situation, and I agree this would be a very convenient feature.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.11-1-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages whereami depends on:
ii debconf 1.4.30.13 Debian configuration management sy
ii iputils-ping 3:20020927-2 Tools to test the reachability of
ii netbase 4.21 Basic TCP/IP networking system
ii perl 5.8.4-8 Larry Wall's Practical Extraction

-- debconf information excluded

Revision history for this message
In , Andrew McMillan (andrew-catalyst) wrote : whereami, testmii and Sun Gem NIC

Hi,

I've added the relevant "ifconfig $1 up" to testmii in the
next-to-be-released whereami, but some testing suggests that this might
screw up other network cards that are currently working :-(

Do you think this problem is specific to the Sun Gem NIC? I could
perhaps detect this type of NIC specifically and only do the ifconfig up
if necessary?

Cheers,
     Andrew.

-------------------------------------------------------------------------
Andrew @ Catalyst .Net .NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
DDI: +64(4)803-2201 MOB: +64(272)DEBIAN OFFICE: +64(4)499-2267
                 http://survey.net.nz/ - any questions?
-------------------------------------------------------------------------

Revision history for this message
In , Daniel Bonniot (daniel-bonniot) wrote :

Andrew McMillan wrote:
> Hi,
>
> I've added the relevant "ifconfig $1 up" to testmii in the
> next-to-be-released whereami, but some testing suggests that this might
> screw up other network cards that are currently working :-(
>
> Do you think this problem is specific to the Sun Gem NIC? I could
> perhaps detect this type of NIC specifically and only do the ifconfig up
> if necessary?

No, I also need the ifconfig up on my laptop, with a "Broadcom 4400
10/100BaseT Ethernet" card.

The question is, which group should be listed? Those that need the ifconfig
up, or those that can't bear it? Or could the bug be tracked to individual
card drivers?

Daniel

Revision history for this message
In , Wouter Verhelst (wouter) wrote :

On Wed, Jun 01, 2005 at 08:02:37AM +1200, Andrew McMillan wrote:
> Hi,
>
> I've added the relevant "ifconfig $1 up" to testmii in the
> next-to-be-released whereami, but some testing suggests that this might
> screw up other network cards that are currently working :-(

That sucks.

> Do you think this problem is specific to the Sun Gem NIC?

Frankly, I don't know. This is the first laptop on which I'm using
whereami :-)

> I could perhaps detect this type of NIC specifically and only do the
> ifconfig up if necessary?

Or perhaps make it configurable? A syntax like

testmii eth0,up lan

could mean that before testing the mii, the script has to bring up the
network card (and wait a short while (about a second) for the hardware
to finish its negotiation), whereas it would default to the current
behaviour if that option would not be specified.

--
The amount of time between slipping on the peel and landing on the
pavement is precisely one bananosecond

Revision history for this message
John Fettig (jfettig) wrote :

Unless the interface being tested is configured (ifconfig $if up), testmii will not work properly.

I put a check in to make sure the
interfaces is up. The test does "sleep 10" because
ifconfig returns before the interface is actually ready to be tested. 5
was too short -- testmii will work after 5 but testarp won't. Didn't
test to find the absolute shortest time. It would be nice if there was
some way to force ifconfig to wait until the interface is usable before
returning.

This is documented in the forums as well -- http://ubuntuforums.org/showthread.php?p=309224#post309224

Changed in whereami:
assignee: nobody → motu
Revision history for this message
In , Hubert Chathi (uhoreg) wrote : these bugs were fixed in whereami 0.3.21

Version 0.3.21

These bugs were fixed in whereami 0.3.21, but apparently the BTS was
never told about it. Here is the changelog entry for 0.3.21:

whereami (0.3.21) unstable; urgency=low

   * Remove stuff from /var/lib/whereami in prerm.
   * Add pointer in README to mailing lists that are now setup.
   * Daniel Bonniot supplied a fix to make dhclient3 exit in a manner
that is
     appropriate for whereami (closes: #308980).
   * The testmii script will now bring up the interface before checking
to see
     if there really is a network connection (closes: #285703).
   * Patched html docs (man pages are still better) (closes: #177873).
   * Added /usr/local/share/whereami to path (closes: #288718)
   * Added $scriptbase/actions to path, moved actions in there and
symlinked
     back to their old locations. (closes: #177906)
   * Added a '!location' flag in whereami.conf to indicate "not in this
     location" kinds of actions. (closes: #194060)
   * Added "iwconfig essid on" to testap/testssid (closes: #309279)
   * Man pages and examples updated (closes: #178235)
   * Applied patch from Peter Koellner to allow quoting of parameters
to test
     scripts in detect.conf.
   * Added "setproxy" script to work with Squid proxies as well as Oops
ones.

  -- Andrew McMillan <email address hidden> Sun, 19 Jun 2005
22:11:55 +1200

--
Hubert Chan <email address hidden> - http://www.uhoreg.ca/
PGP/GnuPG key: 1024D/124B61FA
Fingerprint: 96C5 012F 5F74 A5F7 1FF7 5291 AF29 C719 124B 61FA
Key available at wwwkeys.pgp.net. Encrypted e-mail preferred.

Revision history for this message
Daniel Robitaille (robitaille) wrote :

According to the changelogs, this was fixed with version 0.3.21:

whereami (0.3.21) unstable; urgency=low

  * Remove stuff from /var/lib/whereami in prerm.
  * Add pointer in README to mailing lists that are now setup.
  * Daniel Bonniot supplied a fix to make dhclient3 exit in a manner that is
    appropriate for whereami (closes: #308980).
  * The testmii script will now bring up the interface before checking to see
    if there really is a network connection (closes: #285703).
  * Patched html docs (man pages are still better) (closes: #177873).
  * Added /usr/local/share/whereami to path (closes: #288718)
  * Added $scriptbase/actions to path, moved actions in there and symlinked
    back to their old locations. (closes: #177906)
  * Added a '!location' flag in whereami.conf to indicate "not in this
    location" kinds of actions. (closes: #194060)
  * Added "iwconfig essid on" to testap/testssid (closes: #309279)
  * Man pages and examples updated (closes: #178235)
  * Applied patch from Peter Koellner to allow quoting of parameters to test
    scripts in detect.conf.
  * Added "setproxy" script to work with Squid proxies as well as Oops ones.

 -- Andrew McMillan <email address hidden> Sun, 19 Jun 2005 22:11:55 +1200

So this means this bug should be solved starting with Ubuntu Dapper (currently contains 0.3.28). I'll mark this report fixed. Please re-open if you find that this problem is still present in Dapper.

Changed in whereami:
status: Unconfirmed → Fix Released
Revision history for this message
John Fettig (jfettig) wrote :

Now that I have upgraded to dapper, I would like to point out a couple of things:

1) even though the changelog shows this change as happening, no such change took place in /usr/share/whereami/tests/testmii

2) it's not enough to simply bring up the interface. you have to wait until it is ready, which on my laptop is not until about 10 seconds after ifconfig returns.

So I think reopening this bug is appropriate.

Revision history for this message
Daniel Robitaille (robitaille) wrote :

re-opening this bug report

Changed in whereami:
status: Fix Released → Unconfirmed
Paul Dufresne (paulduf)
Changed in whereami:
status: Unconfirmed → Confirmed
Revision history for this message
Daniel T Chen (crimsun) wrote :

Not resolved in Debian, unfortunately, and the issue seems a bit trickier than upon initial glance. Deferring to Feisty.

Changed in whereami:
importance: Medium → Low
Revision history for this message
Steve Kowalik (stevenk) wrote :

This has been fixed in version 0.3.32, which was uploaded to Feisty.

Changed in whereami:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.