From 1636f535ba1915732927054be36b909b67a6de6c Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 14 Apr 2010 10:42:14 +0100 Subject: Committing sacha's partial work (from orpheus). The GridBrat needs to learn a bit of git --- OpenSim/Region/Application/OpenSimBase.cs | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index cf2ab65..f3aaa76 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -346,10 +346,28 @@ namespace OpenSim else m_log.Error("[MODULES]: The new RegionModulesController is missing..."); scene.SetModuleInterfaces(); +// First Step of bootreport sequence + if (scene.SnmpService != null) + { + scene.SnmpService.ColdStart(1,scene); + } + +// it should be a LinkDown event +// Maped inside opennms +// bad... + if (scene.SnmpService != null) + { + scene.SnmpService.Warning("Loading prins", scene); + } // Prims have to be loaded after module configuration since some modules may be invoked during the load scene.LoadPrimsFromStorage(regionInfo.originRegionID); + if (scene.SnmpService != null) + { + scene.SnmpService.Warning("Creating region texture", scene); + } + // moved these here as the terrain texture has to be created after the modules are initialized // and has to happen before the region is registered with the grid. scene.CreateTerrainTexture(false); @@ -357,6 +375,10 @@ namespace OpenSim // TODO : Try setting resource for region xstats here on scene MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); + if (scene.SnmpService != null) + { + scene.SnmpService.Warning("Grid Registration in progress", scene); + } try { scene.RegisterRegionWithGrid(); @@ -365,11 +387,20 @@ namespace OpenSim { m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e.StackTrace); + if (scene.SnmpService != null) + { + scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene); + } // Carrying on now causes a lot of confusion down the // line - we need to get the user's attention Environment.Exit(1); } + if (scene.SnmpService != null) + { + scene.SnmpService.Warning("Grid Registration done", scene); + } + // We need to do this after we've initialized the // scripting engines. scene.CreateScriptInstances(); @@ -377,6 +408,11 @@ namespace OpenSim scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); scene.EventManager.TriggerParcelPrimCountUpdate(); + if (scene.SnmpService != null) + { + scene.SnmpService.Warning("ScriptEngine started", scene); + } + m_sceneManager.Add(scene); if (m_autoCreateClientStack) @@ -385,6 +421,10 @@ namespace OpenSim clientServer.Start(); } + if (scene.SnmpService != null) + { + scene.SnmpService.Warning("Initializing region modules", scene); + } if (do_post_init) { foreach (IRegionModule module in modules) @@ -396,6 +436,11 @@ namespace OpenSim mscene = scene; + if (scene.SnmpService != null) + { + scene.SnmpService.Warning("The region is operational", scene); + } + scene.StartTimer(); return clientServer; -- cgit v1.1 From 7eda9364fd93906d6657e720681e8c079cb2ce1e Mon Sep 17 00:00:00 2001 From: sacha Date: Fri, 23 Apr 2010 10:51:27 -0400 Subject: Adding LinkUp/LinkDown when a region is started or stoped. Those two events could be used to compute the region availibility --- OpenSim/Region/Application/OpenSimBase.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index f3aaa76..06bb886 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -350,11 +350,9 @@ namespace OpenSim if (scene.SnmpService != null) { scene.SnmpService.ColdStart(1,scene); + scene.SnmpService.LinkDown(scene); } -// it should be a LinkDown event -// Maped inside opennms -// bad... if (scene.SnmpService != null) { scene.SnmpService.Warning("Loading prins", scene); @@ -439,6 +437,7 @@ namespace OpenSim if (scene.SnmpService != null) { scene.SnmpService.Warning("The region is operational", scene); + scene.SnmpService.LinkUp(scene); } scene.StartTimer(); -- cgit v1.1 From 85646b157ce0e07ef37e41de72b553bb377243e1 Mon Sep 17 00:00:00 2001 From: sacha Date: Fri, 23 Apr 2010 12:40:27 -0400 Subject: Adding some more SNMP events and some refactoring Signed : The Masqued Foxi --- OpenSim/Region/Application/OpenSimBase.cs | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 06bb886..1ec96a0 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -355,7 +355,7 @@ namespace OpenSim if (scene.SnmpService != null) { - scene.SnmpService.Warning("Loading prins", scene); + scene.SnmpService.BootInfo("Loading prins", scene); } // Prims have to be loaded after module configuration since some modules may be invoked during the load @@ -363,7 +363,7 @@ namespace OpenSim if (scene.SnmpService != null) { - scene.SnmpService.Warning("Creating region texture", scene); + scene.SnmpService.BootInfo("Creating region texture", scene); } // moved these here as the terrain texture has to be created after the modules are initialized @@ -375,8 +375,8 @@ namespace OpenSim if (scene.SnmpService != null) { - scene.SnmpService.Warning("Grid Registration in progress", scene); - } + scene.SnmpService.BootInfo("Grid Registration in progress", scene); + } try { scene.RegisterRegionWithGrid(); @@ -396,7 +396,7 @@ namespace OpenSim if (scene.SnmpService != null) { - scene.SnmpService.Warning("Grid Registration done", scene); + scene.SnmpService.BootInfo("Grid Registration done", scene); } // We need to do this after we've initialized the @@ -408,7 +408,7 @@ namespace OpenSim if (scene.SnmpService != null) { - scene.SnmpService.Warning("ScriptEngine started", scene); + scene.SnmpService.BootInfo("ScriptEngine started", scene); } m_sceneManager.Add(scene); @@ -421,7 +421,7 @@ namespace OpenSim if (scene.SnmpService != null) { - scene.SnmpService.Warning("Initializing region modules", scene); + scene.SnmpService.BootInfo("Initializing region modules", scene); } if (do_post_init) { @@ -436,7 +436,7 @@ namespace OpenSim if (scene.SnmpService != null) { - scene.SnmpService.Warning("The region is operational", scene); + scene.SnmpService.BootInfo("The region is operational", scene); scene.SnmpService.LinkUp(scene); } @@ -448,6 +448,11 @@ namespace OpenSim private void ShutdownRegion(Scene scene) { m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); + if (scene.SnmpService != null) + { + scene.SnmpService.BootInfo("The region is shutting down", scene); + scene.SnmpService.LinkDown(scene); + } IRegionModulesController controller; if (ApplicationRegistry.TryGet(out controller)) { -- cgit v1.1 From dda7185b437fbbbd8ec7871b910a04990069a829 Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Thu, 3 Jun 2010 17:55:50 -0700 Subject: Change the admin kick message to something more generic, "OpenSim Manager" is not really accurate --- OpenSim/Region/Application/OpenSim.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index a09b903..75561a7 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -427,7 +427,7 @@ namespace OpenSim if (alert != null) presence.ControllingClient.Kick(alert); else - presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); + presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n"); // ...and close on our side presence.Scene.IncomingCloseAgent(presence.UUID); -- cgit v1.1 From 9d03271265684f7724d9a242340ca6942bab3592 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 24 Jun 2010 03:43:50 +0200 Subject: And another --- OpenSim/Region/Application/OpenSimBase.cs | 2 -- 1 file changed, 2 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index ae942f9..27cb137 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -408,8 +408,6 @@ namespace OpenSim scene.SnmpService.BootInfo("ScriptEngine started", scene); } -======= ->>>>>>> master:OpenSim/Region/Application/OpenSimBase.cs m_sceneManager.Add(scene); if (m_autoCreateClientStack) -- cgit v1.1 From d5f497478a371107c568844321a4663bccfbf527 Mon Sep 17 00:00:00 2001 From: Tom Date: Sun, 1 Aug 2010 10:21:56 -0700 Subject: Add config option securePermissionsLoading which will stop the region from loading if the specified permissions modules fail to load. --- OpenSim/Region/Application/OpenSimBase.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 27cb137..9267721 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -88,6 +88,10 @@ namespace OpenSim protected List m_plugins = new List(); + private List m_permsModules; + + private bool m_securePermissionsLoading = true; + /// /// The config information passed into the OpenSimulator region server. /// @@ -185,6 +189,11 @@ namespace OpenSim CreatePIDFile(pidFile); userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); + + m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); + + string permissionModules = startupConfig.GetString("permissionmodules", "DefaultPermissionsModule"); + m_permsModules = new List(permissionModules.Split(',')); } base.StartupSpecific(); @@ -342,6 +351,18 @@ namespace OpenSim } else m_log.Error("[MODULES]: The new RegionModulesController is missing..."); + if (m_securePermissionsLoading) + { + foreach (string s in m_permsModules) + { + if (!scene.RegionModules.ContainsKey(s)) + { + m_log.Fatal("[MODULES]: Required module " + s + " not found."); + Environment.Exit(0); + } + } + } + scene.SetModuleInterfaces(); // First Step of bootreport sequence if (scene.SnmpService != null) -- cgit v1.1 From b860c8021e2fcc2522c931d7e503299079924743 Mon Sep 17 00:00:00 2001 From: Tom Date: Sun, 1 Aug 2010 10:23:48 -0700 Subject: First, change DefaultPermissionsModule so it returns the correct name... ... Then, make sure we also check the old-style module stack before we throw a tantrum --- OpenSim/Region/Application/OpenSimBase.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 9267721..fc67f94 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -357,8 +357,19 @@ namespace OpenSim { if (!scene.RegionModules.ContainsKey(s)) { - m_log.Fatal("[MODULES]: Required module " + s + " not found."); - Environment.Exit(0); + bool found = false; + foreach (IRegionModule m in modules) + { + if (m.Name == s) + { + found = true; + } + } + if (!found) + { + m_log.Fatal("[MODULES]: Required module " + s + " not found."); + Environment.Exit(0); + } } } } -- cgit v1.1 From 0020dbee23bf0bab979225dbcdcc9cbcbe72f27b Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 4 Aug 2010 03:23:19 +0200 Subject: Remove StandAlone from default hardcoded config --- OpenSim/Region/Application/ConfigurationLoader.cs | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index cac5fa9..09f7bea 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs @@ -308,21 +308,6 @@ namespace OpenSim } { - IConfig config = defaultConfig.Configs["StandAlone"]; - - if (null == config) - config = defaultConfig.AddConfig("StandAlone"); - - config.Set("accounts_authenticate", true); - config.Set("welcome_message", "Welcome to OpenSimulator"); - config.Set("inventory_plugin", "OpenSim.Data.SQLite.dll"); - config.Set("inventory_source", ""); - config.Set("userDatabase_plugin", "OpenSim.Data.SQLite.dll"); - config.Set("user_source", ""); - config.Set("LibrariesXMLFile", string.Format(".{0}inventory{0}Libraries.xml", Path.DirectorySeparatorChar)); - } - - { IConfig config = defaultConfig.Configs["Network"]; if (null == config) -- cgit v1.1 From 47838e5fb39596effd4d0f7e1021ab68e69cd9d8 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 20 Aug 2010 08:46:46 +0200 Subject: Add some maptile options, change maptile generation from OpenSimBase to Scene to make it more configurable. --- OpenSim/Region/Application/OpenSimBase.cs | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index c08da18..4ef0b1b 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -390,19 +390,6 @@ namespace OpenSim // Prims have to be loaded after module configuration since some modules may be invoked during the load scene.LoadPrimsFromStorage(regionInfo.originRegionID); - if (scene.SnmpService != null) - { - scene.SnmpService.BootInfo("Creating region texture", scene); - } - - // moved these here as the map texture has to be created after the modules are initialized - // and has to happen before the region is registered with the grid. - IWorldMapModule mapModule = scene.RequestModuleInterface(); - if (mapModule != null) - mapModule.GenerateMaptile(); - else - m_log.WarnFormat("[STARTUP]: No map module available to generate map tile"); - // TODO : Try setting resource for region xstats here on scene MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); -- cgit v1.1 From 5e1aab92f588e776bb6ff6c532c0099e87908c4f Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 13 Sep 2010 23:12:48 +0100 Subject: Make the inimaster option default to OpenSimDefaults.ini. --- OpenSim/Region/Application/ConfigurationLoader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index e2e0640..31ce500 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs @@ -83,7 +83,7 @@ namespace OpenSim List sources = new List(); string masterFileName = - startupConfig.GetString("inimaster", String.Empty); + startupConfig.GetString("inimaster", "OpenSimDefaults.ini"); if (IsUri(masterFileName)) { -- cgit v1.1 From 8e51ca3a7ba51ae1b38ba66ae24a958ccb405a21 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 13 Sep 2010 23:17:42 +0100 Subject: Output an error and quit if the master file is missing. Also rename OpenSim.ini.example to bin/OpenSimDefaults.ini.example --- OpenSim/Region/Application/ConfigurationLoader.cs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index 31ce500..9d6fef7 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs @@ -85,6 +85,9 @@ namespace OpenSim string masterFileName = startupConfig.GetString("inimaster", "OpenSimDefaults.ini"); + if (masterFileName == "none") + masterFileName = String.Empty; + if (IsUri(masterFileName)) { if (!sources.Contains(masterFileName)) @@ -95,10 +98,19 @@ namespace OpenSim string masterFilePath = Path.GetFullPath( Path.Combine(Util.configDir(), masterFileName)); - if (masterFileName != String.Empty && - File.Exists(masterFilePath) && - (!sources.Contains(masterFilePath))) - sources.Add(masterFilePath); + if (masterFileName != String.Empty) + { + if (File.Exists(masterFilePath) + { + if (!sources.Contains(masterFilePath)) + sources.Add(masterFilePath); + } + else + { + m_log.ErrorFormat("Master ini file {0} not found", masterFilePath); + Environment.Exit(1); + } + } } -- cgit v1.1 From 656e64b3ed4cf294b371739b315d7f603421788b Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 13 Sep 2010 23:22:25 +0100 Subject: Change the help message to point to copying OpenSimDefaults.ini.example. Provide a mostly empty OpenSim.ini.example --- OpenSim/Region/Application/ConfigurationLoader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index 9d6fef7..b76e85d 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs @@ -172,7 +172,7 @@ namespace OpenSim if (sources.Count == 0) { m_log.FatalFormat("[CONFIG]: Could not load any configuration"); - m_log.FatalFormat("[CONFIG]: Did you copy the OpenSim.ini.example file to OpenSim.ini?"); + m_log.FatalFormat("[CONFIG]: Did you copy the OpenSimDefaults.ini.example file to OpenSimDefaults.ini?"); Environment.Exit(1); } -- cgit v1.1 From d299f8b55cb0e3848dbcbb941a5789d52459bc44 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 14 Sep 2010 19:41:53 +0200 Subject: Fix a small left over buglet and also add checking of the physics actor position on backup. This way, ant object that has been moved will be checked for ghost prims as soon as it is persisted. --- OpenSim/Region/Application/ConfigurationLoader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index b76e85d..6e3d6af 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs @@ -100,7 +100,7 @@ namespace OpenSim if (masterFileName != String.Empty) { - if (File.Exists(masterFilePath) + if (File.Exists(masterFilePath)) { if (!sources.Contains(masterFilePath)) sources.Add(masterFilePath); -- cgit v1.1 From b960a05e67b4aed543e37f4e041f0d5e5cc2d7c0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 7 Dec 2010 01:07:13 +0100 Subject: Cowardly refuse to keep running when no application plugins are loaded. Prevents empty instances from hanging around when Mono.Addins messes up --- OpenSim/Region/Application/OpenSimBase.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 6a7272d..941472b 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -222,6 +222,12 @@ namespace OpenSim m_moduleLoader = new ModuleLoader(m_config.Source); LoadPlugins(); + + if (m_plugins.Count == 0) // We failed to load any modules. Mono Addins glitch! + { + Environment.Exit(1); + } + foreach (IApplicationPlugin plugin in m_plugins) { plugin.PostInitialise(); -- cgit v1.1 From 5c012cac54f92f2881005a50fd3eb103f0f2ea07 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 25 Jul 2011 04:16:53 +0200 Subject: Add a timer to monitor the heartbeat. Restart it if it's been dead for 5 seconds. --- OpenSim/Region/Application/OpenSimBase.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 04a68ae..dbfd0f2 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -487,6 +487,7 @@ namespace OpenSim } scene.StartTimer(); + scene.StartTimerWatchdog(); return clientServer; } -- cgit v1.1 From 71012ef8836fe75b441d86b5a3ba2c3fa4014032 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 31 Jan 2012 02:19:34 +0100 Subject: Make parcel sale overlays work. No auction support. --- OpenSim/Region/Application/OpenSimBase.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index df6a17b..6e26c0e 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -432,6 +432,9 @@ namespace OpenSim // TODO : Try setting resource for region xstats here on scene MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); + scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); + scene.EventManager.TriggerParcelPrimCountUpdate(); + if (scene.SnmpService != null) { scene.SnmpService.BootInfo("Grid Registration in progress", scene); @@ -460,9 +463,6 @@ namespace OpenSim scene.SnmpService.BootInfo("Grid Registration done", scene); } - scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); - scene.EventManager.TriggerParcelPrimCountUpdate(); - // We need to do this after we've initialized the // scripting engines. scene.CreateScriptInstances(); -- cgit v1.1 From b379e790a279a0ed70d2c889c12ecb6849765e02 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 7 Sep 2012 23:27:40 +0200 Subject: Set the maximum number of concurrent connections to a service endpoint to 50. This doesn't work on stock mono but it works in Avination and also under Windoze. --- OpenSim/Region/Application/Application.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index ebfebc4..0dbb95a 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -27,6 +27,7 @@ using System; using System.IO; +using System.Net; using System.Reflection; using log4net; using log4net.Config; @@ -73,6 +74,7 @@ namespace OpenSim AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); + ServicePointManager.DefaultConnectionLimit = 50; // Add the arguments supplied when running the application to the configuration ArgvConfigSource configSource = new ArgvConfigSource(args); -- cgit v1.1 From afb4e06f63dd6a532c85b71f0d6c486ae38815fe Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 9 Sep 2012 17:41:10 +0200 Subject: Reduce max concurrent endpoint connections from 50 to 6 (was 2 before) --- OpenSim/Region/Application/Application.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index 0dbb95a..78636c4 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -74,7 +74,7 @@ namespace OpenSim AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); - ServicePointManager.DefaultConnectionLimit = 50; + ServicePointManager.DefaultConnectionLimit = 6; // Add the arguments supplied when running the application to the configuration ArgvConfigSource configSource = new ArgvConfigSource(args); -- cgit v1.1 From 45fe25de0d9636690114091565775d264a0ca96f Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 14 Sep 2012 00:14:39 +0200 Subject: Allow some more connections to try to ease lag. --- OpenSim/Region/Application/Application.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index 78636c4..0f90d37 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -74,7 +74,7 @@ namespace OpenSim AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); - ServicePointManager.DefaultConnectionLimit = 6; + ServicePointManager.DefaultConnectionLimit = 12; // Add the arguments supplied when running the application to the configuration ArgvConfigSource configSource = new ArgvConfigSource(args); -- cgit v1.1 From 442896cb1d9beda2d8768c91cfa1ec64c5fde08f Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 23 Nov 2012 02:44:51 +0100 Subject: Remove duplicate registration of the help topics for the module commander --- OpenSim/Region/Application/OpenSimBase.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index eb4326e..33680b5 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -266,10 +266,10 @@ namespace OpenSim "help " + capitalizedTopic, "Get help on plugin command '" + topic + "'", HandleCommanderHelp); - console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic, - "help " + capitalizedTopic, - "Get help on plugin command '" + topic + "'", - HandleCommanderHelp); +// console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic, +// "help " + capitalizedTopic, +// "Get help on plugin command '" + topic + "'", +// HandleCommanderHelp); ICommander commander = null; @@ -1165,4 +1165,4 @@ namespace OpenSim { public IConfigSource Source; } -} \ No newline at end of file +} -- cgit v1.1 From 59290854f24f47ee7cb8b2a242e3f771fa30229b Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 8 Sep 2013 17:53:21 +0200 Subject: Reinstate SecurePermissionsLoading functionality, default ON --- OpenSim/Region/Application/OpenSimBase.cs | 40 +++++++++++++------------------ 1 file changed, 16 insertions(+), 24 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 7361f50..25af9ac 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -195,7 +195,9 @@ namespace OpenSim m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); - string permissionModules = startupConfig.GetString("permissionmodules", "DefaultPermissionsModule"); + string permissionModules = Util.GetConfigVarFromSections(Config, "permissionmodules", + new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule"); + m_permsModules = new List(permissionModules.Split(',')); } @@ -392,29 +394,19 @@ namespace OpenSim } else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); - // XPTO: Fix this -// if (m_securePermissionsLoading) -// { -// foreach (string s in m_permsModules) -// { -// if (!scene.RegionModules.ContainsKey(s)) -// { -// bool found = false; -// foreach (IRegionModule m in modules) -// { -// if (m.Name == s) -// { -// found = true; -// } -// } -// if (!found) -// { -// m_log.Fatal("[MODULES]: Required module " + s + " not found."); -// Environment.Exit(0); -// } -// } -// } -// } + if (m_securePermissionsLoading) + { + foreach (string s in m_permsModules) + { + if (!scene.RegionModules.ContainsKey(s)) + { + m_log.Fatal("[MODULES]: Required module " + s + " not found."); + Environment.Exit(0); + } + } + + m_log.InfoFormat("[SCENE]: Secure permissions loading enabled, modules loaded: {0}", String.Join(" ", m_permsModules)); + } scene.SetModuleInterfaces(); // First Step of bootreport sequence -- cgit v1.1 From ddf67bf929fbc32d8319f777b248642b4da0305a Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 8 Sep 2013 19:41:51 +0200 Subject: Mono 2.0 fix - call ToArray() explicitly --- OpenSim/Region/Application/OpenSimBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 25af9ac..88bd869 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -405,7 +405,7 @@ namespace OpenSim } } - m_log.InfoFormat("[SCENE]: Secure permissions loading enabled, modules loaded: {0}", String.Join(" ", m_permsModules)); + m_log.InfoFormat("[SCENE]: Secure permissions loading enabled, modules loaded: {0}", String.Join(" ", m_permsModules.ToArray())); } scene.SetModuleInterfaces(); -- cgit v1.1 From 8c657e48377213e7ee66c05a4047085cee6084ea Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 14 Aug 2014 20:41:36 +0100 Subject: add a estimator of client ping time, and painfully make it visible in show connections console command --- OpenSim/Region/Application/OpenSim.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 85049c9..13d8170 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -978,6 +978,7 @@ namespace OpenSim cdt.AddColumn("Circuit code", 12); cdt.AddColumn("Endpoint", 23); cdt.AddColumn("Active?", 7); + cdt.AddColumn("ping(ms)", 8); SceneManager.ForEachScene( s => s.ForEachClient( @@ -986,7 +987,8 @@ namespace OpenSim c.Name, c.CircuitCode.ToString(), c.RemoteEndPoint.ToString(), - c.IsActive.ToString()))); + c.IsActive.ToString(), + c.PingTimeMS))); MainConsole.Instance.Output(cdt.ToString()); } -- cgit v1.1 From 538a95ff1e93c6266bb2c269e9f92a5cb7dce10e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 14 Aug 2014 21:05:17 +0100 Subject: in show connections show also if it is a childagent connection --- OpenSim/Region/Application/OpenSim.cs | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 13d8170..e1e3d87 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -978,17 +978,25 @@ namespace OpenSim cdt.AddColumn("Circuit code", 12); cdt.AddColumn("Endpoint", 23); cdt.AddColumn("Active?", 7); + cdt.AddColumn("ChildAgent?", 7); cdt.AddColumn("ping(ms)", 8); SceneManager.ForEachScene( s => s.ForEachClient( - c => cdt.AddRow( - s.Name, - c.Name, - c.CircuitCode.ToString(), - c.RemoteEndPoint.ToString(), - c.IsActive.ToString(), - c.PingTimeMS))); + c => + { + bool child = false; + if(c.SceneAgent != null && c.SceneAgent.IsChildAgent) + child = true; + cdt.AddRow( + s.Name, + c.Name, + c.CircuitCode.ToString(), + c.RemoteEndPoint.ToString(), + c.IsActive.ToString(), + child.ToString(), + c.PingTimeMS); + })); MainConsole.Instance.Output(cdt.ToString()); } -- cgit v1.1 From f25476164949bb774ce784ab7894e5f84d4c6b41 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 17 Sep 2014 14:47:36 +0100 Subject: turn off Nangle on users of ServivePointManager like webrequests --- OpenSim/Region/Application/Application.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index 3a4e5df..6215055 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -75,6 +75,7 @@ namespace OpenSim new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); ServicePointManager.DefaultConnectionLimit = 12; + ServicePointManager.UseNagleAlgorithm = false; // Add the arguments supplied when running the application to the configuration ArgvConfigSource configSource = new ArgvConfigSource(args); -- cgit v1.1 From a301bad8ad047f4acf122d5b47be8d81c371c3c3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 13 Oct 2014 12:10:13 +0100 Subject: on util thread pool reduce the min number of threads, increase the maximum and increase the idle time before release to OS --- OpenSim/Region/Application/OpenSim.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index e1e3d87..369e79d 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -113,8 +113,8 @@ namespace OpenSim if (!String.IsNullOrEmpty(asyncCallMethodStr) && Utils.EnumTryParse(asyncCallMethodStr, out asyncCallMethod)) Util.FireAndForgetMethod = asyncCallMethod; - stpMinThreads = startupConfig.GetInt("MinPoolThreads", 15); - stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15); + stpMinThreads = startupConfig.GetInt("MinPoolThreads", 2 ); + stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 25); m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) "); } -- cgit v1.1 From b5ac2eb1e1806a826d1c63608641cd7892d4e888 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 10 Mar 2015 01:04:04 +0100 Subject: Allow setting the size of the wearables array from config, for core compatibility --- OpenSim/Region/Application/OpenSim.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 369e79d..b9b9cd0 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -108,6 +108,7 @@ namespace OpenSim m_timeInterval = startupConfig.GetInt("timer_Interval", 1200); } + AvatarWearable.MAX_WEARABLES = startupConfig.GetInt("max_wearables", AvatarWearable.MAX_WEARABLES); string asyncCallMethodStr = startupConfig.GetString("async_call_method", String.Empty); FireAndForgetMethod asyncCallMethod; if (!String.IsNullOrEmpty(asyncCallMethodStr) && Utils.EnumTryParse(asyncCallMethodStr, out asyncCallMethod)) -- cgit v1.1 From 0af2fafddf36009ffe470da106dc6d0ceb3ced10 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 19 Aug 2015 11:04:28 +0100 Subject: add missing regionExtent setup and Scene physicsscene configuration ( not exactly as core) --- OpenSim/Region/Application/OpenSimBase.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index f663c77..e8cf7cc 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -767,7 +767,6 @@ namespace OpenSim clientServer = clientNetworkServers; scene.LoadWorldMap(); - scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName); scene.PhysicsScene.RequestAssetMethod = scene.PhysicsRequestAsset; scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised()); scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight); @@ -783,10 +782,12 @@ namespace OpenSim protected override Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager) { + Vector3 regionExtent = new Vector3(regionInfo.RegionSizeX, regionInfo.RegionSizeY, regionInfo.RegionSizeZ); + PhysicsScene physicsScene = GetPhysicsScene(regionInfo.RegionName, regionExtent); SceneCommunicationService sceneGridService = new SceneCommunicationService(); return new Scene( - regionInfo, circuitManager, sceneGridService, + regionInfo, circuitManager, physicsScene, sceneGridService, simDataService, estateDataService, Config, m_version); } @@ -829,10 +830,10 @@ namespace OpenSim # region Setup methods - protected override PhysicsScene GetPhysicsScene(string osSceneIdentifier) + protected override PhysicsScene GetPhysicsScene(string osSceneIdentifier, Vector3 regionExtent) { return GetPhysicsScene( - m_configSettings.PhysicsEngine, m_configSettings.MeshEngineName, Config, osSceneIdentifier); + m_configSettings.PhysicsEngine, m_configSettings.MeshEngineName, Config, osSceneIdentifier, regionExtent); } /// -- cgit v1.1 From 3829df10595911de9ed1ce2f7b6cdd205828f8d0 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 24 Aug 2015 17:05:16 +0100 Subject: try to implement core load oar options --- OpenSim/Region/Application/OpenSim.cs | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index b9b9cd0..1e6ef3b 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -267,12 +267,26 @@ namespace OpenSim SavePrimsXml2); m_console.Commands.AddCommand("Archiving", false, "load oar", - "load oar [--merge] [--skip-assets] []", + + "load oar [--merge] [--skip-assets]" + + " [--default-user \"User Name\"]" + + " [--force-terrain] [--force-parcels]" + + " [--no-objects]" + + " [--rotation degrees] [--rotation-center \"\"]" + + " [--displacement \"\"]" + + " []", "Load a region's data from an OAR archive.", - "--merge will merge the OAR with the existing scene." + Environment.NewLine - + "--skip-assets will load the OAR but ignore the assets it contains." + Environment.NewLine - + "The path can be either a filesystem location or a URI." - + " If this is not given then the command looks for an OAR named region.oar in the current directory.", + "--merge will merge the OAR with the existing scene (suppresses terrain and parcel info loading).\n" + + "--default-user will use this user for any objects with an owner whose UUID is not found in the grid.\n" + + "--displacement will add this value to the position of every object loaded.\n" + + "--force-terrain forces the loading of terrain from the oar (undoes suppression done by --merge).\n" + + "--force-parcels forces the loading of parcels from the oar (undoes suppression done by --merge).\n" + + "--no-objects suppresses the addition of any objects (good for loading only the terrain).\n" + + "--rotation specified rotation to be applied to the oar. Specified in degrees.\n" + + "--rotation-center Location (relative to original OAR) to apply rotation. Default is <128,128,0>.\n" + + "--skip-assets will load the OAR but ignore the assets it contains.\n\n" + + "The path can be either a filesystem location or a URI.\n" + + " If this is not given then the command looks for an OAR named region.oar in the current directory.", LoadOar); m_console.Commands.AddCommand("Archiving", false, "save oar", -- cgit v1.1