Bug 4488 - Apache web services are started outside of SMF.
: Apache web services are started outside of SMF.
Status: RESOLVED FIXINSOURCE
Product: installer
installadm
: unspecified
: i86pc/i386 OpenSolaris
: P3 critical (vote)
: 2009.1H
Assigned To: Jean McCormack
:
:
: rn4
:
:
: 7124
  Show dependency treegraph
 
Reported: 2008-11-03 14:34 UTC by Rich Reinhard
Modified: 2009-03-10 08:18 UTC (History)
8 users (show)

See Also:


Attachments


Note

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


Description Rich Reinhard 2008-11-03 14:34:17 UTC
-bash-3.2# installadm create-service -s /var/tmp/AI/images/20081027-0703.iso
/var/tmp/AI/targets/20081027-0703
Setting up the target image at /var/tmp/AI/targets/20081027-0703 ...
echo $?
Registering the service _install_service_46501._OSInstall._tcp.local
Could not retrieve DHCP information from dhcp server
  If the site specific symbol GrubMenu is not present,
  please add it as follows:
  /usr/sbin/dhtadm -g -A -s GrubMenu -d Site,150,ASCII,1,0

  Additionally, create a DHCP macro named dhcp_macro__install_service_46501
with:
  Boot server IP (BootSrvA) : 172.20.64.98
  Boot file      (BootFile) : _install_service_46501
  GRUB Menu      (GrubMenu) : menu.lst._install_service_46501
Failed to assign DHCP macro to IP address. Please assign manually.
-bash-3.2# echo $?
0
-bash-3.2# svcs -a | egrep "dhcp|dns|tftp|http"
disabled       10:37:06 svc:/network/dns/server:default
disabled       10:53:07 svc:/network/dhcp-server:default
disabled       10:54:22 svc:/network/http:apache22
online         10:37:37 svc:/network/dns/client:default
online         10:37:38 svc:/network/dns/multicast:default
online         13:45:41 svc:/network/tftp/udp6:default
-bash-3.2# ps -ef | grep httpd
webservd  1179  1169   0 14:02:42 ?           0:00 /usr/apache2/2.2/bin/httpd
-f /var/installadm/ai-webserver/ai-httpd.conf -k sta
    root  1169     1   0 14:02:41 ?           0:00 /usr/apache2/2.2/bin/httpd
-f /var/installadm/ai-webserver/ai-httpd.conf -k sta
webservd  1180  1169   0 14:02:42 ?           0:00 /usr/apache2/2.2/bin/httpd
-f /var/installadm/ai-webserver/ai-httpd.conf -k sta
webservd  1181  1169   0 14:02:42 ?           0:00 /usr/apache2/2.2/bin/httpd
-f /var/installadm/ai-webserver/ai-httpd.conf -k sta
webservd  1178  1169   0 14:02:42 ?           0:00 /usr/apache2/2.2/bin/httpd
-f /var/installadm/ai-webserver/ai-httpd.conf -k sta
webservd  1182  1169   0 14:02:42 ?           0:00 /usr/apache2/2.2/bin/httpd
-f /var/installadm/ai-webserver/ai-httpd.conf -k sta
    root  1238  1128   0 14:33:27 pts/4       0:00 grep httpd
webservd  1177  1169   0 14:02:42 ?           0:00 /usr/apache2/2.2/bin/httpd
-f /var/installadm/ai-webserver/ai-httpd.conf -k sta
-bash-3.2#
Comment 1 Rich Reinhard 2008-11-07 17:35:21 UTC
I raising the severity to critical on this defect.  If system is rebooted then
apache services are not restarted thus breaking the install server.  I believe
that this defect should be raised to be a blocker prior to release.


-bash-3.2# installadm create-service -n Test1 -s
/var/tmp/AI/images/ai-20081104-1316.iso /var/tmp/AI/targets/ai-20081104-1316
Setting up the target image at /var/tmp/AI/targets/ai-20081104-1316 ...
Registering the service Test1._OSInstall._tcp.local
Could not retrieve DHCP information from dhcp server
  If the site specific symbol GrubMenu is not present,
  please add it as follows:
  /usr/sbin/dhtadm -g -A -s GrubMenu -d Site,150,ASCII,1,0

  Additionally, create a DHCP macro named dhcp_macro_Test1 with:
  Boot server IP (BootSrvA) : 172.20.64.98
  Boot file      (BootFile) : Test1
  GRUB Menu      (GrubMenu) : menu.lst.Test1
Failed to assign DHCP macro to IP address. Please assign manually.
copying boot file to /tftpboot/pxegrub.I86PC.OpenSolaris-1
-bash-3.2# installadm list
The install services running on the system are:

Test1
-bash-3.2# ps -ef | egrep "web|dns-sd"
webservd 10339 10326   0 17:25:48 ?           0:00 /usr/apache2/2.2/bin/httpd
-f /var/installadm/ai-webserver/ai-httpd.conf -k sta
webservd 10334 10326   0 17:25:48 ?           0:00 /usr/apache2/2.2/bin/httpd
-f /var/installadm/ai-webserver/ai-httpd.conf -k sta
webservd 10337 10326   0 17:25:48 ?           0:00 /usr/apache2/2.2/bin/httpd
-f /var/installadm/ai-webserver/ai-httpd.conf -k sta
webservd 10336 10326   0 17:25:48 ?           0:00 /usr/apache2/2.2/bin/httpd
-f /var/installadm/ai-webserver/ai-httpd.conf -k sta
webservd 10335 10326   0 17:25:48 ?           0:00 /usr/apache2/2.2/bin/httpd
-f /var/installadm/ai-webserver/ai-httpd.conf -k sta
    root 10326     1   0 17:25:47 ?           0:00 /usr/apache2/2.2/bin/httpd
