Thank you Clay. Do you think there might be a need to explicitly state that the image_path entry in the SMF service is bad when the '-t' flag is not supplied, or will the users be able to figure it out? I'm concerned that getting a message about "/some/path is not valid" when /some/path was not supplied at the command line might be confusing, but I could be over thinking this.
- Keith Clay Baenziger wrote: > Hi Keith, > I should have included my test cases which I'd sent only to Ethan. > They're below, see under Pathological cases for your questions. > Thank you, > Clay > > Test cases: > ----------- > All commands based off installadm create-client -e c0:ff:ee:c0:ff:ee > [options]. Where [options] are: > -n <existant service> > jack at footest:~# installadm create-client -e c0:ff:ee:c0:ff:ee -n > test > Setting up SPARC client... > Creating SPARC configuration file > > Detected that DHCP is not set up on this server. > If not already configured, please create a DHCP macro > named 01C0FFEEC0FFEE with: > Boot server IP (BootSrvA) : 172.20.24.42 > Boot file (BootFile) : > http://172.20.24.42:5555/cgi-bin/wanboot-cgi > If you are running Sun's DHCP server, use the following > command to add the DHCP macro, 01C0FFEEC0FFEE: > /usr/sbin/dhtadm -g -A -m 01C0FFEEC0FFEE -d > :BootSrvA=172.20.24.42:BootFile=\ > "http://172.20.24.42:5555/cgi-bin/wanboot-cgi\": > > Note: Be sure to assign client IP address(es) if needed > (e.g., if running Sun's DHCP server, run pntadm(1M)). > > -n <non-existant service> > jack at footest:~# installadm create-client -e c0:ff:ee:c0:ff:ee -n > test1 > create-client: Service does not exist: test1 > > -n <existant service> -t <existant dir> > jack at footest:~# installadm create-client -e c0:ff:ee:c0:ff:ee -n > test -t > /var/ai/test > Setting up SPARC client... > Creating SPARC configuration file > > Detected that DHCP is not set up on this server. > If not already configured, please create a DHCP macro > named 01C0FFEEC0FFEE with: > Boot server IP (BootSrvA) : 172.20.24.42 > Boot file (BootFile) : > http://172.20.24.42:5555/cgi-bin/wanboot-cgi > If you are running Sun's DHCP server, use the following > command to add the DHCP macro, 01C0FFEEC0FFEE: > /usr/sbin/dhtadm -g -A -m 01C0FFEEC0FFEE -d > :BootSrvA=172.20.24.42:BootFile=\ > "http://172.20.24.42:5555/cgi-bin/wanboot-cgi\": > > Note: Be sure to assign client IP address(es) if needed > (e.g., if running Sun's DHCP server, run pntadm(1M)). > > -n <non-existant service> -t <non-existant dir> > [unchanged behavior] > jack at footest:~# installadm create-client -e c0:ff:ee:c0:ff:ee -n > test1 -t > /var/ai/lakdjf > create-client: Install image directory /var/ai/lakdjf does not > exist. > > -n <non-existant service> -t <existant dir> > [unchanged behavior] > jack at footest:~# installadm create-client -e c0:ff:ee:c0:ff:ee -n > test1 -t > /var/ai/test > create-client: Service does not exist: test1 > > [Pathological cases] > -------------------- > -n <existant service (but with invalid image_path SMF entry)> > jack at footest:~# installadm create-client -e c0:ff:ee:c0:ff:ee -n > test > [unchanged behavior] > create-client: Install image directory /var/ai/foobar does not > exist. > > -n <existant service (but with no image_path SMF entry)> > jack at footest:~# installadm create-client -e c0:ff:ee:c0:ff:ee -n > test1 > create-client: Image-path record for service test1 is missing. > > -n <existant service> -t <existant but invalid dir> > [unchanged behavior] > root at jumprope:~# installadm create-client -e c0:ff:ee:c0:ff:ee -n > clay_ai_sparc -t /tmp/ > create-client: /tmp//solaris.zlib does not exist. The specified > image is not an OpenSolaris image. > > -n <existant service (but with invalid image_path SMF entry)> -t > <existant > dir> > [unchanged behavior] > jack at footest:~# installadm create-client -e c0:ff:ee:c0:ff:ee -n > test -t /var/ai/test > Setting up SPARC client... > Creating SPARC configuration file > > Detected that DHCP is not set up on this server. > If not already configured, please create a DHCP macro > named 01C0FFEEC0FFEE with: > Boot server IP (BootSrvA) : 172.20.24.42 > Boot file (BootFile) : > http://172.20.24.42:5555/cgi-bin/wanboot-cgi > If you are running Sun's DHCP server, use the following > command to add the DHCP macro, 01C0FFEEC0FFEE: > /usr/sbin/dhtadm -g -A -m 01C0FFEEC0FFEE -d > :BootSrvA=172.20.24.42:BootFile=\ > "http://172.20.24.42:5555/cgi-bin/wanboot-cgi\": > > Note: Be sure to assign client IP address(es) if needed > (e.g., if running Sun's DHCP server, run pntadm(1M)). > > On Wed, 18 Nov 2009, Keith Mitchell wrote: > >> Hi Clay, >> >> The new logic looks good to me. What error message will the user get >> if they don't specify image-path, and image-path is set improperly in >> the SMF service (either a non-existent directory, or a directory >> without a solaris.zlib file)? I think those may need to get updated. >> >> - Keith >> >> Clay Baenziger wrote: >>> Hi all, >>> I know Ethan's taken a peak at this code and if he would be able >>> to provide a further review, I've taken a stab at fixing 6774 (having >>> create-client not require the image-path to be handed in). >>> The webrev is posted at http://clayb.net/6774. >>> Thank you, >>> Clay >>> _______________________________________________ >>> caiman-discuss mailing list >>> caiman-discuss at opensolaris.org >>> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss >>
