Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote branch 'upstream/master' into spotinstances

Conflicts:
	service/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/authz-callout-sql.xml
  • Loading branch information...
commit c90e594dfa203775f8121c0792c06d93fce83694 2 parents 0b7b371 + 826a426
@pauloricardomg pauloricardomg authored
Showing with 3,673 additions and 5,605 deletions.
  1. +0 −34 .idea-modules/rest/rest.iml
  2. +6 −1 .idea/libraries/cloud_client_libs.xml
  3. +0 −1  .idea/modules.xml
  4. +2 −0  authzdb/build.xml
  5. +1 −2  authzdb/src/org/nimbus/authz/AuthzDBAdapter.java
  6. +14 −0 autoconfiguration/build.xml
  7. +0 −160 autoconfiguration/share/autoconfig-adjustments.sh
  8. +13 −244 autoconfiguration/share/autoconfig.sh
  9. +0 −9 autoconfiguration/share/lib/common-env.sh
  10. +0 −16 autoconfiguration/share/lib/network-template.txt
  11. +1 −1  cloud-client/builder/environment.sh
  12. +12 −0 cloud-client/nimbus-cloud-client-src/CHANGES.txt
  13. +44 −7 cloud-client/nimbus-cloud-client-src/README.txt
  14. +5 −1 cloud-client/nimbus-cloud-client-src/bin/cloud-client.sh
  15. +12 −0 control/bin/fakesudo
  16. +0 −7 control/etc/workspace-control/propagation.conf
  17. +0 −5 control/libexec/workspace-control/tmp-lease.sh
  18. +106 −0 control/src/propagate-only-mode.sh
  19. +1 −1  control/src/python/workspacecontrol/defaults/NetworkBootstrap.py
  20. +1 −21 control/src/python/workspacecontrol/defaults/imageprocurement/propagate_scp.py
  21. +11 −7 control/src/python/workspacecontrol/experimental/tmplease.py
  22. +18 −0 control/src/python/workspacecontrol/main/wc_core.py
  23. +1 −1  control/src/python/workspacecontrol/main/wc_core_creation.py
  24. +52 −0 control/src/python/workspacecontrol/main/wc_core_persistence.py
  25. +165 −0 control/src/python/workspacecontrol/mocks/DoNothingPlatform.py
  26. +1 −0  control/src/python/workspacecontrol/mocks/__init__.py
  27. +16 −0 ctx-broker/build.xml
  28. +2 −0  ctx-broker/wsdl/stubs/build.xml
  29. +1 −1  cumulus/authz/pynimbusauthz/__init__.py
  30. +5 −2 cumulus/cb/pycb/__init__.py
  31. +5 −0 cumulus/cb/pycb/cbRequest.py
  32. +4 −0 cumulus/cb/pycb/cumulus.py
  33. +5 −1 cumulus/cb/pycb/tools/base_repo.py
  34. +0 −1  cumulus/conf/Makefile.am
  35. +0 −1  cumulus/conf/Makefile.in
  36. +0 −23 cumulus/cumulus-install.sh
  37. +34 −38 cumulus/perf/run-many.sh
  38. +16 −0 cumulus/tests/client/buckets_test.py
  39. +2 −2 docs/scripts/local-serve.py
  40. +2 −2 docs/src/admin/index.html
  41. +0 −111 docs/src/admin/nimbus-build.txt
  42. +0 −49 docs/src/admin/overview.html
  43. +2 −1,224 docs/src/admin/quickstart.html
  44. +23 −5 docs/src/admin/reference.html
  45. +0 −27 docs/src/admin/test-create-output.txt
  46. +0 −12 docs/src/admin/test-create.sh
  47. +60 −3 docs/src/admin/troubleshooting.html
  48. +2 −2 docs/src/admin/upgrading.html
  49. +2 −2 docs/src/admin/z2c/final-tests.html
  50. +7 −3 docs/src/admin/z2c/index.html
  51. +11 −5 docs/src/admin/z2c/networking-setup.html
  52. +23 −20 docs/src/admin/z2c/service-dependencies.html
  53. +18 −25 docs/src/admin/z2c/service-setup.html
  54. +5 −5 docs/src/admin/z2c/ssh-setup.html
  55. +12 −7 docs/src/admin/z2c/vmm-setup.html
  56. +147 −3 docs/src/changelog.html
  57. +16 −0 docs/src/css/doc.css
  58. +1 −1  docs/src/dev/apis.html
  59. +2 −2 docs/src/dev/docs.html
  60. +2 −2 docs/src/dev/index.html
  61. +1 −1  docs/src/dev/meta.html
  62. +7 −7 docs/src/dev/reference.html
  63. +1 −1  docs/src/dev/sccs.html
  64. +155 −33 docs/src/elclients.html
  65. +24 −48 docs/src/faq.html
  66. +7 −9 docs/src/index.html
  67. +1 −1  docs/src/plugins/index.html
  68. +1 −1  docs/src/plugins/service-accounting.html
  69. +1 −1  docs/src/plugins/service-authz.html
  70. +1 −1  docs/src/plugins/service-network.html
  71. +1 −1  docs/src/plugins/service-prop.html
  72. +1 −1  docs/src/plugins/service-reqintake.html
  73. +1 −1  docs/src/plugins/service-sched.html
  74. +1 −1  docs/src/plugins/service-tasks.html
  75. +23 −22 docs/src/summary.html
  76. +2 −0  home/bin/nimbus-edit-user
  77. +2 −0  home/bin/nimbus-list-users
  78. +2 −0  home/bin/nimbus-new-user
  79. +2 −0  home/bin/nimbus-remove-user
  80. +18 −0 home/bin/nimbus-reset-state
  81. +10 −0 home/bin/nimbus-version
  82. +36 −21 home/libexec/nimbus_edit_user.py
  83. +9 −1 home/libexec/nimbus_list_users.py
  84. +57 −11 home/libexec/nimbus_new_user.py
  85. +4 −0 home/libexec/nimbus_remove_user.py
  86. +207 −0 home/libexec/nimbus_reset_state.py
  87. +371 −0 home/libexec/nimbus_version.py
  88. +30 −44 home/libexec/nimbusconfigure.py
  89. +1 −5 home/libexec/run-services.sh
  90. +3 −2 home/var/cloud.properties.in
  91. +14 −2 install
  92. BIN  lib/clients/httpclient-4.1-alpha2.jar
  93. BIN  lib/clients/httpcore-4.1-beta1.jar
  94. +202 −0 lib/licenses/bcver.LICENSE
  95. BIN  lib/test/bcver.jar
  96. +10 −7 libexec/install-real.sh
  97. +2 −0  messaging/gt4.0-elastic/java/msgbridge/build.xml
  98. +0 −10 messaging/gt4.0-elastic/java/msgbridge/etc/elastic/elastic.conf
  99. +0 −6 messaging/gt4.0-elastic/java/msgbridge/etc/elastic/other/main.conflocator.xml
  100. +0 −12 messaging/gt4.0-elastic/java/msgbridge/etc/elastic/other/main.xml
  101. +38 −21 ...ava/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/image/defaults/CumulusRepository.java
  102. +38 −12 ...-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/defaults/DefaultRun.java
  103. +2 −0  messaging/gt4.0-elastic/java/stubs/build.xml
  104. +2 −0  messaging/gt4.0/java/common/build.xml
  105. +0 −3  messaging/gt4.0/java/gar-builder/build.properties
  106. +13 −7 messaging/gt4.0/java/gar-builder/build.xml
  107. +1 −8 messaging/gt4.0/java/gar-builder/etc/post-deploy.xml
  108. +2 −0  messaging/gt4.0/java/msgbridge/build.xml
  109. +2 −0  messaging/gt4.0/java/stubs/build.xml
  110. +2 −0  messaging/query/java/source/build.xml
  111. +2 −3 messaging/query/java/source/etc/query/query.conf
  112. +0 −20 messaging/rest/java/source/build.properties
  113. +0 −157 messaging/rest/java/source/build.xml
  114. +0 −77 messaging/rest/java/source/etc/rest/other/main-fake.xml
  115. +0 −28 messaging/rest/java/source/etc/rest/other/main.conflocator.xml
  116. +0 −86 messaging/rest/java/source/etc/rest/other/main.xml
  117. +0 −12 messaging/rest/java/source/etc/rest/rest.conf
  118. +0 −70 messaging/rest/java/source/src/org/nimbustools/messaging/rest/AdminResource.java
  119. +0 −30 messaging/rest/java/source/src/org/nimbustools/messaging/rest/DuplicateUserException.java
  120. +0 −89 messaging/rest/java/source/src/org/nimbustools/messaging/rest/FakeUsersService.java
  121. +0 −421 messaging/rest/java/source/src/org/nimbustools/messaging/rest/GridmapUsersService.java
  122. +0 −60 messaging/rest/java/source/src/org/nimbustools/messaging/rest/NimbusWebException.java
  123. +0 −67 messaging/rest/java/source/src/org/nimbustools/messaging/rest/NimbusWebExceptionMapper.java
  124. +0 −147 messaging/rest/java/source/src/org/nimbustools/messaging/rest/OutFaultInterceptor.java
  125. +0 −126 messaging/rest/java/source/src/org/nimbustools/messaging/rest/ResponseUtil.java
  126. +0 −173 messaging/rest/java/source/src/org/nimbustools/messaging/rest/RestHttp.java
  127. +0 −29 messaging/rest/java/source/src/org/nimbustools/messaging/rest/UnknownKeyException.java
  128. +0 −29 messaging/rest/java/source/src/org/nimbustools/messaging/rest/UnknownUserException.java
  129. +0 −155 messaging/rest/java/source/src/org/nimbustools/messaging/rest/UsersResource.java
  130. +0 −62 messaging/rest/java/source/src/org/nimbustools/messaging/rest/UsersService.java
  131. +0 −57 messaging/rest/java/source/src/org/nimbustools/messaging/rest/repr/AccessKey.java
  132. +0 −38 messaging/rest/java/source/src/org/nimbustools/messaging/rest/repr/ErrorMessage.java
  133. +0 −58 messaging/rest/java/source/src/org/nimbustools/messaging/rest/repr/User.java
  134. +2 −0  metadata/java/source/build.xml
  135. +32 −0 scripts/check-jars.sh
  136. +14 −0 scripts/jars-build-and-install.sh
  137. +17 −7 scripts/lib/gt4.0/build/build.xml
  138. +1 −1  scripts/lib/gt4.0/dist/build.properties
  139. +90 −0 scripts/lib/web_ball.py
  140. +70 −0 scripts/make-dist-remote.sh
  141. +65 −3 scripts/make-dist.sh
  142. +2 −0  service-api/java/source/build.xml
  143. +14 −0 service/client/java/source/build.xml
  144. +7 −0 service/client/java/source/src/org/globus/workspace/client_common/TempBaseClient.java
  145. +101 −0 service/client/java/source/src/org/globus/workspace/client_core/utils/NimbusCredential.java
  146. +89 −0 service/client/java/source/src/org/globus/workspace/cloud/client/AllArgs.java
  147. +29 −33 service/client/java/source/src/org/globus/workspace/cloud/client/CloudClient.java
  148. +15 −0 service/client/java/source/src/org/globus/workspace/cloud/client/Props.java
  149. +7 −0 service/client/java/source/src/org/globus/workspace/cloud/client/StubConf.java
  150. +7 −22 service/client/java/source/src/org/globus/workspace/cloud/client/security/SecurityPrinter.java
  151. +172 −17 service/client/java/source/src/org/globus/workspace/cloud/client/util/CloudClientUtil.java
  152. +24 −2 service/client/java/source/src/org/globus/workspace/cloud/client/util/CumulusRepositoryUtil.java
  153. +243 −20 service/client/java/source/src/org/globus/workspace/cloud/client/util/CumulusTask.java
  154. +2 −2 service/client/java/source/src/org/globus/workspace/cloud/client/util/GridFTPRepositoryUtil.java
  155. +8 −8 service/client/java/source/src/org/globus/workspace/cloud/meta/client/Cloud.java
  156. +2 −0  service/service/java/source/build.xml
  157. +14 −2 service/service/java/source/etc/workspace-service/global-policies.conf
  158. +1 −0  service/service/java/source/etc/workspace-service/other/authz-callout-ACTIVE.xml
  159. +1 −0  service/service/java/source/etc/workspace-service/other/authz-callout-sql.xml
  160. +2 −1  service/service/java/source/etc/workspace-service/other/main.xml
  161. +4 −3 service/service/java/source/src/org/globus/workspace/network/defaults/DefaultAssociationAdapter.java
  162. +58 −5 service/service/java/source/src/org/globus/workspace/sqlauthz/AuthzDecisionLogic.java
  163. +0 −18 service/service/java/source/src/org/globus/workspace/sqlauthz/SqlAuthz.java
  164. +1 −7 service/service/java/tests/suites/basic/home/services/etc/nimbus/elastic/other/main.conflocator.xml
  165. +0 −12 service/service/java/tests/suites/basic/home/services/etc/nimbus/elastic/other/main.xml
  166. +2 −5 service/service/java/tests/suites/basic/home/services/etc/nimbus/query/query.conf
  167. +0 −5 service/service/java/tests/suites/basic/home/services/etc/nimbus/query/users.txt
  168. +0 −77 service/service/java/tests/suites/basic/home/services/etc/nimbus/rest/other/main-fake.xml
  169. +0 −28 service/service/java/tests/suites/basic/home/services/etc/nimbus/rest/other/main.conflocator.xml
  170. +0 −86 service/service/java/tests/suites/basic/home/services/etc/nimbus/rest/other/main.xml
  171. +0 −12 service/service/java/tests/suites/basic/home/services/etc/nimbus/rest/rest.conf
  172. +1 −0  service/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/authz-callout-sql.xml
  173. +2 −1  service/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/main.xml
  174. +23 −0 tests/ec2-tests.sh
  175. +2 −1  tests/{ec2_test.py → ec2_repo_test.py}
  176. +112 −0 tests/ec2_submit_tests.py
  177. +71 −0 tests/reset_tests.py
  178. +2 −4 tests/user-test.sh
  179. +100 −0 tests/user_failures_tests.py
  180. +17 −0 tests/user_tests.py
  181. +9 −17 web/lib/python/ProcessManager.py
  182. +0 −4 web/nimbusweb.conf
  183. +8 −0 web/sbin/new-conf.sh
  184. +0 −31 web/src/python/nimbusrest/__init__.py
  185. +0 −61 web/src/python/nimbusrest/admin/__init__.py
  186. +0 −79 web/src/python/nimbusrest/admin/connection.py
  187. +0 −46 web/src/python/nimbusrest/admin/tests.py
  188. +0 −127 web/src/python/nimbusrest/connection.py
  189. +0 −80 web/src/python/nimbusrest/error.py
  190. +0 −28 web/src/python/nimbusrest/tests.py
  191. +1 −0  web/src/python/nimbusweb/portal/nimbus/adminops.py
  192. +4 −1 web/src/python/nimbusweb/portal/nimbus/create_web_user.py
  193. +5 −0 web/src/python/nimbusweb/portal/nimbus/forms.py
  194. +1 −1  web/src/python/nimbusweb/portal/nimbus/models.py
  195. +0 −41 web/src/python/nimbusweb/portal/nimbus/remote.py
  196. +0 −52 web/src/python/nimbusweb/portal/nimbus/tests.py
  197. +1 −0  web/src/python/nimbusweb/portal/nimbus/views.py
  198. +0 −1  web/src/python/nimbusweb/portal/settings.py
  199. +8 −0 web/src/python/nimbusweb/portal/templates/nimbus/admin.html
  200. +7 −4 web/src/python/nimbusweb/portal/templates/nimbus/profile.html
  201. +0 −1  web/src/python/nimbusweb/portal/urls.py
  202. +0 −19 web/src/python/nimbusweb/portal/usercreate/README
  203. 0  web/src/python/nimbusweb/portal/usercreate/__init__.py
  204. +0 −81 web/src/python/nimbusweb/portal/usercreate/create.py
  205. +0 −16 web/src/python/nimbusweb/portal/usercreate/forms.py
  206. +0 −7 web/src/python/nimbusweb/portal/usercreate/urls.py
  207. +0 −16 web/src/python/nimbusweb/portal/usercreate/util.py
  208. +0 −109 web/src/python/nimbusweb/portal/usercreate/views.py
  209. +1 −5 web/src/python/nimbusweb/setup/newconf.py
  210. +1 −4 web/src/python/nimbusweb/setup/setup.py