-f /var/installadm/ai-webserver/ai-httpd.conf -k sta
    root 10353     1   0 17:25:52 pts/4       0:00 /usr/bin/python2.4
/usr/lib/installadm/webserver -p 46501 /var/ai/46501
    root 10411 10299   0 17:26:14 pts/4       0:00 egrep web|dns-sd
    root 10362     1   0 17:25:52 pts/4       0:00 /usr/bin/dns-sd -R Test1
_OSInstall._tcp local 46501 aiwebserver=172.20.64.98:4
webservd 10338 10326   0 17:25:48 ?           0:00 /usr/apache2/2.2/bin/httpd
-f /var/installadm/ai-webserver/ai-httpd.conf -k sta
-bash-3.2# cat  /var/installadm/service_data 
Test1;/var/tmp/AI/targets/ai-20081104-1316;Test1;aiwebserver=golmaal:46501
-bash-3.2#

-bash-3.2# reboot
Connection to golmaal closed by remote host.
Connection to golmaal closed.
emerger: 511 $ ping -s golmaal
PING golmaal: 56 data bytes
64 bytes from golmaal (172.20.64.98): icmp_seq=0. time=0.316 ms
64 bytes from golmaal (172.20.64.98): icmp_seq=135. time=0.996 ms
64 bytes from golmaal (172.20.64.98): icmp_seq=136. time=0.346 ms
64 bytes from golmaal (172.20.64.98): icmp_seq=137. time=0.311 ms
64 bytes from golmaal (172.20.64.98): icmp_seq=138. time=0.347 ms
64 bytes from golmaal (172.20.64.98): icmp_seq=139. time=0.294 ms
^C
----golmaal PING Statistics----
170 packets transmitted, 36 packets received, 78% packet loss
round-trip (ms)  min/avg/max/stddev = 0.194/0.347/0.996/0.121
emerger: 512 $ ssh root@golmaal
Password: 
Last login: Fri Nov  7 17:24:13 2008 from emerger
Sun Microsystems Inc.   SunOS 5.11      snv_100 November 2008
-bash-3.2# ps -ef | egrep "web|dns-sd"
    root   607   602   0 17:29:48 pts/2       0:00 egrep web|dns-sd
-bash-3.2#
Comment 2 Clay Baenziger 2008-11-07 20:48:23 UTC
This seems pretty severe that once an A/I install server is rebooted the admin
must either create a new service or understand how to manually start the Apache
image server (on top of running installadm start <service> for each service on
the machine). I agree we should look at this as a blocker.
Comment 3 Glynn Foster 2008-11-09 11:02:04 UTC
I agree this is pretty bad - in fact, for some reason I've not been able to
successfully get http://localhost:5555 to work. What I'd *expect* to see is
that the moment installadm create-service successfully finishes, I could launch
my browser at localhost:5555. As it stands now, that doesn't seem to work
correctly, and only http://localhost:46501 seems to work (though obviously
breaks because it can't find default.xml due to ai-httpd.conf not being picked
up with correct document root. Would be nice to see this working better out of
the box.
Comment 4 Clay Baenziger 2008-11-10 13:37:32 UTC
Hi Glynn,
  I agree this should work better out of the box. However, you may have hit
another bug. Why is the server at 46501 failing to find default.xml do you
think? It's not an Apache server and doesn't use an httpd.conf file. It
shouldn't be looking in /var/ai/46501/AI_data/ for default.xml. Is that not
there?

Thank you,
Clay
Comment 5 Glynn Foster 2008-11-10 13:52:28 UTC
Clay: looks like it's there - just when I use Firefox to open it, I get a
confusing message about it not being in /tmp. Saving it to the filesystem
works, so ignore my previous comment.
Comment 6 Sundar Yamunachari 2008-11-10 22:53:46 UTC
It is a critical bug but it is too risky to fix at this time for 2008.11
release. Manual workaround is required to restore the services. This will be
documented in release notes and fixed after November release.

Workaround:
- Restart the Apache web server as follows
# /usr/apache/2.2/bin/apachectl -f /var/installadm/ai-webserver/ai-httpd.conf
-k start
- Get the configured services from /var/installadm/service_data. For example,
it may look like:
# cat /var/installadm/service_data
new1;/tmp/directory/test1;new1;aiwebserver=kumbam:46501
_install_service_46501;/tmp/target/test1;_install_service_46501;aiwebserver=kumbam:46501

The first parameter is the name of the service. Start each service using the
installadm start command as follows:
#installadm start new1
#installadm start _install_service_46501
Comment 7 Jean McCormack 2009-03-03 10:47:48 UTC
I'll create a new service system/install/server.xml to installadm start
the services that are designated as "on" in the service data file during the
start method. The stop method will bring down the service gracefully but not
set the status to off. For maintenance reasons, this may involve a new
subcommand or switch to the installadm stop subcommand.
Comment 8 Jean McCormack 2009-03-10 08:18:18 UTC
Fixed in changeset 8e3825cb3e62d7902157f907efc0c6efe63e8a47
Comment 9 susan.sohn 2009-03-18 07:42:06 UTC
*** Bug 7472 has been marked as a duplicate of this bug. ***