From 5cfc468d959f1fcfa1fa8121154a70c6430df083 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 28 Jun 2008 17:52:06 +0000 Subject: more work on the support for multiple inventory servers. The Login service should now read/create new inventory on the inventory server that is set in a users profile. Also added "Add-InventoryHost" console command to add a support for a new server to a region. So it would be good if someone could test this. Set up the grid as normal, but then also run extra inventory server on a different computer (well actually it just has to be on a different network hostname, so one using "http://localhost:8004" and one using "http://127.0.0.1:8005" should work) then you need to manually edit the user profile database to set the new servers url in a user's "userInventoryURI" field. Then on a region server, use the Add-InventoryHost to add the new server url (always include the full url, including http, but don't add a final /) Login with that account and see if the inventory works. Of course these needs to be made more user friendly. --- OpenSim/Grid/UserServer/UserLoginService.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'OpenSim/Grid/UserServer/UserLoginService.cs') diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 165700c..a4dce5e 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -419,15 +419,21 @@ namespace OpenSim.Grid.UserServer } // See LoginService - protected override InventoryData GetInventorySkeleton(LLUUID userID) + protected override InventoryData GetInventorySkeleton(LLUUID userID, string serverUrl) { + string invUrl = m_config.InventoryUrl; + if (serverUrl != String.Empty) + { + invUrl = serverUrl; + } + m_log.DebugFormat( "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", m_config.InventoryUrl, userID); List folders = SynchronousRestObjectPoster.BeginPostObject>( - "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); + "POST", invUrl + "RootFolders/", userID.UUID); if (null == folders || folders.Count == 0) { @@ -440,7 +446,7 @@ namespace OpenSim.Grid.UserServer // exist. bool created = SynchronousRestObjectPoster.BeginPostObject( - "POST", m_config.InventoryUrl + "CreateInventory/", userID.UUID); + "POST", invUrl + "CreateInventory/", userID.UUID); if (!created) { @@ -456,7 +462,7 @@ namespace OpenSim.Grid.UserServer } folders = SynchronousRestObjectPoster.BeginPostObject>( - "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); + "POST", invUrl + "RootFolders/", userID.UUID); } if (folders != null && folders.Count > 0) -- cgit v1.1