Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005697opensim[REGION] OpenSim Corepublic2011-09-19 14:502014-07-29 13:40
Reporterrandomhuman 
Assigned Tojustincc 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0005697: [PATCH] Null region loader to allow OpenSim to be started without loading any regions
DescriptionI added this null region loader to allow OpenSim to be started without any regions being loaded, and without the user being asked to create one. The idea is that regions will be created/loaded later by an external system through the RemoteAdmin interface (or perhaps by some other means).
TagsNo tags attached.
Git Revision or version numberba120ba7-fae3-4c10-a6b3-c5eea7d7b04d
Run Mode Standalone (Multiple Regions)
Physics EngineBasicPhysics
EnvironmentMono / Linux32
Mono VersionOther
Viewer
Attached Filespatch file icon 0001-Null-region-loader-to-allow-OpenSim-to-be-started-wi.patch [^] (9,785 bytes) 2011-09-19 14:50 [Show Content]
txt file icon 002-Null-region-loader-to-allow-OpenSim-to-be-started-wi.txt [^] (15,676 bytes) 2011-09-20 14:20 [Show Content]
patch file icon 0001-Added-a-setting-to-Startup-section-of-config-that-wi.patch [^] (10,990 bytes) 2011-09-21 14:47 [Show Content]
patch file icon 0002-Removed-uncalled-region-load-method.patch [^] (2,348 bytes) 2011-09-22 10:13 [Show Content]

- Relationships

-  Notes
(0019972)
Michelle Argus (reporter)
2011-09-19 15:08

Sounds good an i could use it aswell.

 However, if i see correct, it means that one needs to use region_info_source = "null" in the OpenSim.ini. After creating the new region one would need to change the OpenSim.ini again. As I load the regions via web I would use a separate setting that detects if no region is listed in the xml or region.ini, if no region is listed it starts the OS without the question. I think that might be a better solution?
(0019973)
randomhuman (reporter)
2011-09-19 15:53

That was the first thought I had, but for what I have in mind I will be running simulators that *never* load regions on startup. What I've implemented was both easier and more appropriate for my own purposes.

What you're talking about might still have merit, but I would see it as a distinct change.
(0019982)
Michelle Argus (reporter)
2011-09-20 13:46

Well, I also have sims that permanently run without regions, just that i use a load balancer which could use these "sleeping" sims when needed.

I will post a patch a bit later, just doing some last tests, and then we have both our needs with a new setting in the ini. Option is always to skip the region configs, or only skip when no region is found in the configs ;) Patch should be up in an hour
(0019985)
randomhuman (reporter)
2011-09-20 14:00

Sounds like that would work for me alright... Look forward to seeing it.
(0019987)
Michelle Argus (reporter)
2011-09-20 14:27

Ok, uploaded the new patch. As you will see, there are many similarities to your post ;)

In the OpenSim.ini i have added the new option null_region to the startup section.

* When this option is commented out, all works as usual incl. the forced region creation...

* null_region = "always" -> This can be used if the sim always should run the null region and skip reading all region configs.

* null_region = "no regions" -> This setting only starts the sim with the null region if there is no region found to load in the region config files
(0019988)
randomhuman (reporter)
2011-09-20 14:51

I was actually expecting that you would get rid of the null region loader tbh. If the filesystem and web region loaders are aware of the new setting you've added then it would seem to be a bit redundant; they can just return an empty array if null_region == "always" (without even checking if there are regions configured). Maybe we should let the people who make the decisions 'round these parts comment though ;)

I see I left out the copyright info on the file I added, thanks for catching that. It was my first time adding a file to the project!
(0019989)
randomhuman (reporter)
2011-09-21 02:21

How about this Michelle:

* We leave the Null region loader, and leave it specifiable as a region_info_source in the ini.

* We change the setting you added to "create_initial_region", a boolean defaulting to true. If true then all loaders that actually load regions will attempt to create one if none are found, otherwise they will just start up with no regions.

I think this would be a bit cleaner conceptually. What do you think? Would it cover your use case?
(0019990)
Michelle Argus (reporter)
2011-09-21 09:50

Yes, thats also an option, the Null region loader skips reading any region files that exist while create_initial_region is used to skip the initial questions to create a region at startup if none are found. Like that one could use a combination as needed...
(0019998)
randomhuman (reporter)
2011-09-21 14:52

When I went to implement what I outlined in my last comment it didn't really seem that appropriate because the web loader is not currently asking the user to create a region if none are found (and how could it, really?).

Instead, I threw out the null region loader and created a setting in the startup section called allow_regionless, defaulting to false. With the default, the existing behaviour is unchanged; the filesystem loader creates a region if none are found, and the web loader falls over. With it set to true, any regions that are found are loaded normally, but if no regions are found then the simulator still starts up, and doesn't ask the user to create one.

The relevant patch is 0001-Added-a-setting-to-Startup-section-of-config-that-wi.patch, and it is not dependent on either of the previous patches.
(0020004)
randomhuman (reporter)
2011-09-22 10:14

While looking through the region load code again I found a method that is no longer being called. I removed it in 0002-Removed-uncalled-region-load-method.patch.
(0020015)
justincc (administrator)
2011-09-23 18:09

Great stuff Kevin and Michelle. I particularly liked the fact that you stuck to our arbitrary conventions and put comments in the OpenSim,ini.example, Kevin :)

Applied as git master 39d7945 and e789ab6.

- Issue History
Date Modified Username Field Change
2011-09-19 14:50 randomhuman New Issue
2011-09-19 14:50 randomhuman File Added: 0001-Null-region-loader-to-allow-OpenSim-to-be-started-wi.patch
2011-09-19 14:50 randomhuman Git Revision => ba120ba7-fae3-4c10-a6b3-c5eea7d7b04d
2011-09-19 14:50 randomhuman Run Mode => Standalone (Multiple Regions)
2011-09-19 14:50 randomhuman Physics Engine => BasicPhysics
2011-09-19 14:50 randomhuman Environment => Mono / Linux32
2011-09-19 14:50 randomhuman Mono Version => Other
2011-09-19 15:08 Michelle Argus Note Added: 0019972
2011-09-19 15:53 randomhuman Note Added: 0019973
2011-09-20 13:37 randomhuman Status new => patch included
2011-09-20 13:46 Michelle Argus Note Added: 0019982
2011-09-20 14:00 randomhuman Note Added: 0019985
2011-09-20 14:20 Michelle Argus File Added: 002-Null-region-loader-to-allow-OpenSim-to-be-started-wi.txt
2011-09-20 14:27 Michelle Argus Note Added: 0019987
2011-09-20 14:51 randomhuman Note Added: 0019988
2011-09-21 02:21 randomhuman Note Added: 0019989
2011-09-21 09:50 Michelle Argus Note Added: 0019990
2011-09-21 14:47 randomhuman File Added: 0001-Added-a-setting-to-Startup-section-of-config-that-wi.patch
2011-09-21 14:52 randomhuman Note Added: 0019998
2011-09-22 10:13 randomhuman File Added: 0002-Removed-uncalled-region-load-method.patch
2011-09-22 10:14 randomhuman Note Added: 0020004
2011-09-23 18:09 justincc Status patch included => resolved
2011-09-23 18:09 justincc Resolution open => fixed
2011-09-23 18:09 justincc Assigned To => justincc
2011-09-23 18:09 justincc Note Added: 0020015
2014-07-29 13:40 chi11ken Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker