You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/10/31 20:14:56 UTC
[airavata] branch master updated (405f9c9 -> 1cdea6c)
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git.
from 405f9c9 Update staging deploy branch to master
new 7b19478 Moving engine change up to allow FKs to work
new 1cdea6c Wait until event based user replication completes
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../DeltaScripts/appCatalog_schema_delta.sql | 85 +++++++++++-----------
.../migrator/airavata/AiravataDataMigrator.java | 25 +++++--
2 files changed, 62 insertions(+), 48 deletions(-)
[airavata] 01/02: Moving engine change up to allow FKs to work
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git
commit 7b194789ed4c7adc32dbb19db16580a3ee8fdf42
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Oct 31 15:58:09 2019 -0400
Moving engine change up to allow FKs to work
---
.../DeltaScripts/appCatalog_schema_delta.sql | 85 +++++++++++-----------
1 file changed, 44 insertions(+), 41 deletions(-)
diff --git a/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql b/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
index 5aa80a7..438df23 100644
--- a/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
+++ b/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
@@ -20,6 +20,50 @@
use app_catalog;
+-- AIRAVATA-2938: bring database schema into sync with registry-refactoring DB init scripts
+-- first, change the db table engine of these tables to InnoDB to allow new tables to FK to them
+ALTER TABLE `JOB_MANAGER_COMMAND` ENGINE = InnoDB;
+ALTER TABLE `HOST_IPADDRESS` ENGINE = InnoDB;
+ALTER TABLE `GSISSH_SUBMISSION` ENGINE = InnoDB;
+ALTER TABLE `HOST_ALIAS` ENGINE = InnoDB;
+ALTER TABLE `JOB_SUBMISSION_INTERFACE` ENGINE = InnoDB;
+ALTER TABLE `LIBRARY_PREPAND_PATH` ENGINE = InnoDB;
+ALTER TABLE `LOCAL_SUBMISSION` ENGINE = InnoDB;
+-- ALTER TABLE `DATA_STORAGE_PREFERENCE` ENGINE = InnoDB;
+ALTER TABLE `COMPUTE_RESOURCE` ENGINE = InnoDB;
+ALTER TABLE `COMPUTE_RESOURCE_FILE_SYSTEM` ENGINE = InnoDB;
+ALTER TABLE `LIBRARY_APEND_PATH` ENGINE = InnoDB;
+ALTER TABLE `GSISSH_EXPORT` ENGINE = InnoDB;
+ALTER TABLE `GLOBUS_GK_ENDPOINT` ENGINE = InnoDB;
+ALTER TABLE `GATEWAY_PROFILE` ENGINE = InnoDB;
+ALTER TABLE `CONFIGURATION` ENGINE = InnoDB;
+ALTER TABLE `DATA_MOVEMENT_INTERFACE` ENGINE = InnoDB;
+ALTER TABLE `GLOBUS_SUBMISSION` ENGINE = InnoDB;
+ALTER TABLE `GRIDFTP_DATA_MOVEMENT` ENGINE = InnoDB;
+ALTER TABLE `GSISSH_POSTJOBCOMMAND` ENGINE = InnoDB;
+ALTER TABLE `POSTJOB_COMMAND` ENGINE = InnoDB;
+ALTER TABLE `GRIDFTP_ENDPOINT` ENGINE = InnoDB;
+ALTER TABLE `COMPUTE_RESOURCE_PREFERENCE` ENGINE = InnoDB;
+ALTER TABLE `GSISSH_PREJOBCOMMAND` ENGINE = InnoDB;
+ALTER TABLE `LOCAL_DATA_MOVEMENT` ENGINE = InnoDB;
+ALTER TABLE `APPLICATION_INPUT` ENGINE = InnoDB;
+ALTER TABLE `APP_ENVIRONMENT` ENGINE = InnoDB;
+ALTER TABLE `APP_MODULE_MAPPING` ENGINE = InnoDB;
+ALTER TABLE `APPLICATION_OUTPUT` ENGINE = InnoDB;
+ALTER TABLE `APPLICATION_MODULE` ENGINE = InnoDB;
+ALTER TABLE `UNICORE_DATAMOVEMENT` ENGINE = InnoDB;
+ALTER TABLE `APPLICATION_INTERFACE` ENGINE = InnoDB;
+ALTER TABLE `UNICORE_SUBMISSION` ENGINE = InnoDB;
+-- ALTER TABLE `WORKFLOW_INPUT` ENGINE = InnoDB;
+-- ALTER TABLE `WORKFLOW` ENGINE = InnoDB;
+ALTER TABLE `SSH_JOB_SUBMISSION` ENGINE = InnoDB;
+-- ALTER TABLE `WORKFLOW_OUTPUT` ENGINE = InnoDB;
+ALTER TABLE `APPLICATION_DEPLOYMENT` ENGINE = InnoDB;
+ALTER TABLE `RESOURCE_JOB_MANAGER` ENGINE = InnoDB;
+ALTER TABLE `PREJOB_COMMAND` ENGINE = InnoDB;
+ALTER TABLE `SCP_DATA_MOVEMENT` ENGINE = InnoDB;
+ALTER TABLE `BATCH_QUEUE` ENGINE = InnoDB;
+
-- new tables
CREATE TABLE IF NOT EXISTS `PARSING_TEMPLATE` (
`PARSING_TEMPLATE_ID` varchar(255) NOT NULL,
@@ -253,47 +297,6 @@ alter table APPLICATION_INTERFACE modify column CREATION_TIME TIMESTAMP DEFAULT
alter table APPLICATION_INTERFACE modify column UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' NOT NULL;
-- AIRAVATA-2938: bring database schema into sync with registry-refactoring DB init scripts
-ALTER TABLE `JOB_MANAGER_COMMAND` ENGINE = InnoDB;
-ALTER TABLE `HOST_IPADDRESS` ENGINE = InnoDB;
-ALTER TABLE `GSISSH_SUBMISSION` ENGINE = InnoDB;
-ALTER TABLE `HOST_ALIAS` ENGINE = InnoDB;
-ALTER TABLE `JOB_SUBMISSION_INTERFACE` ENGINE = InnoDB;
-ALTER TABLE `LIBRARY_PREPAND_PATH` ENGINE = InnoDB;
-ALTER TABLE `LOCAL_SUBMISSION` ENGINE = InnoDB;
--- ALTER TABLE `DATA_STORAGE_PREFERENCE` ENGINE = InnoDB;
-ALTER TABLE `COMPUTE_RESOURCE` ENGINE = InnoDB;
-ALTER TABLE `COMPUTE_RESOURCE_FILE_SYSTEM` ENGINE = InnoDB;
-ALTER TABLE `LIBRARY_APEND_PATH` ENGINE = InnoDB;
-ALTER TABLE `GSISSH_EXPORT` ENGINE = InnoDB;
-ALTER TABLE `GLOBUS_GK_ENDPOINT` ENGINE = InnoDB;
-ALTER TABLE `GATEWAY_PROFILE` ENGINE = InnoDB;
-ALTER TABLE `CONFIGURATION` ENGINE = InnoDB;
-ALTER TABLE `DATA_MOVEMENT_INTERFACE` ENGINE = InnoDB;
-ALTER TABLE `GLOBUS_SUBMISSION` ENGINE = InnoDB;
-ALTER TABLE `GRIDFTP_DATA_MOVEMENT` ENGINE = InnoDB;
-ALTER TABLE `GSISSH_POSTJOBCOMMAND` ENGINE = InnoDB;
-ALTER TABLE `POSTJOB_COMMAND` ENGINE = InnoDB;
-ALTER TABLE `GRIDFTP_ENDPOINT` ENGINE = InnoDB;
-ALTER TABLE `COMPUTE_RESOURCE_PREFERENCE` ENGINE = InnoDB;
-ALTER TABLE `GSISSH_PREJOBCOMMAND` ENGINE = InnoDB;
-ALTER TABLE `LOCAL_DATA_MOVEMENT` ENGINE = InnoDB;
-ALTER TABLE `APPLICATION_INPUT` ENGINE = InnoDB;
-ALTER TABLE `APP_ENVIRONMENT` ENGINE = InnoDB;
-ALTER TABLE `APP_MODULE_MAPPING` ENGINE = InnoDB;
-ALTER TABLE `APPLICATION_OUTPUT` ENGINE = InnoDB;
-ALTER TABLE `APPLICATION_MODULE` ENGINE = InnoDB;
-ALTER TABLE `UNICORE_DATAMOVEMENT` ENGINE = InnoDB;
-ALTER TABLE `APPLICATION_INTERFACE` ENGINE = InnoDB;
-ALTER TABLE `UNICORE_SUBMISSION` ENGINE = InnoDB;
--- ALTER TABLE `WORKFLOW_INPUT` ENGINE = InnoDB;
--- ALTER TABLE `WORKFLOW` ENGINE = InnoDB;
-ALTER TABLE `SSH_JOB_SUBMISSION` ENGINE = InnoDB;
--- ALTER TABLE `WORKFLOW_OUTPUT` ENGINE = InnoDB;
-ALTER TABLE `APPLICATION_DEPLOYMENT` ENGINE = InnoDB;
-ALTER TABLE `RESOURCE_JOB_MANAGER` ENGINE = InnoDB;
-ALTER TABLE `PREJOB_COMMAND` ENGINE = InnoDB;
-ALTER TABLE `SCP_DATA_MOVEMENT` ENGINE = InnoDB;
-ALTER TABLE `BATCH_QUEUE` ENGINE = InnoDB;
-- Some of these column changes involve FK columns so need to temporarily turn off FK checks
set FOREIGN_KEY_CHECKS=0;
[airavata] 02/02: Wait until event based user replication completes
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git
commit 1cdea6cc928e72fc2ad7dc7d881b046e387fc077
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Oct 31 16:14:43 2019 -0400
Wait until event based user replication completes
---
.../migrator/airavata/AiravataDataMigrator.java | 25 ++++++++++++++++------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/AiravataDataMigrator.java b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/AiravataDataMigrator.java
index 07303e7..0bb498b 100644
--- a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/AiravataDataMigrator.java
+++ b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/AiravataDataMigrator.java
@@ -466,13 +466,24 @@ public class AiravataDataMigrator {
return allUsersUpdated;
}
private static void checkUsersInSharingRegistryService(SharingRegistryServerHandler sharingRegistryServerHandler, List<UserProfile> missingUsers, String domainId) throws TException{
- for(UserProfile users: missingUsers){
- if(!sharingRegistryServerHandler.isUserExists(domainId, users.getAiravataInternalUserId())){
- User user = new User();
- user.setUserId(users.getAiravataInternalUserId());
- user.setDomainId(users.getGatewayId());
- user.setUserName(users.getUserId());
- sharingRegistryServerHandler.createUser(user);
+ System.out.println("Waiting for " + missingUsers.size() + " missing users to be propogated to sharing db");
+ while (true) {
+ boolean missingInSharing = false;
+ for (UserProfile users : missingUsers) {
+ if (!sharingRegistryServerHandler.isUserExists(domainId, users.getAiravataInternalUserId())) {
+ missingInSharing = true;
+ break;
+ }
+ }
+ if (!missingInSharing) {
+ break;
+ }
+ try {
+ System.out.print(".");
+ // wait for 1 second
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
}
}
}