← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~allenap/maas/shutdown-when-stopping into lp:maas

 

Gavin Panella has proposed merging lp:~allenap/maas/shutdown-when-stopping into lp:maas.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~allenap/maas/shutdown-when-stopping/+merge/103069
-- 
https://code.launchpad.net/~allenap/maas/shutdown-when-stopping/+merge/103069
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/maas/shutdown-when-stopping into lp:maas.
=== modified file 'HACKING.txt'
--- HACKING.txt	2012-04-20 20:04:48 +0000
+++ HACKING.txt	2012-04-23 09:56:18 +0000
@@ -199,12 +199,9 @@
   $ make restart
   $ make stop
 
-The latter leaves ``supervise`` running. To stop ``supervise`` too::
-
-  $ make shutdown
-
-This is a dependency of ``distclean`` so just running ``make
-distclean`` when you've finished with your branch is enough.
+The latter is a dependency of ``distclean`` so just running ``make
+distclean`` when you've finished with your branch is enough to stop
+everything.
 
 Individual services can be manipulated too::
 

=== modified file 'Makefile'
--- Makefile	2012-04-20 19:42:20 +0000
+++ Makefile	2012-04-23 09:56:18 +0000
@@ -85,7 +85,7 @@
 	find . -type f -name '*~' -print0 | xargs -r0 $(RM)
 	$(RM) -r media/demo/* media/development
 
-distclean: clean shutdown
+distclean: clean stop
 	utilities/maasdb delete-cluster ./db/
 	$(RM) -r eggs develop-eggs
 	$(RM) -r bin build dist logs/* parts
@@ -135,21 +135,21 @@
 
 start: $(addsuffix @start,$(services))
 
-stop: $(addsuffix @stop,$(services))
+pause: $(addsuffix @pause,$(services))
 
 status: $(addsuffix @status,$(services))
 
 restart: $(addsuffix @restart,$(services))
 
-shutdown: $(addsuffix @shutdown,$(services))
+stop: $(addsuffix @stop,$(services))
 
 supervise: $(addsuffix @supervise,$(services))
 
 define phony_services_targets
+  pause
   restart
   run
   run+webapp
-  shutdown
   start
   status
   stop
@@ -160,13 +160,13 @@
 
 service_lock = setlock -n /run/lock/maas.dev.$(firstword $(1))
 
-services/%/@run: services/%/@shutdown services/%/@deps
+services/%/@run: services/%/@stop services/%/@deps
 	@$(call service_lock, $*) services/$*/run
 
 services/%/@start: services/%/@supervise
 	@svc -u $(@D)
 
-services/%/@stop: services/%/@supervise
+services/%/@pause: services/%/@supervise
 	@svc -d $(@D)
 
 services/%/@status:
@@ -175,7 +175,7 @@
 services/%/@restart: services/%/@supervise
 	@svc -du $(@D)
 
-services/%/@shutdown:
+services/%/@stop:
 	@if svok $(@D); then svc -dx $(@D); fi
 	@while svok $(@D); do sleep 0.1; done