From 2337fab0979b72bbc7e7730e94518a0e835a2751 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Mon, 25 Oct 2010 03:45:19 +0900 Subject: part way through porting the codebase off of twisted this provides a very basic eventlet-based service replacement for the twistd-based services, a replacement for task.LoopingCall also adds nova-combined with the goal of running a single service when doing local testing and dev --- bin/nova-compute | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'bin/nova-compute') diff --git a/bin/nova-compute b/bin/nova-compute index 1724e9659..600fbb897 100755 --- a/bin/nova-compute +++ b/bin/nova-compute @@ -21,6 +21,9 @@ Twistd daemon for the nova compute nodes. """ +import eventlet +eventlet.monkey_patch() + import os import sys @@ -32,12 +35,7 @@ possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): sys.path.insert(0, possible_topdir) -from nova import service -from nova import twistd - +from nova import service_eventlet if __name__ == '__main__': - twistd.serve(__file__) - -if __name__ == '__builtin__': - application = service.Service.create() # pylint: disable=C0103 + service_eventlet.serve() -- cgit From 11dddd7ca4f4264ef3a8f1e251601c1d8fd7a626 Mon Sep 17 00:00:00 2001 From: Michael Gundlach Date: Wed, 1 Dec 2010 10:44:51 -0600 Subject: Move default_flagfile() call to where it will be parsed in time to load the flagfile --- bin/nova-compute | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/nova-compute') diff --git a/bin/nova-compute b/bin/nova-compute index a66477af5..1054852c4 100755 --- a/bin/nova-compute +++ b/bin/nova-compute @@ -38,8 +38,9 @@ from nova import utils if __name__ == '__main__': + utils.default_flagfile() twistd.serve(__file__) if __name__ == '__builtin__': - utils.default_flagfile() application = service.Service.create() # pylint: disable=C0103 + -- cgit From 6e6b5325bfc5233b243ed9f8279694136d605ddf Mon Sep 17 00:00:00 2001 From: Michael Gundlach Date: Wed, 1 Dec 2010 11:43:20 -0600 Subject: Removed a blank line. --- bin/nova-compute | 1 - 1 file changed, 1 deletion(-) (limited to 'bin/nova-compute') diff --git a/bin/nova-compute b/bin/nova-compute index 1054852c4..ac6378f75 100755 --- a/bin/nova-compute +++ b/bin/nova-compute @@ -43,4 +43,3 @@ if __name__ == '__main__': if __name__ == '__builtin__': application = service.Service.create() # pylint: disable=C0103 - -- cgit From 00f329d479564ad8349ed32a27990da2ed3a396e Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Thu, 9 Dec 2010 14:36:23 -0800 Subject: make nova binaries use eventlet --- bin/nova-compute | 1 + 1 file changed, 1 insertion(+) (limited to 'bin/nova-compute') diff --git a/bin/nova-compute b/bin/nova-compute index 600fbb897..307f7cb59 100755 --- a/bin/nova-compute +++ b/bin/nova-compute @@ -39,3 +39,4 @@ from nova import service_eventlet if __name__ == '__main__': service_eventlet.serve() + service_eventlet.wait() -- cgit From b3f5aba0c465b263c1d0a15c7d249dafb3a98e6c Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Thu, 9 Dec 2010 15:25:14 -0800 Subject: remove service and rename service_eventlet to service --- bin/nova-compute | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin/nova-compute') diff --git a/bin/nova-compute b/bin/nova-compute index 307f7cb59..4baf47e29 100755 --- a/bin/nova-compute +++ b/bin/nova-compute @@ -35,8 +35,8 @@ possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): sys.path.insert(0, possible_topdir) -from nova import service_eventlet +from nova import service if __name__ == '__main__': - service_eventlet.serve() - service_eventlet.wait() + service.serve() + service.wait() -- cgit From a1640f352806ee12f6b485a8d69a65bd42b51411 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Thu, 9 Dec 2010 16:05:13 -0800 Subject: formatting and naming cleanup --- bin/nova-compute | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'bin/nova-compute') diff --git a/bin/nova-compute b/bin/nova-compute index 4baf47e29..f224f0690 100755 --- a/bin/nova-compute +++ b/bin/nova-compute @@ -17,9 +17,7 @@ # License for the specific language governing permissions and limitations # under the License. -""" - Twistd daemon for the nova compute nodes. -""" +"""Starter script for Nova Compute.""" import eventlet eventlet.monkey_patch() -- cgit From 4d06429290a373ae3a42b1f9b58d7253d269e048 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Thu, 9 Dec 2010 16:45:51 -0800 Subject: add back utils.default_flagflie --- bin/nova-compute | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bin/nova-compute') diff --git a/bin/nova-compute b/bin/nova-compute index f224f0690..8b02cd0f5 100755 --- a/bin/nova-compute +++ b/bin/nova-compute @@ -34,7 +34,9 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): sys.path.insert(0, possible_topdir) from nova import service +from nova import utils if __name__ == '__main__': + utils.default_flagfile() service.serve() service.wait() -- cgit From a6645d8a431ed933eef4ea6c42c0224ead6f2272 Mon Sep 17 00:00:00 2001 From: "jaypipes@gmail.com" <> Date: Sat, 11 Dec 2010 15:10:24 -0500 Subject: Initial i18n commit for endpoints. All endpoints must install gettext, which injects the _ function into the builtins. --- bin/nova-compute | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bin/nova-compute') diff --git a/bin/nova-compute b/bin/nova-compute index ac6378f75..f57b68584 100755 --- a/bin/nova-compute +++ b/bin/nova-compute @@ -21,6 +21,7 @@ Twistd daemon for the nova compute nodes. """ +import gettext import os import sys @@ -32,6 +33,8 @@ possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): sys.path.insert(0, possible_topdir) +gettext.install('nova', unicode=1) + from nova import service from nova import twistd from nova import utils -- cgit