View
34 .idea-modules/rest/rest.iml
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="Spring" name="Spring">
- <configuration>
- <fileset id="fileset1" name="rest-springfiles" removed="false">
- <file>file://$MODULE_DIR$/../../messaging/rest/java/source/etc/rest/other/main.conflocator.xml</file>
- <file>file://$MODULE_DIR$/../../messaging/rest/java/source/etc/rest/other/main.xml</file>
- </fileset>
- </configuration>
- </facet>
- </component>
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../../messaging/rest/java/source">
- <sourceFolder url="file://$MODULE_DIR$/../../messaging/rest/java/source/src" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="common" />
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/services/gson-1.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="library" name="cxf-libs" level="project" />
- <orderEntry type="module" module-name="installer" />
- </component>
-</module>
-
View
7 .idea/libraries/cloud_client_libs.xml
@@ -6,9 +6,14 @@
<root url="jar://$PROJECT_DIR$/lib/clients/globus_delegation_stubs.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/services/commons-cli-2.0.jar!/" />
<root url="file://$PROJECT_DIR$/lib/clients" />
+ <root url="file://$PROJECT_DIR$/lib/clients" />
</CLASSES>
<JAVADOC />
- <SOURCES />
+ <SOURCES>
+ <root url="file://$PROJECT_DIR$/../../jets3/jets3t-0.7.3/src" />
+ <root url="jar://$PROJECT_DIR$/lib/clients/httpcore-4.0.1.jar!/" />
+ <root url="jar://$PROJECT_DIR$/lib/clients/httpclient-4.0.1.jar!/" />
+ </SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/clients" recursive="false" />
</library>
</component>
View
1  .idea/modules.xml
@@ -11,7 +11,6 @@
<module fileurl="file://$PROJECT_DIR$/.idea-modules/query/ec2query.iml" filepath="$PROJECT_DIR$/.idea-modules/query/ec2query.iml" group="protocols" />
<module fileurl="file://$PROJECT_DIR$/.idea-modules/ec2soap/ec2soap.iml" filepath="$PROJECT_DIR$/.idea-modules/ec2soap/ec2soap.iml" group="protocols" />
<module fileurl="file://$PROJECT_DIR$/.idea-modules/installer/installer.iml" filepath="$PROJECT_DIR$/.idea-modules/installer/installer.iml" />
- <module fileurl="file://$PROJECT_DIR$/.idea-modules/rest/rest.iml" filepath="$PROJECT_DIR$/.idea-modules/rest/rest.iml" group="protocols" />
<module fileurl="file://$PROJECT_DIR$/.idea-modules/rm-api/rm-api.iml" filepath="$PROJECT_DIR$/.idea-modules/rm-api/rm-api.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea-modules/service-suites//spotinstances.iml" filepath="$PROJECT_DIR$/.idea-modules/service-suites//spotinstances.iml" group="service-suites" />
<module fileurl="file://$PROJECT_DIR$/.idea-modules/service-suites/tests-common.iml" filepath="$PROJECT_DIR$/.idea-modules/service-suites/tests-common.iml" group="service-suites" />
View
2  authzdb/build.xml
@@ -57,6 +57,8 @@
<javac srcdir="${nimbus.authz.main.src.dir}"
destdir="${nimbus.authz.main.build.dest}"
classpathref="nimbus.authz.main.classpath"
+ source="1.5"
+ target="1.5"
debug="on">
<include name="**/*.java"/>
View
3  authzdb/src/org/nimbus/authz/AuthzDBAdapter.java
@@ -295,7 +295,6 @@ private int getParentObject(
if(!rs.next())
{
logger.debug("pstmt " + pstmt.toString());
- pstmt.close();
throw new AuthzDBException("no such parent file found " + objectName + " " + objectType);
}
int objectId = rs.getInt(1);
@@ -792,4 +791,4 @@ private void returnConnection(Connection connection)
}
}
}
-}
+}
View
14 autoconfiguration/build.xml
@@ -173,6 +173,8 @@
destdir="${nimbus.autoconfig.gt4_0.build.dest}"
classpathref="nimbus.autoconfig.gt4_0.classpath"
includeantruntime="false"
+ source="1.5"
+ target="1.5"
debug="on">
<include name="**/*.java"/>
@@ -253,6 +255,18 @@
</echo>
</target>
+
+ <!-- *******************************************************************
+ DEPLOY ONLY JARS (development target)
+ ******************************************************************* -->
+
+ <target name="justjars" depends="jar, lib_copies">
+ <echo message="Copying JARs: ${basedir}" />
+ <copy todir="${gt4_0.lib.dir}" >
+ <fileset refid="garjars" />
+ </copy>
+ </target>
+
<!-- *******************************************************************
DEPLOYMENT
View
160 autoconfiguration/share/autoconfig-adjustments.sh
@@ -108,7 +108,6 @@ function examine() {
fi
}
-examine NIMBUS_CONFIG_GLOBUS_LOCATION "$NIMBUS_CONFIG_GLOBUS_LOCATION"
examine NIMBUS_CONFIG_CONTAINER_RUNNER "$NIMBUS_CONFIG_CONTAINER_RUNNER"
examine NIMBUS_CONFIG_VMM_RUNNER "$NIMBUS_CONFIG_VMM_RUNNER"
examine NIMBUS_CONFIG_VMM_RUN_KEY "$NIMBUS_CONFIG_VMM_RUN_KEY"
@@ -128,7 +127,6 @@ examine NIMBUS_CONFIG_TEST_VM_NETWORK_DNS "$NIMBUS_CONFIG_TEST_VM_NETWORK_DNS"
if [ "Xnoprint" != "X$1" ]; then
echo ""
- echo " - The GLOBUS_LOCATION in use: $NIMBUS_CONFIG_GLOBUS_LOCATION"
echo " - The account running the container/service: $NIMBUS_CONFIG_CONTAINER_RUNNER"
echo " - The hostname running the container/service: $NIMBUS_CONFIG_CONTAINER_HOSTNAME"
echo " - The contact address of the container/service for notifications: $NIMBUS_CONFIG_SSH_USE_CONTACT_STRING (port $NIMBUS_CONFIG_SSH_USE_CONTACT_PORT)"
@@ -144,12 +142,6 @@ if [ "Xnoprint" != "X$1" ]; then
echo " - The workspace-control tmpdir on VMM: $NIMBUS_CONFIG_VMM_CONTROL_TMPDIR"
echo ""
- echo " - Test network address IP: $NIMBUS_CONFIG_TEST_VM_NETWORK_ADDRESS"
- echo " - Test network address hostname: $NIMBUS_CONFIG_TEST_VM_NETWORK_HOSTNAME"
- echo " - Test network address gateway: $NIMBUS_CONFIG_TEST_VM_NETWORK_GATEWAY"
- echo " - Test network address DNS: $NIMBUS_CONFIG_TEST_VM_NETWORK_DNS"
-
- echo ""
echo "----------"
echo ""
@@ -393,158 +385,6 @@ fi
# }}}
# -----------------------------------------------------------------------------
-# {{{ do network sample?
-# -----------------------------------------------------------------------------
-
-DO_NET="y"
-
-if [ "$NIMWIZ_NO_NETWORK_CONFIGS" = "$NIMBUS_CONFIG_TEST_VM_NETWORK_ADDRESS" ]; then
- echo "Not configuring test network."
- DO_NET="n"
-fi
-
-if [ "$NOT_SET" = "$NIMBUS_CONFIG_TEST_VM_NETWORK_ADDRESS" ]; then
- echo "Warning: not enough information available to create a test network. No IP address."
- DO_NET="n"
-fi
-
-if [ "$DO_NET" = "y" ]; then
- if [ "$NOT_SET" = "$NIMBUS_CONFIG_TEST_VM_NETWORK_HOSTNAME" ]; then
- echo "Warning: not enough information available to create a test network. No hostname."
- DO_NET="n"
- fi
-fi
-
-if [ "$DO_NET" = "y" ]; then
- if [ "$NOT_SET" = "$NIMBUS_CONFIG_TEST_VM_NETWORK_GATEWAY" ]; then
- echo "Warning: not enough information available to create a test network. No gateway setting (this may be set to 'none' by the way)."
- DO_NET="n"
- fi
-fi
-
-if [ "$DO_NET" = "y" ]; then
- if [ "$NOT_SET" = "$NIMBUS_CONFIG_TEST_VM_NETWORK_DNS" ]; then
- echo "Warning: not enough information available to create a test network. No DNS setting (this may be set to 'none' by the way)."
- DO_NET="n"
- fi
-fi
-
-if [ "$DO_NET" = "n" ]; then
- echo ""
- echo "----------"
- echo ""
-fi
-
-# }}}
-
-# -----------------------------------------------------------------------------
-# {{{ backup networks
-# -----------------------------------------------------------------------------
-
-if [ "$DO_NET" = "y" ]; then
-
- VMMNETDIR=`$JAVA_BIN $NIMWIZ_JAVA_OPTS $EXE_GET_NETWORKDIR`
- if [ $? -ne 0 ]; then
- exit 1
- fi
-
- echo "[*] Backing up old network settings"
-
- if [ ! -d $VMMNETDIR ]; then
- echo "Not a directory? '$VMMNETDIR'"
- exit 1
- fi
-
- BASE_BACKUP_DIR="$VMMNETDIR/.backups"
-
- if [ -d "$BASE_BACKUP_DIR" ]; then
- #echo " ... base backups directory exists already '$BASE_BACKUP_DIR'"
- true
- else
- mkdir $BASE_BACKUP_DIR
- if [ $? -ne 0 ]; then
- echo ""
- echo "Problem creating directory: $BASE_BACKUP_DIR"
- exit 1
- fi
- #echo " ... created base backup directory '$BASE_BACKUP_DIR'"
- fi
-
- NEW_BACKUP_DIR=`$JAVA_BIN $NIMWIZ_JAVA_OPTS $EXE_CREATE_BACKUP_DIR $BASE_BACKUP_DIR old-networks-`
- if [ $? -ne 0 ]; then
- echo ""
- echo "Problem, exiting."
- exit 1
- fi
- echo " ... created new directory '$NEW_BACKUP_DIR'"
-
- for f in `ls $VMMNETDIR`; do
-
- CMD="mv $VMMNETDIR/$f $NEW_BACKUP_DIR/"
- $CMD
- if [ $? -ne 0 ]; then
- echo "This failed: $CMD"
- exit 1
- fi
- echo " ... moved '$f' to '$NEW_BACKUP_DIR'"
-
- done
-
- echo ""
- echo "----------"
- echo ""
-
-fi
-
-# }}}
-
-# -----------------------------------------------------------------------------
-# {{{ create sample network
-# -----------------------------------------------------------------------------
-
-if [ "$DO_NET" = "y" ]; then
-
- echo "[*] Creating new network called '$NEW_NET_NAME'"
-
- NETPATH="$VMMNETDIR/$NEW_NET_NAME"
-
- cp $NETWORK_TEMPLATE_FILE $NETPATH
- if [ $? -ne 0 ]; then
- echo "Could not create '$NETPATH' ?"
- exit 1
- fi
-
- DATE=`date`
- echo "# File contents injected @ $DATE" >> $NETPATH
- if [ $? -ne 0 ]; then
- echo "Could not write to '$NETPATH' ?"
- exit 1
- fi
-
- echo "" >> $NETPATH
- echo "# DNS server IP or 'none'" >> $NETPATH
- echo "$NIMBUS_CONFIG_TEST_VM_NETWORK_DNS" >> $NETPATH
- echo "" >> $NETPATH
-
-
- hostname="$NIMBUS_CONFIG_TEST_VM_NETWORK_HOSTNAME"
- ipaddress="$NIMBUS_CONFIG_TEST_VM_NETWORK_ADDRESS"
- gateway="$NIMBUS_CONFIG_TEST_VM_NETWORK_GATEWAY"
- broadcast="none" # this makes Nimbus guess
- subnetmask="none" # this makes Nimbus guess
-
- echo "# hostname ipaddress gateway broadcast subnetmask" >> $NETPATH
- echo "$hostname $ipaddress $gateway $broadcast $subnetmask" >> $NETPATH
- echo "" >> $NETPATH
-
- echo " ... created '$NETPATH'"
- echo "----------"
- echo ""
-fi
-
-# }}}
-
-# -----------------------------------------------------------------------------
# {{{ turn off fake mode; other/common.conf --> fake.mode (set to false)
# -----------------------------------------------------------------------------
View
257 autoconfiguration/share/autoconfig.sh
@@ -28,8 +28,6 @@ THISDIR=`cd $THISDIR_REL; pwd`
GLOBUS_LOCATION=`cd $THISDIR/../../; pwd`
export GLOBUS_LOCATION
-echo "Using GLOBUS_LOCATION: $GLOBUS_LOCATION"
-
# -----------------------------------------------------------------------------
# {{{ get nimbus-wizard environment
# -----------------------------------------------------------------------------
@@ -81,7 +79,6 @@ fi
# -----------------------------------------------------------------------------
function unset_all_global_config_settings() {
- unset NIMBUS_CONFIG_GLOBUS_LOCATION
unset NIMBUS_CONFIG_CONTAINER_RUNNER
unset NIMBUS_CONFIG_VMM_RUNNER
unset NIMBUS_CONFIG_VMM_RUN_KEY
@@ -104,7 +101,7 @@ if [ -f $NIMWIZ_DECISIONS_FILE ]; then
source $NIMWIZ_DECISIONS_FILE
- if [ "X" != "X$NIMBUS_CONFIG_GLOBUS_LOCATION$NIMBUS_CONFIG_CONTAINER_RUNNER$NIMBUS_CONFIG_VMM_RUNNER$NIMBUS_CONFIG_VMM_RUN_KEY$NIMBUS_CONFIG_CONTAINER_HOSTNAME$NIMBUS_CONFIG_SSH_USE_CONTACT_STRING$NIMBUS_CONFIG_TEST_VMM$NIMBUS_CONFIG_VMM_CONTROL_EXE$NIMBUS_CONFIG_VMM_CONTROL_TMPDIR$NIMBUS_CONFIG_TEST_VM_NETWORK_ADDRESS$NIMBUS_CONFIG_TEST_VM_NETWORK_HOSTNAME$NIMBUS_CONFIG_TEST_VM_NETWORK_GATEWAY$NIMBUS_CONFIG_TEST_VM_NETWORK_DNS$NIMBUS_CONFIG_TEST_VMM_RAM" ]; then
+ if [ "X" != "X$NIMBUS_CONFIG_CONTAINER_RUNNER$NIMBUS_CONFIG_VMM_RUNNER$NIMBUS_CONFIG_VMM_RUN_KEY$NIMBUS_CONFIG_CONTAINER_HOSTNAME$NIMBUS_CONFIG_SSH_USE_CONTACT_STRING$NIMBUS_CONFIG_TEST_VMM$NIMBUS_CONFIG_VMM_CONTROL_EXE$NIMBUS_CONFIG_VMM_CONTROL_TMPDIR$NIMBUS_CONFIG_TEST_VMM_RAM" ]; then
echo ""
echo "It looks like you already have a file with one or more configuration decisions at:"
@@ -132,7 +129,7 @@ function get_y_n() {
count=$((count + 1))
echo ""
echo "$1 y/n:"
- read response
+ read -e response
if [ "$response" = "y" ]; then
RESPONSE="y"
count=10
@@ -166,7 +163,7 @@ function get_STRING_ANSWER() {
count=$((count + 1))
echo ""
echo "$1"
- read response
+ read -e response
if [ "X$response" = "X" ]; then
echo ""
echo "Please enter something."
@@ -192,7 +189,7 @@ function get_STRING_ANSWER() {
CONTAINER_RUNNER=`whoami`
-get_y_n "Is the current account ($CONTAINER_RUNNER) the one the container will run under?"
+get_y_n "Is the current account ($CONTAINER_RUNNER) the one the service will run under?"
if [ $? -ne 0 ]; then
echo ""
echo "Sorry, please run the wizard with the account the container will run under on the machine the container will run on."
@@ -223,12 +220,12 @@ TEST_VMM="$STRING_ANSWER"
echo ""
echo "----------"
-QUESTION="How much RAM (MB) should be allocated for a test VM on the '$TEST_VMM' VMM?"
+QUESTION="How much RAM (MB) should be allocated for VMs on the '$TEST_VMM' VMM?"
get_STRING_ANSWER "$QUESTION"
TEST_VMM_RAM="$STRING_ANSWER"
echo ""
-echo "Will allocate $TEST_VMM_RAM MB RAM for test VM on the '$TEST_VMM' VMM."
+echo "Will allocate $TEST_VMM_RAM MB RAM for VMs on the '$TEST_VMM' VMM."
echo ""
echo "----------"
@@ -278,7 +275,7 @@ if [ $? -eq 0 ]; then
count=$((count + 1))
echo ""
echo "What is the absolute path to the private key to use that allows '$CONTAINER_RUNNER' to ssh to '$VMM_RUNNER'? "
- read response
+ read -e response
if [ "X$response" != "X" ]; then
if [ "${response:0:1}" != "/" ]; then
echo "Not an absolute path: $response"
@@ -407,7 +404,7 @@ while [ $count -lt 6 ]; do
count=$((count + 1))
echo ""
echo "Is your local SSHd server on a port different than 22? Enter 'n' or a port number: "
- read ssh_port
+ read -e ssh_port
if [ "$ssh_port" = "n" ]; then
SSH_PORT=22
count=10
@@ -448,7 +445,7 @@ while [ $count -lt 6 ]; do
echo "If you need to change something in the provided answers, re-run the wizard."
echo ""
echo "Otherwise, start a server and press any key to try the test again"
- read response
+ read -e response
fi
done
@@ -559,7 +556,7 @@ if [ $? -eq 0 ]; then
count=$((count + 1))
echo ""
echo "What is the absolute path to workspace-control on the VMM node?"
- read response
+ read -e response
if [ "X$response" != "X" ]; then
if [ "${response:0:1}" != "/" ]; then
echo "Not an absolute path: $response"
@@ -626,7 +623,7 @@ while [ $count -lt 6 ]; do
echo "We are looking for the directory on the VMM to push customization files from the container node. This defaults to '$CONTROL_TMPDIR'"
echo ""
echo "Did you install workspace-control under some other base directory besides /opt/nimbus? y/n: "
- read response
+ read -e response
if [ "$response" = "y" ]; then
RESPONSE="y"
count=10
@@ -653,7 +650,7 @@ if [ "y" = "$RESPONSE" ]; then
echo ""
echo "It's typically at 'BASEDIR/var/workspace-control/tmp' if workspace-control is at 'BASEDIR/bin/workspace-control.sh'"
- read response
+ read -e response
if [ "X$response" != "X" ]; then
if [ "${response:0:1}" != "/" ]; then
echo "Not an absolute path: $response"
@@ -710,215 +707,6 @@ fi
# }}}
-# -----------------------------------------------------------------------------
-# {{{ test network
-# -----------------------------------------------------------------------------
-
-echo ""
-echo "----------"
-echo ""
-echo "Great."
-echo ""
-echo "---------------------------------------------------------------------"
-echo "---------------------------------------------------------------------"
-echo ""
-echo "Now you will choose a test network address to give to an incoming VM."
-
-QUESTION="Does the test VMM ($TEST_VMM) have an IP address on the same subnet that VMs will be assigned network addresses from?"
-get_y_n "$QUESTION"
-if [ $? -ne 0 ]; then
- echo ""
- echo "----------"
- echo ""
- echo "The configuration wizard cannot help you with this situation, you must see the 'EXPLANATION' section in the 'aux/foreign-subnet.py' file for more information."
- echo ""
- echo "The DHCP server (running in domain 0) must have a presence on the subnet in order to assign network addresses."
- echo ""
- echo "The foreign-subnet.py script allows you to 'fake' this address, but this is out of scope of the configuration wizard."
-
- RESPONSE2="undefined"
- count=0
- while [ $count -lt 6 ]; do
- count=$((count + 1))
- echo ""
- echo "In light of that, would you like to skip over the network questions coming up (which only handle a same-subnet address)? y/n"
- read response2
- if [ "$response2" = "y" ]; then
- RESPONSE2="y"
- count=10
- elif [ "$response2" = "n" ]; then
- RESPONSE2="n"
- count=10
- else
- echo "Please enter 'y' or 'n'"
- fi
- done
-
- if [ "undefined" = "$RESPONSE2" ]; then
- echo ""
- echo "Exiting, no response"
- exit 1
- fi
-
-fi
-
-if [ "Xy" = "X$RESPONSE2" ]; then
-
- echo ""
- echo "Skipping network questions..."
- echo ""
-
- TEST_VM_NETWORK_ADDRESS="$NIMWIZ_NO_NETWORK_CONFIGS"
- TEST_VM_NETWORK_HOSTNAME="$NIMWIZ_NO_NETWORK_CONFIGS"
- TEST_VM_NETWORK_GATEWAY="$NIMWIZ_NO_NETWORK_CONFIGS"
- TEST_VM_NETWORK_DNS="$NIMWIZ_NO_NETWORK_CONFIGS"
-
-else
-
- echo "----------"
-
- SAMPLEIP=`$JAVA_BIN $NIMWIZ_JAVA_OPTS $EXE_HOSTLOOKUP $TEST_VMM`
- if [ $? -ne 0 ]; then
- QUESTION="What is a free IP address on the same subnet as '$TEST_VMM'?"
- else
- QUESTION="What is a free IP address on the same subnet as '$TEST_VMM' (whose IP address is '$SAMPLEIP')"
- fi
-
- NO_NETTEST_RESPONSE="undefined_1298312987"
- TEST_VM_NETWORK_ADDRESS="$NO_NETTEST_RESPONSE"
-
- count=0
- while [ $count -lt 4 ]; do
- count=$((count + 1))
- echo ""
- echo "$QUESTION"
- read response
- if [ "X$response" != "X" ]; then
- TEST_VM_NETWORK_ADDRESS="$response"
- count=10
- else
- echo "Please enter an IP address."
- fi
- done
-
- if [ "$NO_NETTEST_RESPONSE" = "$TEST_VM_NETWORK_ADDRESS" ]; then
- echo ""
- echo "Exiting, no response"
- exit 1
- fi
-
- echo ""
- echo "----------"
-
- QUESTION="Even if it does not resolve, a hostname is required for '$TEST_VM_NETWORK_ADDRESS' to include in the DHCP lease the VM will get:"
-
- NO_NETTEST_HOSTNAME_RESPONSE="undefined_1298312987"
- TEST_VM_NETWORK_HOSTNAME="$NO_NETTEST_HOSTNAME_RESPONSE"
-
- count=0
- while [ $count -lt 4 ]; do
- count=$((count + 1))
- echo ""
- echo "$QUESTION"
- read response
- if [ "X$response" != "X" ]; then
- TEST_VM_NETWORK_HOSTNAME="$response"
- count=10
- else
- echo "Please enter a hostname."
- fi
- done
-
- if [ "$TEST_VM_NETWORK_HOSTNAME" = "$NO_NETTEST_HOSTNAME_RESPONSE" ]; then
- echo ""
- echo "Exiting, no response"
- exit 1
- fi
-
- echo ""
- echo "----------"
- QUESTION_BEGIN="What is the default gateway for $TEST_VM_NETWORK_ADDRESS?"
-
- DEFAULT_GATEWAY_GUESS=`$SSH_CMD /sbin/route -n | grep "^0.0.0.0" | awk '{ print $2 }'`
-
- if [ $? -ne 0 ]; then
- QUESTION="$QUESTION_BEGIN"
- else
- QUESTION="$QUESTION_BEGIN (guessing it is $DEFAULT_GATEWAY_GUESS)"
- fi
-
-
- NO_NETTEST_GATEWAY_RESPONSE="undefined_1298312987"
- TEST_VM_NETWORK_GATEWAY="$NO_NETTEST_GATEWAY_RESPONSE"
-
- count=0
- while [ $count -lt 4 ]; do
- count=$((count + 1))
- echo ""
- echo "$QUESTION"
- echo "You can type 'none' if you are sure you don't want the VM to have a gateway"
- read response
- if [ "X$response" != "X" ]; then
- TEST_VM_NETWORK_GATEWAY="$response"
- count=10
- else
- echo "Please enter a gateway IP address or type 'none'."
- fi
- done
-
- if [ "$TEST_VM_NETWORK_GATEWAY" = "$NO_NETTEST_GATEWAY_RESPONSE" ]; then
- echo ""
- echo "Exiting, no response"
- exit 1
- fi
-
- echo ""
- echo "----------"
- QUESTION_BEGIN="What is the IP address of the DNS server that should be used by the VM?"
-
- DNS_GUESS=`$SSH_CMD grep nameserver /etc/resolv.conf | head -n 1 | awk '{ print $2 }'`
-
- if [ $? -ne 0 ]; then
- QUESTION="$QUESTION_BEGIN"
- else
- QUESTION="$QUESTION_BEGIN (guessing it is $DNS_GUESS)"
- fi
-
-
- NO_NETTEST_DNS_RESPONSE="undefined_1298312987"
- TEST_VM_NETWORK_DNS="$NO_NETTEST_DNS_RESPONSE"
-
- count=0
- while [ $count -lt 4 ]; do
- count=$((count + 1))
- echo ""
- echo "$QUESTION"
- echo "You can type 'none' if you are sure you don't want the VM to have DNS"
- read response
- if [ "X$response" != "X" ]; then
- TEST_VM_NETWORK_DNS="$response"
- count=10
- else
- echo "Please enter a DNS IP address or type 'none'."
- fi
- done
-
- if [ "$TEST_VM_NETWORK_DNS" = "$NO_NETTEST_DNS_RESPONSE" ]; then
- echo ""
- echo "Exiting, no response"
- exit 1
- fi
-
-
- echo "----------"
- echo ""
- echo "OK, in the 'make adjustments' step that follows, the service will be configured to provide this ONE network address to ONE guest VM."
- echo ""
- echo "You should add more VMMs and more available network addresses to assign guest VMs only after you successfully test with one VMM and one network address."
- echo ""
-fi
-
-# }}}
# -----------------------------------------------------------------------------
# {{{ export decisions
@@ -932,7 +720,6 @@ echo "So far, no configurations have been changed. The following adjustments wi
unset_all_global_config_settings
-NIMBUS_CONFIG_GLOBUS_LOCATION="$GLOBUS_LOCATION"
NIMBUS_CONFIG_CONTAINER_RUNNER="$CONTAINER_RUNNER"
NIMBUS_CONFIG_VMM_RUNNER="$VMM_RUNNER"
NIMBUS_CONFIG_VMM_RUN_KEY="$VMM_RUN_KEY"
@@ -943,13 +730,8 @@ NIMBUS_CONFIG_TEST_VMM="$TEST_VMM"
NIMBUS_CONFIG_TEST_VMM_RAM="$TEST_VMM_RAM"
NIMBUS_CONFIG_VMM_CONTROL_EXE="$EFFECTIVE_VMM_CONTROL_EXE"
NIMBUS_CONFIG_VMM_CONTROL_TMPDIR="$EFFECTIVE_VMM_CONTROL_TMPDIR"
-NIMBUS_CONFIG_TEST_VM_NETWORK_ADDRESS="$TEST_VM_NETWORK_ADDRESS"
-NIMBUS_CONFIG_TEST_VM_NETWORK_HOSTNAME="$TEST_VM_NETWORK_HOSTNAME"
-NIMBUS_CONFIG_TEST_VM_NETWORK_GATEWAY="$TEST_VM_NETWORK_GATEWAY"
-NIMBUS_CONFIG_TEST_VM_NETWORK_DNS="$TEST_VM_NETWORK_DNS"
echo ""
-echo " - The GLOBUS_LOCATION in use: $NIMBUS_CONFIG_GLOBUS_LOCATION"
echo " - The account running the container/service: $NIMBUS_CONFIG_CONTAINER_RUNNER"
echo " - The hostname running the container/service: $NIMBUS_CONFIG_CONTAINER_HOSTNAME"
echo " - The contact address of the container/service for notifications: $NIMBUS_CONFIG_SSH_USE_CONTACT_STRING (port $NIMBUS_CONFIG_SSH_USE_CONTACT_PORT)"
@@ -965,12 +747,6 @@ echo " - The workspace-control path on VMM: $NIMBUS_CONFIG_VMM_CONTROL_EXE"
echo " - The workspace-control tmpdir on VMM: $NIMBUS_CONFIG_VMM_CONTROL_TMPDIR"
echo ""
-echo " - Test network address IP: $NIMBUS_CONFIG_TEST_VM_NETWORK_ADDRESS"
-echo " - Test network address hostname: $NIMBUS_CONFIG_TEST_VM_NETWORK_HOSTNAME"
-echo " - Test network address gateway: $NIMBUS_CONFIG_TEST_VM_NETWORK_GATEWAY"
-echo " - Test network address DNS: $NIMBUS_CONFIG_TEST_VM_NETWORK_DNS"
-
-echo ""
echo "----------"
echo ""
@@ -1000,7 +776,6 @@ function append_nameval() {
echo "" >> $NIMWIZ_DECISIONS_FILE
}
-append_nameval NIMBUS_CONFIG_GLOBUS_LOCATION "$NIMBUS_CONFIG_GLOBUS_LOCATION"
append_nameval NIMBUS_CONFIG_CONTAINER_RUNNER "$NIMBUS_CONFIG_CONTAINER_RUNNER"
append_nameval NIMBUS_CONFIG_VMM_RUNNER "$NIMBUS_CONFIG_VMM_RUNNER"
append_nameval NIMBUS_CONFIG_VMM_RUN_KEY "$NIMBUS_CONFIG_VMM_RUN_KEY"
@@ -1013,12 +788,6 @@ append_nameval NIMBUS_CONFIG_TEST_VMM_RAM "$NIMBUS_CONFIG_TEST_VMM_RAM"
append_nameval NIMBUS_CONFIG_VMM_CONTROL_EXE "$NIMBUS_CONFIG_VMM_CONTROL_EXE"
append_nameval NIMBUS_CONFIG_VMM_CONTROL_TMPDIR "$NIMBUS_CONFIG_VMM_CONTROL_TMPDIR"
-
-append_nameval NIMBUS_CONFIG_TEST_VM_NETWORK_ADDRESS "$NIMBUS_CONFIG_TEST_VM_NETWORK_ADDRESS"
-append_nameval NIMBUS_CONFIG_TEST_VM_NETWORK_HOSTNAME "$NIMBUS_CONFIG_TEST_VM_NETWORK_HOSTNAME"
-append_nameval NIMBUS_CONFIG_TEST_VM_NETWORK_GATEWAY "$NIMBUS_CONFIG_TEST_VM_NETWORK_GATEWAY"
-append_nameval NIMBUS_CONFIG_TEST_VM_NETWORK_DNS "$NIMBUS_CONFIG_TEST_VM_NETWORK_DNS"
-
echo "" >> $NIMWIZ_DECISIONS_FILE
echo ""
@@ -1036,7 +805,7 @@ while [ $count -lt 6 ]; do
count=$((count + 1))
echo ""
echo "OK, point of no return. Proceed? y/n"
- read do_proceed
+ read -e do_proceed
if [ "$do_proceed" = "y" ]; then
PROCEED="y"
count=10
View
9 autoconfiguration/share/lib/common-env.sh
@@ -100,9 +100,6 @@ export EXE_ALTER_CONTROLTMPDIR
EXE_GET_VMMDIR="org.nimbustools.auto_config.confmgr.GetVmmPoolDirectory"
export EXE_GET_VMMDIR
-EXE_GET_NETWORKDIR="org.nimbustools.auto_config.confmgr.GetNetworkDirectory"
-export EXE_GET_NETWORKDIR
-
EXE_CREATE_BACKUP_DIR="org.nimbustools.auto_common.dirmgr.CreateNewNumberedDirectory"
export EXE_CREATE_BACKUP_DIR
@@ -112,12 +109,6 @@ export RESOURCE_POOL_TEMPLATE_FILE
NEW_POOL_NAME="testpool"
export NEW_POOL_NAME
-NETWORK_TEMPLATE_FILE="$NIMBUS_WIZARD_LIBDIR/network-template.txt"
-export NETWORK_TEMPLATE_FILE
-
-NEW_NET_NAME="public"
-export NEW_NET_NAME
-
EXE_ALTER_FAKEMODE="org.nimbustools.auto_config.confmgr.AlterFakeMode"
export EXE_ALTER_FAKEMODE
View
16 autoconfiguration/share/lib/network-template.txt
@@ -1,16 +0,0 @@
-# The first non-blank, non-comment line must be the DNS server you would
-# like to tell the VMs receiving addresses from this network pool to use.
-
-# The rest of the file's non-blank, non-comment lines are the addresses
-# that will be leased out to VMs requesting this network.
-
-# Currently there are no syntax shortcuts, each field must have an entry
-# or the keyword 'none'.
-
-# The IP address and hostname fields may not be 'none'.
-# If the gateway is 'none', no gateway is assigned.
-# If broadcast or subnetmask are 'none' they are derived from the IP
-# - based on the normal subnet and broadcast for the IP class (A,B,C)
-
-
-
View
2  cloud-client/builder/environment.sh
@@ -2,7 +2,7 @@ if [ ! "X$CLCLBUILDER_ENVIRONMENT_DEFINED" = "X" ]; then
return 0
fi
-export CLCLBUILDER_RELEASE_NAME="nimbus-cloud-client-016"
+export CLCLBUILDER_RELEASE_NAME="nimbus-cloud-client-016RC2"
# #########################################################
View
12 cloud-client/nimbus-cloud-client-src/CHANGES.txt
@@ -17,6 +17,18 @@ nimbus-cloud-client-016
usually recommend the number to use.
http://bugzilla.mcs.anl.gov/globus/show_bug.cgi?id=7062
+[*] When using the cloud client, you may now export NIMBUS_X509_TRUSTED_CERTS
+ to override using the lib/certs directory. This is intentionally different
+ than X509_CERT_DIR in order to allow coexistence with 'grid' software
+ environments.
+
+[*] Added support for using unencrypted keys directly instead of needing to
+ run proxy-init. The properties 'nimbus.cert' and 'nimbus.key' are consulted
+ first if they exist, then a normal grid proxy search is made, then ~/.nimbus
+ is consulted for an unencrypted usercert.pem and userkey.pem (which will be
+ the most typical/recommended situation), then ~/.globus.
+ See the README for details.
+
nimbus-cloud-client-015
-----------------------
View
51 cloud-client/nimbus-cloud-client-src/README.txt
@@ -23,18 +23,52 @@ You need to have Java installed in order to run this.
Security
--------
-1. Obtain a credential. If you do not have a proxy credential in place, you
- can use the embedded Globus libraries to run grid-proxy-init like so:
+1. Obtain a credential.
+
+The cloud administrator should have either provided you one or authorized your
+preexisting credential.
+
+The search path the cloud client uses is as follows:
+
+ A. props
+
+ If "nimbus.cert" and "nimbus.key" are in the properties file and point to
+ an unencrypted credential, they trump all. These are not present by default
+ but allow an advanced user to easily toggle between clouds by using the
+ --conf switch.
+
+ B. proxy
+
+ If a normal proxy is present in the /tmp directory and is still valid, that
+ is used. This lets the cloud work with all existing certs, tooling, MyProxy,
+ etc.
+
+ C. ~/.nimbus/
+
+ If ~/.nimbus/usercert.pem and ~/.nimbus/userkey.pem are present and the key
+ is unencrypted, use this. No proxy is required or created. This is what
+ most will use.
+
+ D. ~/.globus/
+
+ Same as #3 but with ~/.globus
+
+
+
+If you want to go the proxy credential route (for example, you have a 'grid'
+certificate), and do not have a proxy credential in place, you can use an embedded
+program to run grid-proxy-init like so:
$ ./bin/grid-proxy-init.sh
- Issues? Try our mailing list and/or run:
+Issues? Try our mailing list and/or run:
$ ./bin/grid-proxy-init.sh -help
- grid-proxy-init cannot find your credential's CA files? try:
+grid-proxy-init cannot find your credential's CA files? They are normally in
+the "lib/certs" directory of the cloud client but you can override like so:
- $ export X509_CERT_DIR="/path/to/certificates_directory"
+ $ export NIMBUS_X509_TRUSTED_CERTS="/path/to/certificates_directory"
2. Test the security setup.
@@ -42,8 +76,9 @@ Security
$ ./bin/cloud-client.sh --security
-3. If you have not given your DN to the cloud administrators, do so sending
- the distinguished name printed after 'Identity:'
+3. If you already have a credential and have not given your DN to the cloud
+ administrators, do so sending the distinguished name printed after 'Identity'
+
Configuring The Cloud
@@ -71,6 +106,7 @@ provides settings of the University of Chicago nimbus cloud and can be
referenced by the name "nimbus".
+
Uploading A Workspace To The Cloud
----------------------------------
@@ -91,6 +127,7 @@ Uploading A Workspace To The Cloud
There are also --download (get an image in your personal directory) and
--delete (delete an image in your personal directory) options.
+
SSH Notes
---------
View
6 cloud-client/nimbus-cloud-client-src/bin/cloud-client.sh
@@ -8,7 +8,11 @@ USER_PROPFILE="$BASEDIR/conf/cloud.properties"
HISTORY_DIR="$BASEDIR/history"
EMBEDDED_CADIR="$BASEDIR/lib/certs"
-X509_CERT_DIR="$EMBEDDED_CADIR"
+if [ -n "$NIMBUS_X509_TRUSTED_CERTS" ]; then
+ X509_CERT_DIR="$NIMBUS_X509_TRUSTED_CERTS"
+else
+ X509_CERT_DIR="$EMBEDDED_CADIR"
+fi
export X509_CERT_DIR
OLD_GLOBUS_LOCATION=""
View
12 control/bin/fakesudo
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# This script is a passthrough.
+#
+# In some situations it might make sense to simply run workspace-control as
+# root. In this case, you can configure the sudo program in sudo.conf with
+# the path to this program instead of the path to the real sudo.
+#
+# This lets you avoid setting up sudo rules for root-->root which would be
+# a waste of time.
+
+exec $@
View
7 control/etc/workspace-control/propagation.conf
@@ -23,13 +23,6 @@ scp: /usr/bin/scp
# is running under.
#scp_user: bob
-# If using scp, can user be specified in the URL? If not, requests that
-# do will be rejected. Requests without user specification will use the
-# default as discussed directly above (either the account running
-# workspace-control or the configured scp_user account).
-# This defaults to true if missing or if value is anything but 'false'
-#scp_user_override: false
-
# Set this to 'true' to enable http based propagation. The service node
# has a configuration for the allowed hostnames that may be pulled from.
View
5 control/libexec/workspace-control/tmp-lease.sh
@@ -126,11 +126,6 @@ unset PYTHONINSPECT
# ARGUMENTS #
#############
-if [ $# -ne 1 ]; then
- echo "Syntax: add|rem <vmname> (or just 'print' for debugging)"
- exit 1
-fi
-
if [ "$1" = "print" ]; then
$TMP_LEASE_ALTER_CMD --print
exit 0
View
106 control/src/propagate-only-mode.sh
@@ -0,0 +1,106 @@
+#!/bin/bash
+
+# Script that allows you to configure workspace-control to fake doing
+# privileged work.
+#
+# What is left is mainly propagation and service notification.
+#
+# This allows you to experiment with propagation techniques on any cluster
+# where you have access to a single unix account with passwordless SSH
+# access from node to node on that account. The cluster doesn't need to
+# support virtualization at all and you don't need special account
+# privileges.
+#
+# This is of course also for convenience when developing or testing
+# propagation. It is useful even if the cluster supports virtualization
+# and you have sudo access for privileged things: you don't need to set
+# anything up, you can drop workspace-control in and go (as long as it
+# has the configuration that this script sets up).
+#
+# This does two things.
+#
+# 1. The sudo configuration will become "/bin/true"
+#
+# So all commands that do privileged work will "succeed" but not
+# make any changes.
+#
+# 2. Configures the platform module as the DoNothingPlatform module
+#
+# The unit tests and other mock modes take advantage of the libvirt
+# 'mock' driver which is great for many purposes and what should be
+# used to do accurate VMM mocking.
+#
+# What this new DoNothingPlatform module does is bypass libvirt
+# altogether, allowing the propagation-only mode to run on libvirt-less
+# clusters and/or non-privileged accounts. Basically reducing the
+# dependencies of propagation research and development to the bare
+# minimum.
+#
+# Those two things are actually not mutually exclusive, just put together
+# by default. You can change this to just do #2 in order to mess with
+# networking settings and mount+alter without needing to have libvirt
+# around, for example.
+#
+# Note that this works fine localhost as well, for developing on laptops.
+# Make another account (e.g. "justpropagate"), set it up as owner of all
+# /opt/nimbus workspace-control files, and set up localhost passwordless
+# SSH access. Then make sure to answer the account name and hostname
+# questions correctly in the setup process ("nimbus-configure --autoconfig").
+
+
+BASEDIR_REL="`dirname $0`/.."
+BASEDIR=`cd $BASEDIR_REL; pwd`
+ETCDIR="$BASEDIR/etc/workspace-control"
+
+BAK_SUDO="$ETCDIR/real_sudo.conf"
+REAL_SUDO="$ETCDIR/sudo.conf"
+BAK_INTERNAL="$ETCDIR/real_internal.conf"
+REAL_INTERNAL="$ETCDIR/internal.conf"
+
+if [ -e $BAK_SUDO ] ; then
+ echo "Cannot continue, backup file exists already: $BAK_SUDO"
+ exit 1
+fi
+
+if [ -e $BAK_INTERNAL ] ; then
+ echo "Cannot continue, backup file exists already: $BAK_INTERNAL"
+ exit 1
+fi
+
+CMD="cp $REAL_SUDO $BAK_SUDO"
+$CMD
+if [ $? -ne 0 ]; then
+ echo "Failed: $CMD"
+ exit 1
+fi
+
+CMD="cp $REAL_INTERNAL $BAK_INTERNAL"
+$CMD
+if [ $? -ne 0 ]; then
+ echo "Failed: $CMD"
+ exit 1
+fi
+
+
+
+# All commands that do privileged work will "succeed" but not affect any
+# change.
+
+echo "
+[sudo]
+# do nothing, pretend to succeed
+sudo: /bin/true
+" > $REAL_SUDO
+
+
+
+# Replace platform module with something that does nothing. Usually the
+# "mock" libvirt driver is used for many unit tests, etc., but having this
+# platform module that does nothing at all means you don't even have to
+# have libvirt installed in the first place.
+
+sed 's/workspacecontrol.defaults.lvrt.Platform/workspacecontrol.mocks.DoNothingPlatform/' $BAK_INTERNAL > $REAL_INTERNAL
+
+
+
+
View
2  control/src/python/workspacecontrol/defaults/NetworkBootstrap.py
@@ -38,7 +38,7 @@ def validate(self):
# when localdhcp is off, the rest of the module is basically a no-op
if not self.localdhcp:
- self.c.log.warn("local DHCP is disabled. DHCP requests will hit your site DHCP server")
+ self.c.log.info("local DHCP is disabled. DHCP requests will hit your site DHCP server")
return
self.dhcpconfig = self.p.get_conf_or_none("dhcp", "dhcpconfig")
View
22 control/src/python/workspacecontrol/defaults/imageprocurement/propagate_scp.py
@@ -26,22 +26,11 @@ def validate(self):
self.c.log.debug("SCP configured: %s" % self.scp)
-
self.scpuser = self.p.get_conf_or_none("propagation", "scp_user")
if self.scpuser:
self.c.log.debug("SCP default user: %s" % self.scpuser)
else:
self.c.log.debug("no SCP default user")
-
- override_conf = self.p.get_conf_or_none("propagation", "scp_user_override")
-
- if not override_conf:
- self.scpuser_override = False
- else:
- if string.lower(override_conf) == "false":
- self.scpuser_override = False
- else:
- self.scpuser_override = True
def validate_propagate_source(self, imagestr):
# will throw errors if invalid
@@ -148,16 +137,7 @@ def _get_remote_command(self, local, remote, push):
xfer_host = host[at_index+1:]
if xfer_user:
- self.c.log.debug("client wants override of scp account")
-
- if not self.scpuser_override:
- errmsg = "client specified in SCP URL %s, " % remote
- errmsg += "but scpuser_override is configured to "
- errmsg += "false, meaning the default account "
- errmsg += "is not allowed to be overriden"
- raise InvalidInput(errmsg)
- else:
- self.c.log.info("scpuser_override is true, so allowing client to specify this account: %s" % xfer_user)
+ self.c.log.info("allowing client to specify this account: %s" % xfer_user)
else:
self.c.log.debug("client did not specify account")
View
18 control/src/python/workspacecontrol/experimental/tmplease.py
@@ -1,6 +1,7 @@
from workspacecontrol.api.exceptions import *
from commands import getstatusoutput
import os
+import subprocess
def _common_validation(p, c):
# All of the following checks violate the "up front" validation philosophy
@@ -110,26 +111,31 @@ def setup(p, c, local_file_set, vmname):
# DONE
return local_file_set
-
- cmd = "%s %s add %s" % (sudo_path, tmplease_exe, vmname)
+
+ args = [sudo_path, tmplease_exe, "add", vmname]
+ cmd = ' '.join(args)
c.log.debug("command = '%s'" % cmd)
if c.dryrun:
c.log.debug("(dryrun, didn't run that)")
return local_file_set
- ret,output = getstatusoutput(cmd)
+ proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ (output,error) = proc.communicate()
+ ret = proc.wait()
if ret:
errmsg = "problem running command: '%s' ::: return code" % cmd
- errmsg += ": %d ::: output:\n%s" % (ret, output)
+ errmsg += ": %d ::: error:\n%s\noutput:\n%s" % (ret, error, output)
c.log.error(errmsg)
raise UnexpectedError(errmsg)
c.log.debug("leased tmp space physical partition successfully: %s" % cmd)
+ if error:
+ c.log.debug("STDERR output: %s" % error)
c.log.debug("tmp space physical partition: %s" % output)
- output="/dev/sdx1"
if not output:
raise UnexpectedError("no output from partition leasing")
+ output = output.strip()
if not output.startswith("/dev/"):
raise UnexpectedError("output from partition leasing does not start with '/dev/'")
@@ -169,5 +175,3 @@ def setup(p, c, local_file_set, vmname):
new_local_file_set = local_file_set_cls(lfs)
return new_local_file_set
-
-
View
18 control/src/python/workspacecontrol/main/wc_core.py
@@ -7,6 +7,7 @@
import wc_core_persistence
import wc_core_propagation
import wc_deprecated
+import workspacecontrol.experimental.tmplease as tmplease
from workspacecontrol.main import get_class_by_keyword, get_all_configs, ACTIONS
import workspacecontrol.main.wc_args as wc_args
@@ -213,6 +214,8 @@ def _core(vm_name, action, p, c):
vacate_networking(c, netbootstrap, netsecurity, netlease, vm_name, nic_set, persistence)
c.log.info("vacated '%s' from workspace-control (networking)" % vm_name)
+
+ vacate_tmplease(p, c, vm_name)
# If deleteall is not requested, the VM will now be moved back to
# 'propagated' from the service's perspective. There is no other
@@ -390,6 +393,21 @@ def vacate_networking(c, netbootstrap, netsecurity, netlease, vm_name, nic_set,
persistence.remove_nic_set(vm_name)
c.log.debug("removed VM from persistence")
+def vacate_tmplease(p, c, vm_name):
+
+ try:
+ tmplease.teardown(p, c, vm_name)
+ c.log.debug("removed tmplease, if any")
+ except:
+ exception_type = sys.exc_type
+ try:
+ exceptname = exception_type.__name__
+ except AttributeError:
+ exceptname = exception_type
+ errstr = "Possible issue with tmpplease teardown: %s: %s" % (str(exceptname), str(sys.exc_value))
+ c.log.error(errstr)
+
+
# -----------------------------------------------------------------------------
# GLOBAL VALIDATIONS
# -----------------------------------------------------------------------------
View
2  control/src/python/workspacecontrol/main/wc_core_creation.py
@@ -157,7 +157,7 @@ def _common_withnetsecurity(vm_name, nic_set, kernel, local_file_set, p, c, nets
c.log.exception(e)
try:
c.log.error("Creation problem: going to back out tmp space lease")
- tmplease.teardown(local_file_set)
+ tmplease.teardown(p, c, vm_name)
c.log.error("Backed out tmp space lease")
except Exception,e2:
c.log.exception(e2)
View
52 control/src/python/workspacecontrol/main/wc_core_persistence.py
@@ -115,3 +115,55 @@ def _derive_nicset_filepath(self, vm_name):
raise UnexpectedError("The persistence file is an invalid path: '%s'" % path)
return path
+
+ # ---------------------------------------------
+
+ def get_mock_vm(self, vm_name):
+ if not self.pdir:
+ raise ProgrammingError("cannot use persistence without setup/validation")
+
+ pobject = self._derive_mock_filepath(vm_name)
+ if not os.path.exists(pobject):
+ return None
+
+ f = None
+ try:
+ f = open(pobject, 'r')
+ x = pickle.load(f)
+ return x
+ finally:
+ if f:
+ f.close()
+
+ def _derive_mock_filepath(self, vm_name):
+ if not vm_name:
+ raise ProgrammingError("no vm_name")
+ path = os.path.join(self.pdir, vm_name + "-mockinfo")
+ if path.find("..") != -1:
+ raise UnexpectedError("The persistence file is an invalid path: '%s'" % path)
+ return path
+
+ def store_mock_vm(self, vm_name, mockinfo):
+ if not self.pdir:
+ raise ProgrammingError("cannot persist anything without setup/validation")
+
+ if not mockinfo:
+ raise ProgrammingError("no mockinfo")
+
+ pobject = self._derive_mock_filepath(vm_name)
+
+ f = None
+ try:
+ f = open(pobject, 'w')
+ pickle.dump(mockinfo, f)
+ finally:
+ if f:
+ f.close()
+
+ def remove_mock_vm(self, vm_name):
+ if not self.pdir:
+ raise ProgrammingError("cannot use persistence without setup/validation")
+ pobject = self._derive_mock_filepath(vm_name)
+ if not os.path.exists(pobject):
+ return
+ os.remove(pobject)
View
165 control/src/python/workspacecontrol/mocks/DoNothingPlatform.py
@@ -0,0 +1,165 @@
+import zope.interface
+
+import workspacecontrol.api.modules
+from workspacecontrol.api.exceptions import *
+import workspacecontrol.main.wc_args as wc_args
+from workspacecontrol.main import ACTIONS
+from workspacecontrol.main import wc_core_persistence
+
+class MockInfo:
+ def __init__(self):
+ self.somefield = "Object not used for anything yet"
+
+class DoNothingPlatform:
+ zope.interface.implements(workspacecontrol.api.modules.IPlatform)
+
+ def __init__(self, params, common):
+ if params == None:
+ raise ProgrammingError("expecting params")
+ if common == None:
+ raise ProgrammingError("expecting common")
+ self.p = params
+ self.c = common
+ self.persistence = wc_core_persistence.Persistence(self.p, self.c)
+
+ def _get_mockinfo_expecting(self):
+ """Return (name, mockinfo)
+ Raise UnexpectedError if there is no record of name in the system"""
+ (name, mockinfo) = self._get_mockinfo_impl()
+ if not mockinfo:
+ raise UnexpectedError("There is no record of a VM with this name in the system: %s" % name)
+ return (name, None)
+
+ def _get_mockinfo_notexpecting(self):
+ """Return (name, None)
+ Raise UnexpectedError if there is a record of name in the system"""
+ (name, mockinfo) = self._get_mockinfo_impl()
+ if mockinfo:
+ raise UnexpectedError("Name conflict: a VM with this name already exists in the system: %s" % name)
+ return (name, None)
+
+ def _get_mockinfo_impl(self, name=None):
+ if not name:
+ name = self.p.get_arg_or_none(wc_args.NAME)
+ mockinfo = self.persistence.get_mock_vm(name)
+ return (name, mockinfo)
+
+ def validate(self):
+ self._validate_inputs_early()
+ self.persistence.validate()
+
+ def create(self, local_file_set, nic_set, kernel):
+ (name, mockinfo) = self._get_mockinfo_notexpecting()
+ mockinfo = MockInfo()
+ self.persistence.store_mock_vm(name, mockinfo)
+ self.c.log.info("launched mock VM '%s'" % name)
+
+ def destroy(self, running_vm):
+ (name, mockinfo) = self._get_mockinfo_expecting()
+ self.persistence.remove_mock_vm(name)
+ self.c.log.info("destroyed mock VM '%s'" % name)
+
+ def shutdown(self, running_vm):
+ (name, mockinfo) = self._get_mockinfo_expecting()
+ self.persistence.remove_mock_vm(name)
+ self.c.log.info("shutdown mock VM '%s'" % name)
+
+ def reboot(self, running_vm):
+ self.c.log.info("reboot mock VM '%s'" % name)
+
+ def pause(self, running_vm):
+ self.c.log.info("paused mock VM '%s'" % name)
+
+ def unpause(self, running_vm):
+ self.c.log.info("unpaused mock VM '%s'" % name)
+
+ def info(self, handle):
+ (name, mockinfo) = self._get_mockinfo_impl(name=handle)
+ if not mockinfo:
+ self.c.log.info("no info found for handle '%s'" % handle)
+ return None
+
+ self.c.log.info("info, handle '%s'" % handle)
+ rvm_cls = self.c.get_class_by_keyword("RunningVM")
+ rvm = rvm_cls()
+ rvm.wchandle = handle
+ rvm.vmm_id = "fake id"
+ rvm.vmm_uuid = "fake uuid"
+ rvm.xmldesc = "<sorry />"
+ rvm.ostype = "linux"
+ rvm.running = True
+ rvm.maxmem = 1
+ rvm.curmem = 1
+ rvm.numvcpus = 1
+ rvm.cputime = 1
+ return rvm
+
+ def print_create_spec(self, local_file_set, nic_set, kernel):
+ self.c.log.info("print create specification is not implemented")
+
+# -----------------------------------------------------------------------------
+
+ def _validate_inputs_early(self):
+ """validate the inputs that can be validated ahead of time without
+ any images, nics, etc.
+ """
+
+ action = self.p.get_arg_or_none(wc_args.ACTION)
+ if not action:
+ # this situation is undefined, could be under unit test
+ # the actual user cmdline intake will require an action
+ return
+
+ if action in [ACTIONS.CREATE, ACTIONS.REMOVE, ACTIONS.INFO, ACTIONS.REBOOT, ACTIONS.PAUSE, ACTIONS.UNPAUSE, ACTIONS.PROPAGATE, ACTIONS.UNPROPAGATE, ACTIONS.PRINTXML]:
+ name = self.p.get_arg_or_none(wc_args.NAME)
+ if not name:
+ raise InvalidInput("The %s action requires a name" % action)
+ else:
+ raise InvalidInput("Unknown action: '%s'" % action)
+
+ if action == ACTIONS.CREATE or action == ACTIONS.PRINTXML:
+ self._validate_create_basics()
+
+
+ def _validate_create_basics(self):
+
+ name = self.p.get_arg_or_none(wc_args.NAME)
+ if not name:
+ raise InvalidInput("No name given for create")
+ self.c.log.debug("name for create: %s" % name)
+
+ # ---------------------------------------------------------------------
+
+ memory = self.p.get_arg_or_none(wc_args.MEMORY)
+ if not memory:
+ raise InvalidInput("No memory given for create")
+ try:
+ memory = int(memory)
+ except:
+ raise InvalidInput("memory given for create is not an integer: %s" % memory)
+
+ # convert MB -> kB
+ memory = memory * 1024
+
+ self.c.log.debug("memory for create: %d" % memory)
+
+ # ---------------------------------------------------------------------
+
+ vcpus = self.p.get_arg_or_none(wc_args.VCPUS)
+ if vcpus:
+ self.c.log.debug("vcpus given on cmdline: %s" % vcpus)
+ else:
+ vcpus = self.p.get_conf_or_none("vmcreation", "num_cpu_per_vm")
+ if vcpus:
+ self.c.log.debug("vcpu number retrieved from config file: %s" % vcpus)
+ else:
+ self.c.log.debug("no vcpu number given by argument or configuration, using default of 1")
+
+ if vcpus:
+ try:
+ vcpus = int(vcpus)
+ except:
+ raise InvalidInput("vcpus is not an integer: %s" % vcpus)
+ else:
+ vcpus = 1
+
View
1  control/src/python/workspacecontrol/mocks/__init__.py
@@ -12,6 +12,7 @@
from TestProcurement import TestProcurement
from NetworkLease import NetworkLease
+from DoNothingPlatform import DoNothingPlatform
def get_mock_mainconf(basename="main.conf"):
# this can be an unintuitive value
View
16 ctx-broker/build.xml
@@ -80,6 +80,8 @@
classpathref="nimbus.ctxbroker.classpath"
classpath="${nimbus.ctxbroker.stubs.dist}/*jar"
includeantruntime="false"
+ source="1.5"
+ target="1.5"
debug="on">
<include name="**/*.java"/>
@@ -133,6 +135,20 @@
<!-- *******************************************************************
+ DEPLOY ONLY JARS (development target)
+ ******************************************************************* -->
+
+ <target name="justjars" depends="jar">
+ <echo message="Copying JARs: ${basedir}" />
+ <copy todir="${gt4_0.lib.dir}" >
+ <fileset dir="${nimbus.ctxbroker.dist.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ </copy>
+ </target>
+
+
+ <!-- *******************************************************************
GAR RELATED
******************************************************************* -->
View
2  ctx-broker/wsdl/stubs/build.xml
@@ -127,6 +127,8 @@
<javac srcdir="${nimbusctx.gt4_0.stubs.build.src.dir}"
destdir="${nimbusctx.gt4_0.stubs.build.dest}"
includeantruntime="false"
+ source="1.5"
+ target="1.5"
debug="on">
<include name="**/*.java"/>
View
2  cumulus/authz/pynimbusauthz/__init__.py
@@ -50,7 +50,7 @@ def get_default_options(u):
all_opts.append(opt)
opt = cbOpts("quiet", "q", "Display no output", False, flag=True)
all_opts.append(opt)
- opt = cbOpts("verbose", "V", "Display much output", 1, count=True)
+ opt = cbOpts("verbose", "V", "Display much output, repeat to increase level", 1, count=True)
all_opts.append(opt)
opt = cbOpts("instream", "I", SUPPRESS_HELP, None)
all_opts.append(opt)
View
7 cumulus/cb/pycb/__init__.py
@@ -69,6 +69,7 @@ def __init__(self):
The search path for cumulus.ini is:
/etc/nimbus/cumulus.ini
+ $CUMULUS_HOME/etc/cumulus.ini
~/.nimbus/cumulus.ini
cumulus.ini
env 'CUMULUS_SETTINGS_FILE
@@ -111,6 +112,8 @@ def get_contact(self):
def load_settings(self):
config_path = []
config_path.append("/etc/nimbus/cumulus.ini")
+ if 'CUMULUS_HOME' in os.environ:
+ config_path.append(os.path.join(os.environ['CUMULUS_HOME'], "etc/cumulus.ini"))
config_path.append(os.path.expanduser('~/.nimbus/cumulus.ini'))
config_path.append(os.path.expanduser('cumulus.ini'))
config_path.append(os.environ.get('CUMULUS_SETTINGS_FILE'))
@@ -180,8 +183,8 @@ def load_settings(self):
pass
try:
- self.https_key = s.get("https", "key")
- self.https_cert = s.get("https", "cert")
+ self.https_key = s.get("https", "key").strip()
+ self.https_cert = s.get("https", "cert").strip()
self.use_https = s.getboolean("https", "enabled")
except:
pass
View
5 cumulus/cb/pycb/cbRequest.py
@@ -545,6 +545,11 @@ class cbPutObject(cbRequest):
def __init__(self, request, user, bucketName, objName, requestId, bucketIface):
cbRequest.__init__(self, request, user, requestId, bucketIface)
+ ndx = objName.find("cumulus:/")
+ if ndx >= 0:
+ pycb.log(logging.ERROR, "someone tried to make a key named cumulus://... why would someone do that? %d" % (ndx))
+ raise cbException('InvalidURI')
+
self.checkMD5 = None
self.bucketName = bucketName
self.objectName = objName
View
4 cumulus/cb/pycb/cumulus.py
@@ -232,6 +232,10 @@ def allHeadersReceived(self):
self.send_access_error()
return
+ if 'expect' in h:
+ if h['expect'].lower() == '100-continue':
+ self.transport.write("HTTP/1.1 100 Continue\r\n\r\n")
+
(bucketName, objectName) = path_to_bucket_object(rPath)
# if we are putting an object
if objectName != None:
View
6 cumulus/cb/pycb/tools/base_repo.py
@@ -19,6 +19,9 @@
import tempfile
import filecmp
from pycb.cumulus import *
+from boto.s3.connection import OrdinaryCallingFormat
+from boto.s3.connection import S3Connection
+
def setup_options(argv):
@@ -50,7 +53,8 @@ def main(argv=sys.argv[1:]):
print "admin s3 id is: %s" % (id)
print "admin s3 pw: %s" % (pw)
- conn = pycb.test_common.cb_get_conn(pycb.config.hostname, pycb.config.port, id, pw)
+ cf = OrdinaryCallingFormat()
+ conn = S3Connection(id, pw, host=pycb.config.hostname, port=pycb.config.port, is_secure=pycb.config.use_https, calling_format=cf)
bucket = conn.create_bucket(repo_dir, policy='public-read-write')
View
1  cumulus/conf/Makefile.am
@@ -32,7 +32,6 @@ tests:
(cd $(cumulus_dst_dir)/tests && ./run-all.sh)
install: predest
- cp $(cumulus_src_dir)/etc/cumulus.ini ~/.nimbus
cp -r $(cumulus_src_dir)/etc $(cumulus_dst_dir)
cp -r $(cumulus_src_dir)/etc/env.sh $(cumulus_dst_dir)
$(SQLITE) $(AUTHZDB) < $(cumulus_src_dir)/etc/acl.sql
View
1  cumulus/conf/Makefile.in
@@ -498,7 +498,6 @@ tests:
(cd $(cumulus_dst_dir)/tests && ./run-all.sh)
install: predest
- cp $(cumulus_src_dir)/etc/cumulus.ini ~/.nimbus
cp -r $(cumulus_src_dir)/etc $(cumulus_dst_dir)
cp -r $(cumulus_src_dir)/etc/env.sh $(cumulus_dst_dir)
$(SQLITE) $(AUTHZDB) < $(cumulus_src_dir)/etc/acl.sql
View
23 cumulus/cumulus-install.sh
@@ -65,29 +65,6 @@ else
fi
-if [ -e $HOME/.nimbus ]; then
- if [ ! -d $HOME/.nimbus ]; then
- echo "~/.nimbus exists but it is a regular file, not a directory."
- echo "This installation program needs to create the directory ~/.nimbus."
- echo "please rename your existing file"
- exit 1
- fi
-fi
-
-if [ ! -e $HOME/.nimbus ]; then
- mkdir $HOME/.nimbus
- if [ $? -ne 0 ]; then
- echo "mkdir ~/.nimbus failed"
- exit 1
- fi
-fi
-if [ -e $HOME/.nimbus/cumulus.ini ]; then
- echo "----- WARNING -----"
- bkup=$HOME/.nimbus/cumulus.ini.`date +%s`
- echo "$HOME/.nimbus/cumulus.ini exists, moving it to $bkup"
- mv $HOME/.nimbus/cumulus.ini $bkup
-fi
-
cd $source_dir/deps
if [ $? -ne 0 ]; then
echo "Could not change to the deps directory"
View
72 cumulus/perf/run-many.sh
@@ -2,49 +2,45 @@
tm_file=$1
touch $tm_file
-c_count="32"
-f_sizes="512"
+c="64"
buck="s3://TestBucket$RANDOM"
s3cmd mb $buck
pwd_dir=`pwd`
-for s in $f_sizes
-do
- echo "doing file $s"
- fname=$s.data
- dd of=$fname if=/dev/urandom count=$s bs=1048576 2> /dev/null
- md5=`md5sum $fname | awk '{ print $1 }'`
- b64=`./sumconvert.py $md5`
-
- for c in $c_count
+
+s="512"
+echo "doing file $s"
+fname=$s.data
+dd of=$fname if=/dev/urandom count=$s bs=1048576 2> /dev/null
+md5=`md5sum $fname | awk '{ print $1 }'`
+b64=`./sumconvert.py $md5`
+
+ echo "doing $c clients at once"
+
+ rm -f cumulus_tests.*
+ # put them all at once
+ for ((cnt=1; cnt <= $c; cnt++))
+ do
+ tf=`mktemp $pwd_dir/cumulus_tests.XXXXXXXXXX`
+ echo $tf
+ /usr/bin/time -a -o $tf --format "put $s $c %e" s3cmd --add-header=content-md5:$b64 --force put $fname $buck/$fname &
+ done
+ wait
+ cat cumulus_tests.* >> $tm_file
+ rm -f cumulus_tests.*
+
+ for ((cnt=1; cnt <= $c; cnt++))
do
- echo "doing $c clients at once"
-
- rm -f cumulus_tests.*
- # put them all at once
- for ((cnt=1; cnt <= $c; cnt++))
- do
- tf=`mktemp $pwd_dir/cumulus_tests.XXXXXXXXXX`
- echo $tf
- /usr/bin/time -a -o $tf --format "put $s $c %e" s3cmd --add-header=content-md5:$b64 --force put $fname $buck/$fname &
- done
- wait
- cat cumulus_tests.* >> $tm_file
- rm -f cumulus_tests.*
-
- for ((cnt=1; cnt <= $c; cnt++))
- do
- tf=`mktemp $pwd_dir/cumulus_tests.XXXXXXXXXX`
- /usr/bin/time -a -o $tf --format "get $s $c %e" s3cmd --force get $buck/$fname $fname.back &
- done
- wait
- cat cumulus_tests.* >> $tm_file
- rm -f cumulus_tests.*
-
- s3cmd del $buck/$fname
+ tf=`mktemp $pwd_dir/cumulus_tests.XXXXXXXXXX`
+ /usr/bin/time -a -o $tf --format "get $s $c %e" s3cmd --force get $buck/$fname $fname.back &
done
- rm $fname
- rm $fname.back
-done
+ wait
+ cat cumulus_tests.* >> $tm_file
+ rm -f cumulus_tests.*
+
+ s3cmd del $buck/$fname
+rm $fname
+rm $fname.back
+
s3cmd -r rb $buck
cat $tm_file
View
16 cumulus/tests/client/buckets_test.py