Skip to content
Browse files

Merge fixes for admin scripts

  • Loading branch information...
2 parents 9b16b58 + c17add0 commit 1ba73732009e6e993180407bd92adfaa53bbd7bc @gholms gholms committed Apr 21, 2011
View
6 clc/eucadmin/Makefile
@@ -27,10 +27,12 @@ all: euca_admin
build: euca_admin
euca_admin:
- $(PYTHON) setup.py build
+ @cat setup.cfg.template | sed "s:DESTDIR:$(DESTDIR):" > setup.cfg
+ $(PYTHON_BIN) setup.py build
install: euca_admin
- $(PYTHON) setup.py install
+ @cat setup.cfg.template | sed "s:DESTDIR:$(DESTDIR):" > setup.cfg
+ $(PYTHON_BIN) setup.py install
clean:
@$(RM) -fr ./dist
View
10 clc/eucadmin/eucadmin/registervmwarebroker.py
@@ -37,11 +37,12 @@ class RegisterVMwareBroker(AWSQueryRequest):
ServicePath = '/services/Configuration'
ServiceClass = eucadmin.EucAdmin
Description = 'Register VMware broker'
- Params = [Param(name='Partition',
+ Params = [
+ Param(name='Partition',
short_name='P',
long_name='partition',
ptype='string',
- optional=True,
+ optional=False,
doc='Partition for the VMware broker'),
Param(name='Host',
short_name='H',
@@ -54,8 +55,9 @@ class RegisterVMwareBroker(AWSQueryRequest):
long_name='port',
ptype='integer',
default=8773,
- optional=False,
- doc='Port for the VMware broker')]
+ optional=True,
+ doc='Port for the VMware broker')
+ ]
Args = [Param(name='Name',
long_name='name',
ptype='string',
View
2 clc/eucadmin/setup.cfg.in
@@ -1,2 +0,0 @@
-[install]
-install_scripts=@prefix@/usr/sbin
View
94 clc/eucadmin/setup.py
@@ -29,46 +29,72 @@
#
# Author: Mitch Garnaat mgarnaat@eucalyptus.com
+import sys
+import os
from distutils.core import setup
+from distutils.sysconfig import get_python_lib
+import fileinput
+import ConfigParser
-setup(name = "eucadmin",
- version = '0.1',
- description = "Eucalyptus Admin Tools",
+cfg = ConfigParser.ConfigParser()
+cfg.read('setup.cfg')
+prefix = cfg.get('install', 'prefix')
+install_scripts = cfg.get('install', 'install_scripts')
+path_header = 'import sys\nsys.path.append(\"%s\")\n' % (get_python_lib(prefix=prefix))
+
+binaries = ["bin/euca-add-user", "bin/euca-add-user-group",
+ "bin/euca-delete-user", "bin/euca-delete-user-group",
+ "bin/euca-add-user", "bin/euca-add-user-group",
+ "bin/euca_conf", "bin/euca-delete-user",
+ "bin/euca-delete-user-group",
+ "bin/euca-deregister-cluster",
+ "bin/euca-deregister-storage-controller",
+ "bin/euca-deregister-walrus",
+ "bin/euca-describe-clusters",
+ "bin/euca-describe-components",
+ "bin/euca-describe-properties",
+ "bin/euca-describe-services",
+ "bin/euca-describe-storage-controllers",
+ "bin/euca-describe-user-groups",
+ "bin/euca-describe-users",
+ "bin/euca-describe-walruses",
+ "bin/euca-get-credentials",
+ "bin/euca-modify-cluster",
+ "bin/euca-modify-property",
+ "bin/euca-modify-storage-controller",
+ "bin/euca-modify-walrus",
+ "bin/euca-register-cluster",
+ "bin/euca-register-storage-controller",
+ "bin/euca-register-walrus"]
+mangled = [ "%s/%s" % (install_scripts,os.path.basename(x)) for x in binaries ]
+
+setup(name="eucadmin",
+ version='0.1',
+ description="Eucalyptus Admin Tools",
long_description="CLI tools to help administer Eucalyptus",
- author = "Mitch Garnaat",
- author_email = "mgarnaat@eucalyptus.com",
- scripts = ["bin/euca-add-user", "bin/euca-add-user-group",
- "bin/euca-delete-user", "bin/euca-delete-user-group",
- "bin/euca-add-user", "bin/euca-add-user-group",
- "bin/euca_conf", "bin/euca-delete-user",
- "bin/euca-delete-user-group",
- "bin/euca-deregister-cluster",
- "bin/euca-deregister-storage-controller",
- "bin/euca-deregister-walrus",
- "bin/euca-describe-clusters",
- "bin/euca-describe-components",
- "bin/euca-describe-properties",
- "bin/euca-describe-services",
- "bin/euca-describe-storage-controllers",
- "bin/euca-describe-user-groups",
- "bin/euca-describe-users",
- "bin/euca-describe-walruses",
- "bin/euca-get-credentials",
- "bin/euca-modify-cluster",
- "bin/euca-modify-property",
- "bin/euca-modify-storage-controller",
- "bin/euca-modify-walrus",
- "bin/euca-register-cluster",
- "bin/euca-register-storage-controller",
- "bin/euca-register-walrus"],
- url = "http://eucalyptus.com/",
- packages = ['eucadmin'],
- license = 'BSD',
- platforms = 'Posix; MacOS X; Windows',
- classifiers = [ 'Development Status :: 5 - Production/Stable',
+ author="Mitch Garnaat",
+ author_email="mgarnaat@eucalyptus.com",
+ scripts=binaries,
+ url="http://eucalyptus.com/",
+ packages=['eucadmin'],
+ license='BSD',
+ platforms='Posix; MacOS X; Windows',
+ classifiers=[ 'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Topic :: Internet',
],
)
+
+if 'install' in sys.argv[1:]:
+ for line in fileinput.input(mangled, inplace=1,backup=None):
+ if fileinput.isfirstline():
+ print line,
+ print path_header,
+ elif line == 'import sys\n':
+ continue
+ elif line.startswith('sys.path.append'):
+ continue
+ else:
+ print line,
View
55 clc/modules/bootstrap/src/main/native/arguments.ggo
@@ -0,0 +1,55 @@
+package "Eucalyptus"
+version "eee-3.0.0"
+
+###### # # # # # # #
+###### long-opt # short # description # type # type desc. # default value # req. # extras...
+section "Bootstrap Configuration"# # # # # #
+option "user" u "User to drop privs to after starting." string typestr="USERNAME" default="eucalyptus" no
+option "home" h "Eucalyptus home directory." string typestr="DIRECTORY" default="/opt/eucalyptus/nurmi_eee_mergetest-root/" no
+
+option "initialize" - "Perform first-time setup. This is run one time (only!) on the first cloud controller before the first time it is run." flag off
+option "bind-addr" b "Specifying this option causes eucalyptus-cloud to only bind the specified local addresses. The default behaviour is to listen on the any address." string typestr="IP_ADDRESS" optional multiple
+
+option "define" D "Set system properties." string optional multiple
+option "fork" f "Fork and daemonize Eucalyptus." flag off
+option "kill" k "Kill a daemonized Eucalyptus." flag off
+option "pidfile" - "Location for the pidfile." string typestr="FILENAME" default="/opt/eucalyptus/nurmi_eee_mergetest-root/var/run/eucalyptus-cloud.pid" no
+###### # # # # # # #
+###### long-opt # short # description # type # type desc. # default value # req. # extras...
+section "Logging Configuration" # # # # # #
+option "verbose" v "DEPRECATEDVerbose bootstrapper output." flag off hidden # DEPRECATED
+option "log-level" l "Control the log level for console output." string typestr="FILENAME" default="INFO" no
+option "log-appender" L "Control the destination for console output." string typestr="APPENDERNAME" default="console-log" no
+option "exhaustive" x "Exhaustive logging of all connections." flag off
+option "exhaustive-db" - "Exhaustive logging for database connections." flag off
+option "exhaustive-user" - "Exhaustive logging for client connections." flag off
+option "exhaustive-cc" - "Exhaustive logging for cluster connections." flag off
+option "exhaustive-external" - "Exhaustive logging for external libraries." flag off
+option "out" o "Redirect standard out to file." string typestr="FILENAME" default="&1" no
+option "err" e "Redirect standard error to file." string typestr="FILENAME" default="&2" no
+###### # # # # # # #
+###### long-opt # short # description # type # type desc. # default value # req. # extras...
+section "Disable Features" # # # # # #
+option "remote-dns" - "eucalyptus-cloud will not try to bind port 53." flag off # TODO: this needs to be removed
+option "disable-iscsi" - "Disable ISCSI support for dynamic block storage." flag off # TODO: this needs to be removed
+option "disable-cloud" - "DEPRECATED DO NOT USE. IT DOES NOTHING." flag off hidden # DEPRECATED
+option "disable-walrus" - "DEPRECATED DO NOT USE. IT DOES NOTHING." flag off hidden # DEPRECATED
+option "disable-dns" - "DEPRECATED DO NOT USE. IT DOES NOTHING." flag off hidden # DEPRECATED
+option "disable-storage" - "DEPRECATED DO NOT USE. IT DOES NOTHING." flag off hidden # DEPRECATED
+option "disable-vmwarebroker" - "DEPRECATED DO NOT USE. IT DOES NOTHING." flag off hidden # DEPRECATED
+###### # # # # # # #
+###### long-opt # short # description # type # type desc. # default value # req. # extras...
+section "Java Options" # # # # # # #
+option "java-home" j "Alternative way to specify JAVA_HOME." string typestr="DIRECTORY" default="/opt/eucalyptus/nurmi_eee_mergetest-root/packages/jdk/" no
+option "jvm-name" - "Which JVM type to run (see jvm.cfg)." string typestr="JVMNAME" default="-server" no hidden
+option "jvm-args" X "Arguments to pass to the JVM." string optional multiple
+option "debug" d "Launch with debugger enabled." flag off
+option "debug-port" - "Set the port to use for the debugger." int default="5005" no dependon="debug"
+option "debug-suspend" - "Force debugger to wait at main()." flag off dependon="debug"
+###### # # # # # # #
+###### # # # # # # #
+###### # # # # # # #
+option "profile" - "Launch with jprofiler enabled." flag off hidden
+option "profiler-home" - "Set the home for jprofiler." string typestr="DIRECTORY" default="/opt/profile" no dependon="profile" hidden
+option "agentlib" - "Launch with agentlib enabled." string typestr="AGENTLIB" optional dependon="profile" hidden
+
View
2 clc/modules/cluster-manager/src/main/java/com/eucalyptus/cluster/Cluster.java
@@ -208,7 +208,7 @@ public void fire( Cluster t ) {
on( Transition.INIT_CERTS )//
.from( State.AUTHENTICATING ).to( State.STARTING ).error( State.DOWN ).run( newRefresh( ClusterCertsCallback.class ) );
-// on( Transition.INIT_SERVICES ).from( State.CHECKING_SERVICE ).to( State.STARTING ).error( State.STARTING ).run( newRefresh( ServiceStateCallback.class ) );
+ on( Transition.INIT_SERVICES ).from( State.CHECKING_SERVICE ).to( State.STARTING ).error( State.STARTING ).run( newRefresh( ServiceStateCallback.class ) );
on( Transition.INIT_RESOURCES ).from( State.STARTING ).to( State.STARTING_RESOURCES ).error( State.DOWN ).run( newRefresh( ResourceStateCallback.class ) );
on( Transition.INIT_NET ).from( State.STARTING_RESOURCES ).to( State.STARTING_NET ).error( State.DOWN ).run( newRefresh( NetworkStateCallback.class ) );
on( Transition.INIT_VMS ).from( State.STARTING_NET ).to( State.STARTING_VMS ).error( State.DOWN ).run( newRefresh( VmStateCallback.class ) );
View
10 ...s/cluster-manager/src/main/java/com/eucalyptus/cluster/callback/ServiceStateCallback.java
@@ -17,5 +17,15 @@ public ServiceStateCallback( ) {
public void fire( DescribeServicesResponseType msg ) {
LOG.debug( msg );
}
+
+ @Override
+ public void initialize( DescribeServicesType request ) throws Exception {
+ LOG.debug( request );
+ }
+
+ @Override
+ public void fireException( Throwable t ) {
+ LOG.error( t, t );
+ }
}
View
4 configure
@@ -7385,7 +7385,7 @@ done
# Time to substitute and generate the files
-ac_config_files="$ac_config_files Makedefs tools/eucalyptus-cc:tools/eucalyptus-cc.in tools/eucalyptus-nc:tools/eucalyptus-nc.in clc/eucadmin/bin/euca_conf:clc/eucadmin/bin/euca_conf.in clc/eucadmin/setup.cfg:clc/eucadmin/setup.cfg.in tools/eucalyptus-cloud:tools/eucalyptus-cloud.in clc/modules/bootstrap/src/main/native/arguments.ggo:clc/modules/bootstrap/src/main/native/arguments.ggo.in"
+ac_config_files="$ac_config_files Makedefs tools/eucalyptus-cc:tools/eucalyptus-cc.in tools/eucalyptus-nc:tools/eucalyptus-nc.in clc/eucadmin/bin/euca_conf:clc/eucadmin/bin/euca_conf.in clc/eucadmin/setup.cfg.template:clc/eucadmin/setup.cfg.template.in tools/eucalyptus-cloud:tools/eucalyptus-cloud.in clc/modules/bootstrap/src/main/native/arguments.ggo:clc/modules/bootstrap/src/main/native/arguments.ggo.in"
cat >>confdefs.h <<_ACEOF
@@ -8105,7 +8105,7 @@ do
"tools/eucalyptus-cc") CONFIG_FILES="$CONFIG_FILES tools/eucalyptus-cc:tools/eucalyptus-cc.in" ;;
"tools/eucalyptus-nc") CONFIG_FILES="$CONFIG_FILES tools/eucalyptus-nc:tools/eucalyptus-nc.in" ;;
"clc/eucadmin/bin/euca_conf") CONFIG_FILES="$CONFIG_FILES clc/eucadmin/bin/euca_conf:clc/eucadmin/bin/euca_conf.in" ;;
- "clc/eucadmin/setup.cfg") CONFIG_FILES="$CONFIG_FILES clc/eucadmin/setup.cfg:clc/eucadmin/setup.cfg.in" ;;
+ "clc/eucadmin/setup.cfg.template") CONFIG_FILES="$CONFIG_FILES clc/eucadmin/setup.cfg.template:clc/eucadmin/setup.cfg.template.in" ;;
"tools/eucalyptus-cloud") CONFIG_FILES="$CONFIG_FILES tools/eucalyptus-cloud:tools/eucalyptus-cloud.in" ;;
"clc/modules/bootstrap/src/main/native/arguments.ggo") CONFIG_FILES="$CONFIG_FILES clc/modules/bootstrap/src/main/native/arguments.ggo:clc/modules/bootstrap/src/main/native/arguments.ggo.in" ;;
View
2 configure.ac
@@ -265,7 +265,7 @@ AC_CONFIG_FILES([Makedefs
tools/eucalyptus-cc:tools/eucalyptus-cc.in
tools/eucalyptus-nc:tools/eucalyptus-nc.in
clc/eucadmin/bin/euca_conf:clc/eucadmin/bin/euca_conf.in
- clc/eucadmin/setup.cfg:clc/eucadmin/setup.cfg.in
+ clc/eucadmin/setup.cfg.template:clc/eucadmin/setup.cfg.template.in
tools/eucalyptus-cloud:tools/eucalyptus-cloud.in
clc/modules/bootstrap/src/main/native/arguments.ggo:clc/modules/bootstrap/src/main/native/arguments.ggo.in])

0 comments on commit 1ba7373

Please sign in to comment.
Something went wrong with that request. Please try again.