-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Versionable Properties #310
Conversation
…as CONSOLE_* variables.
… to the server_set_property() function.
… files. This allows overrides of version properties in the server.properties.
…case statement and check if path is already absolute.
…mmand_server_console() function.
Hey donkers, this pull request seems well covered from the outset. I'm going to run through some testing with a full installation and process, per normal :) |
One issue I found, the msm help command is returning the versioning banner typically displayed when starting the server. This is new behavior.
this is happening in server_property, https://github.com/donkers/msm/blob/master/init/msm#L1778 adding a few debug blocks to the server_property function
it would appear msm is setting the version to unknown if the version isn't set in server.properties for a server, which is triggering the message in the if block following. The above scenario, I have 2 servers set up, with one hard-coded to 1.7 in server.properties, one without a setting in the file.
if I remove the version setting in stable, the banner will trigger twice
Given you create a new server, and don't set the msm-version in server.properties, when 'msm help' is run, then it should only display the help menu. I hope my explanation is clear and makes sense. |
of note, this behavior is also happening for msm update
|
I have now defined a list of properties that can be put in the versioning files.
I was previously using a regex filter that was causing the versioning files to processed when it wasn't needed. |
edit: sorry, I did realize there was one more issue I found, not counting the "list" command issue (which is not due to your code changes). The one I did find has to do with the log roll command. when running the log roll command which would run via cron, the path is being created within the user directory (relative, not absolute), instead of the archive dir:
then, inside of my 'stable' server's directory, notice the opt dir
|
…$*_PATH variables unnecessarily.
What I found was happening was the I have repeated my original testing method again, comparing the output of the following commands using msmhq:master and donkers:master versions of the script. (on Debian only this time) msm server list
msm all worlds list
msm jargroup list
msm config
msm all config
msm 1-2-5 start
msm 1-2-5 stop now
msm 1-3-2 start
msm 1-3-2 stop now
msm 1-6-4 start
msm 1-6-4 stop now
msm 1-7-10 start
msm 1-7-10 stop now
msm 1-8-8 start
msm 1-8-8 stop now
msm all worlds backup
msm all logroll With the exception of timestamps and such the output almost matches. It seems the MSM Info: Assuming 'minecraft/1.7.0'... is still printed during a Upon further inspection of the code I was unable to figure out an easy way to rectify this and think it may have to be a necessary compromise to support #309, at least for the time being. P.S. : When doing your testing are you using any automation or are you just doing it manually? |
I'm generally okay with the message printing on those commands, since they are less likely to happen by the admin, but I'd like to get @marcuswhybrow's opinion on that one. As for testing, I am doing it manually. The testing path, in my mind, is generally so: read through the commits, test anything the code change will affect. Then run through high risk items, and if time allows, test anything else within medium risk. Follow down a rabbit hole if I see something amiss. We do have a test suite (https://github.com/msmhq/msm/blob/master/test.sh), which runs to verify all pull requests. It hasn't been updated in a while, and could use some update lovin. @zachlatta was pushing for more code coverage when he was working a lot on reviewing and accepting pulls, but it seemed like people kept resisting updating the tests. I'm all about automation :) I would love to take the time to update the test suite for a more thorough code coverage, to allow for a more thorough continuous integration process, but trying to grab issues and pull requests comes from the last of my freetime. If I had more time to do opensource things, yeah. Anywho. |
…or config command
That should bring the behaviour more in line with the current msmhq:master. No unknown version warning for logroll or config commands. |
Hey, sorry my focus has been elsewhere in the last while, and haven't been able to test things out. You should have the ability to merge your own pull request, since you have had successful merges before. I believe the purpose of opening up commit rights was to get the bottleneck of waiting on people to accept pulls out of the way, and to keep development moving with the community. If you have any questions, please feel free to ask. |
This will allow some server properties to be stored in the version files. This is for feature request #309, more detail on implementation can be found in the issue discussion.
To test the new code I did the following on a Debian Jessie install, and a CentOS 7 install.
Started, stopped, and opened the console of, server instances running versions; 1.2.5, 1.6.4, 1.7.10, and 1.8.8.
Ran the commands below to confirmed that all variables/setting get dealt with and set correctly. When performing this test the only value that differed between the two branches was
LOG_PATH
, as expected.I also snuck in commit 66c6097 to addresses issue #208.
msm [SERVER] console
now works when run as root as well as the owner of the server process (defaults to minecraft).