Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
If a gateway's name is different from it's ID, then:
- SharingServiceDBEventHandler.java creates a domain with domainId=gatewayId and domainName=gatewayName https://github.com/apache/airavata/blob/develop/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/messaging/SharingServiceDBEventHandler.java#L145-L154
- but SharingRegistryServerHandler.java uses the domain name as the domainId https://github.com/apache/airavata/blob/develop/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java#L65
- this causes problems in subsequent code which assumes that the gatewayID is the same as the domainID
The PGA creates the gateway ID based on the gateway name, but sanitizes it, see https://github.com/apache/airavata-php-gateway/blob/develop/app/libraries/AdminUtilities.php#L21-L22.
In this specific instance, we had a gateway name of `gateway.ung` which the PGA turned into a gateway id of `gateway-ung`. Usually the gateway name and ID are the same so this isn't an issue.
Workaround
Until this fix is in production, gateway names should only have lowercase letters and numbers and dashes.