Karl Leake(disabled)
|
minor fault in the QNX4 Net manager
|
Karl Leake(disabled)
09/30/2009 3:02 AM
post39037
|
minor fault in the QNX4 Net manager
We have uncovered a minor fault in the QNX4 Net manager,
for all recent versions.
The -m switch that sets the network mapping entry is ignored when the Net manager is built into a boot file.
The cause being that talking marks around the mapping entry are not stripped by the buildqnx utility,
and the Net manager ignores entries with talking marks included.
for example
if we enter a net command from a shell we get
Net -m "1 1 00008c 123456" &
sin -P Net arg
Net -m 1 1 00008c 123456
but when the Net manager is started from the boot file
sin -P Net arg
Net -m "1 1 00008c 123456"
and a netmap command shows the mapping entry missing.
In our case a diskless workstation does not boot until it receives some other message from the boot server
and adds its netmap entry automatically to the table.
If nameloc has stopped polling the network this can be a reasonable amount of time.
Karl.
|
|
|
Oleg Bolshakov
|
Re: minor fault in the QNX4 Net manager
|
Oleg Bolshakov
09/30/2009 12:02 PM
post39100
|
Re: minor fault in the QNX4 Net manager
Hi Karl,
I'll answer you after full testing.
--
Respectfully,
Oleg
> We have uncovered a minor fault in the QNX4 Net manager,
> for all recent versions.
> The -m switch that sets the network mapping entry is ignored when the
> Net manager is built into a boot file.
>
> The cause being that talking marks around the mapping entry are not
> stripped by the buildqnx utility, and the Net manager ignores entries
> with talking marks included.
>
> for example
> if we enter a net command from a shell we get
> Net -m "1 1 00008c 123456" &
> sin -P Net arg
> Net -m 1 1 00008c 123456
>
> but when the Net manager is started from the boot file
> sin -P Net arg
> Net -m "1 1 00008c 123456"
>
> and a netmap command shows the mapping entry missing.
>
> In our case a diskless workstation does not boot until it receives some
> other message from the boot server and adds its netmap entry
> automatically to the table.
> If nameloc has stopped polling the network this can be a reasonable
> amount of time.
>
> Karl.
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post39037
>
|
|
|
Oleg Bolshakov
|
Re: minor fault in the QNX4 Net manager
|
Oleg Bolshakov
09/30/2009 2:38 PM
post39119
|
Re: minor fault in the QNX4 Net manager
Hi Karl,
I've found solution for your problem. You need set number of node mapping
elements (use -n option with Net). Auto detect of number of nodes doesn't
working until sinit is started. So add following line to your build file
(use appropriate value for -n):
Net -m "1 1 00008c 123456" -n 20
--
Respectfully,
Oleg
> We have uncovered a minor fault in the QNX4 Net manager,
> for all recent versions.
> The -m switch that sets the network mapping entry is ignored when the
> Net manager is built into a boot file.
>
> The cause being that talking marks around the mapping entry are not
> stripped by the buildqnx utility, and the Net manager ignores entries
> with talking marks included.
>
> for example
> if we enter a net command from a shell we get
> Net -m "1 1 00008c 123456" &
> sin -P Net arg
> Net -m 1 1 00008c 123456
>
> but when the Net manager is started from the boot file
> sin -P Net arg
> Net -m "1 1 00008c 123456"
>
> and a netmap command shows the mapping entry missing.
>
> In our case a diskless workstation does not boot until it receives some
> other message from the boot server and adds its netmap entry
> automatically to the table.
> If nameloc has stopped polling the network this can be a reasonable
> amount of time.
>
> Karl.
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post39037
>
|
|
|
Karl Leake(disabled)
|
Re: minor fault in the QNX4 Net manager
|
Karl Leake(disabled)
09/30/2009 8:50 PM
post39149
|
Re: minor fault in the QNX4 Net manager
Hi Oleg,
Actually we are already using the -n switch (-n100)
and this does not have any effect on the -m "..."
switch being ignored.
The mapping entry only gets added after packets are received.
If no packets are received the machine will sit waiting....
Try testing with no nameloc.
Sometimes when our customers boot lots of nodes at once
nameloc can become stuck. ( ie waiting on a missing reply )
Karl.
|
|
|
Oleg Bolshakov
|
Re: minor fault in the QNX4 Net manager
|
Oleg Bolshakov
10/01/2009 2:52 AM
post39152
|
Re: minor fault in the QNX4 Net manager
Hi Karl,
Please post here your build file and output of sin ver utility. Note that I
didn't start network driver (and nameloc) on some my tests, so packets are
not received any way.
--
Respectfully,
Oleg
> Hi Oleg,
>
> Actually we are already using the -n switch (-n100)
> and this does not have any effect on the -m "..."
> switch being ignored.
> The mapping entry only gets added after packets are received.
> If no packets are received the machine will sit waiting....
>
> Try testing with no nameloc.
> Sometimes when our customers boot lots of nodes at once
> nameloc can become stuck. ( ie waiting on a missing reply )
>
> Karl.
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post39149
>
|
|
|
Karl Leake
|
Re: minor fault in the QNX4 Net manager
|
Karl Leake
10/04/2009 10:59 PM
post39338
|
Re: minor fault in the QNX4 Net manager
Hi Oleg,
From a diskless node that was sitting waiting...
--- sin ve -- cut ---
PROGRAM NAME VERSION DATE
sys/Proc32 Proc 4.25Q Jul 18 2005
sys/Proc32 Slib16 4.23G Oct 04 1996
sys/Slib32 Slib32 4.24B Aug 12 1997
/bin/Net Net 4.25G Jul 06 2009
/bin/Net.rtl Net.rtl 4.25D Jun 28 2009
--- sin ve -- cut ---
also
--- sin arg -- cut ---
PID USER NAME ARGUMENTS
1 System Proc32 -l11
2 System Slib32
4 System Net -n100 -m "1 1 00008C00E9C6"
5 System Net.rtl -l1
6 System Not available.
7 System Not available.
--- sin arg -- cut ---
Karl.
|
|
|
Oleg Bolshakov
|
Re: minor fault in the QNX4 Net manager
|
Oleg Bolshakov
10/05/2009 9:37 AM
post39366
|
Re: minor fault in the QNX4 Net manager
Hi Karl,
I still can't reproduce your error. I've prepared PC which has
configuration as similar to yours as possible. No namelock was started on
both nodes.
What version of software products are installed on your 1st node?
--
Respectfully,
Oleg
> Hi Oleg,
>
> >From a diskless node that was sitting waiting...
>
> --- sin ve -- cut ---
> PROGRAM NAME VERSION DATE
> sys/Proc32 Proc 4.25Q Jul 18 2005
> sys/Proc32 Slib16 4.23G Oct 04 1996
> sys/Slib32 Slib32 4.24B Aug 12 1997
> /bin/Net Net 4.25G Jul 06 2009
> /bin/Net.rtl Net.rtl 4.25D Jun 28 2009
> --- sin ve -- cut ---
>
> also
>
> --- sin arg -- cut ---
> PID USER NAME ARGUMENTS
> 1 System Proc32 -l11
> 2 System Slib32
> 4 System Net -n100 -m "1 1 00008C00E9C6"
> 5 System Net.rtl -l1
> 6 System Not available.
> 7 System Not available.
> --- sin arg -- cut ---
>
> Karl.
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post39338
>
|
|
|
Karl Leake
|
Re: minor fault in the QNX4 Net manager
|
Karl Leake
10/05/2009 8:30 PM
post39406
|
Re: minor fault in the QNX4 Net manager
Hi Oleg,
I've setup two small vmware virtual machines one with a file system (the core node),
and one with just a pre-build boot file (the boot node - /boot/build/ws32.ether2100).
If you open both in vmware and add qnx/tcprt licenses to the core node,
the boot node doesn't start up a login prompt until it receives a packet from the core node (start nameloc).
The vmware images can be found at http://users.tpg.com.au/kleake/qnx-oleg.zip
Karl.
|
|
|
Oleg Bolshakov
|
Re: minor fault in the QNX4 Net manager
|
Oleg Bolshakov
10/06/2009 1:11 PM
post39441
|
Re: minor fault in the QNX4 Net manager
Hi Karl,
Thanks for vmware images. It helps. ;-} I think I've found error in your build file. Try to quote the $(netmap) variable
:
-----
/bin/Net
$ Net -n100 -m "$(netmap)"
-----
Respectfully,
Oleg
> Hi Oleg,
>
> I've setup two small vmware virtual machines one with a file system (the core
> node),
> and one with just a pre-build boot file (the boot node - /boot/build/ws32.
> ether2100).
>
> If you open both in vmware and add qnx/tcprt licenses to the core node,
> the boot node doesn't start up a login prompt until it receives a packet from
> the core node (start nameloc).
>
> The vmware images can be found at http://users.tpg.com.au/kleake/qnx-oleg.zip
>
> Karl.
|
|
|
Karl Leake
|
Re: minor fault in the QNX4 Net manager
|
Karl Leake
10/06/2009 10:06 PM
post39471
|
Re: minor fault in the QNX4 Net manager
Hi Oleg,
That doesn't seem to work because the shell will strip the new quotes off
and then buildqnx will replace $(netmap) with the netmap environment variable which
includes it's own quotes
"1 1 000c297700f4"
tftpd does something like
sprintf ( string, "netmap=\"%d %d %s\"", node, lan, mac_address );
putenv ( string );
// then runs a shell to build the boot image
I can work around this though if I change my bootptab file from
:bf=|cd /boot; buildqnx -b0x10000 build/ws32.ether2100 | mkQNXnbi:
to
:bf=|cd /boot; fix -b0x10000 build/ws32.ether2100 | mkQNXnbi:
where fix strips all the quotes from the environment variable netmap
---cut--- fix.c --
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <env.h>
void main ( int argc, char **argv, char **envp )
{
char *ptr;
char *str;
char *quote;
if ( ptr = getenv ( "netmap" ) ) {
str = strdup ( ptr );
while ( quote = strchr ( str, 0x22 ) ) {
*quote = 0x20;
}
setenv ( "netmap", str, -1 );
free ( str );
}
execve ( "/bin/buildqnx", argv, envp );
}
---cut--- fix.c --
Thanks,
Karl.
|
|
|
Karl Leake
|
Re: minor fault in the QNX4 Net manager
|
Karl Leake
10/06/2009 10:33 PM
post39472
|
Re: minor fault in the QNX4 Net manager
Hi Oleg,
I should have said buildqnx strips the new quotes off.
If you are still interested I have updated the virtual machines to do a full bootp/tftpd boot, and have included the
binary to strip off the offending quotes.
http://users.tpg.com.au/kleake/qnx-bootp-oleg.zip
Karl.
|
|
|
Oleg Bolshakov
|
Re: minor fault in the QNX4 Net manager
|
Oleg Bolshakov
10/07/2009 4:42 AM
post39479
|
Re: minor fault in the QNX4 Net manager
Hi Karl,
To sure that all works fine you can create simple build file without using
environment variables. Also you can add netmap utility to your build file
and look at the output while booting. So there are no problems with Net,
buildqnx and others.
Please note you can use command line arguments instead of environment
variables. Followed commands creates equivalent boot images:
lnode=2 netmap="1 1 000C297700F4" buildqnx -v /boot/build/ws32.ether2100
buildqnx -v lnode=2 netmap="1 1 000C297700F4" /boot/build/ws32.ether2100
In first case we set lnode and netmap environment variables. In second case
we pass lnode and netmap via command line argument. In both cases Boot
Node boots fine.
How do you set netmap environment variable? I think there is no need to
use your fix program.
--
Respectfully,
Oleg
> Hi Oleg,
>
> That doesn't seem to work because the shell will strip the new quotes
> off and then buildqnx will replace $(netmap) with the netmap
> environment variable which includes it's own quotes
> "1 1 000c297700f4"
>
> tftpd does something like
>
> sprintf ( string, "netmap=\"%d %d %s\"", node, lan, mac_address );
> putenv ( string );
> // then runs a shell to build the boot image
>
> I can work around this though if I change my bootptab file from
>
> :bf=|cd /boot; buildqnx -b0x10000 build/ws32.ether2100 | mkQNXnbi:
>
> to
>
> :bf=|cd /boot; fix -b0x10000 build/ws32.ether2100 | mkQNXnbi:
>
> where fix strips all the quotes from the environment variable netmap
>
> ---cut--- fix.c --
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <env.h>
>
> void main ( int argc, char **argv, char **envp )
> {
> char *ptr;
> char *str;
> char *quote;
>
> if ( ptr = getenv ( "netmap" ) ) {
>
> str = strdup ( ptr );
>
> while ( quote = strchr ( str, 0x22 ) ) {
> *quote = 0x20;
> }
> setenv ( "netmap", str, -1 );
> free ( str );
> }
>
> execve ( "/bin/buildqnx", argv, envp );
> }
> ---cut--- fix.c --
>
> Thanks,
> Karl.
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post39471
>
|
|
|
Karl Leake
|
Re: minor fault in the QNX4 Net manager
|
Karl Leake
10/07/2009 10:10 PM
post39569
|
Re: minor fault in the QNX4 Net manager
Hi Oleg,
We let tftpd set the netmap environment variable automatically.
Just to clarify we only see the fault when we are using bootpd/tftpd to dynamically build a boot file.
Also the etherboot boot rom that we use seems to have a limit of about 80 characters for the build string that bootpd
passes,
so we are a bit limited in how much extra script can be added in.
Karl.
|
|
|
Oleg Bolshakov
|
Re: minor fault in the QNX4 Net manager
|
Oleg Bolshakov
10/08/2009 8:14 AM
post39582
|
Re: minor fault in the QNX4 Net manager
Hi Karl,
Please provide me more detailed information how you set netmap environment
variable. Also post output of the echo $netmap utility.
You can create shell script which will build appropriate boot image
according to command line arguments.
PS1: In previous post I've made a mistake with buildqnx command lines.
Correct lines are:
lnode=2 netmap="1 1 000C297700F4" buildqnx -v /boot/build/ws32.ether2100 \
/boot/images/ws32.ether2100
buildqnx -v lnode=2 netmap="1 1 000C297700F4" /boot/build/ws32.ether2100 \
/boot/images/ws32.ether2100
--
Respectfully,
Oleg
> Hi Oleg,
>
> We let tftpd set the netmap environment variable automatically.
>
> Just to clarify we only see the fault when we are using bootpd/tftpd to
> dynamically build a boot file.
>
> Also the etherboot boot rom that we use seems to have a limit of about
> 80 characters for the build string that bootpd passes, so we are a bit
> limited in how much extra script can be added in.
>
> Karl.
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post39569
>
|
|
|
|