• Print

Author Topic: Symbolic links to share groups in ulx?  (Read 7307 times)

0 Members and 1 Guest are viewing this topic.

Offline bran92don

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Symbolic links to share groups in ulx?
« on: August 26, 2013, 06:55:28 pm »
I am trying to see if this is possible, or if I am doing something wrong. Basically I host 4 garrys mod servers and was trying to make it easier to add admins. I have no clue how to do this with sql. I tried doing a symbolic link with the main server and to all of the other data folders, but when I go to other servers it does not work. Can this not be done, or would this require a server restart every time? To me it seems like this should work no problem.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Symbolic links to share groups in ulx?
« Reply #1 on: August 26, 2013, 07:14:03 pm »
I'm pretty sure the fact that each server requires write access to the /data/ folder, meaning there would be 4 arguing for contention, would prevent this from working.
You MIGHT have better luck pointing to a read only file.
Try adding your admins/superadmins using the old fashioned way (notepad + Gmodsettings/users.txt).
TBH, I don't even know if it's used anymore in Gmod13.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: Symbolic links to share groups in ulx?
« Reply #2 on: August 26, 2013, 08:47:47 pm »
If you're running multiple servers off of the same server box why not just run multiple instances of the same srcds.exe.

That's what I did and the servers shared the same addons and data folder. Making ULX essentially cross server. There might be some side effects to doing it this way though.

Offline bran92don

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Symbolic links to share groups in ulx?
« Reply #3 on: August 26, 2013, 09:50:52 pm »
Yea I can't do this, because it doesn't seem to wise to me. Also some addons should not really, be together. Like its a ttt, darkrp, deathrun, and slender man server. I have a environment mod that does not need to be on the slender man server. Also it limits me on the loading screen. Like I might need too have different loading screens set up. Also the server name would be a issue, but  I guess I could put that in the launch parameters.

BAH if I knew mysql I would try to do it that way. I might just end up learning it anyways, I like to learn stuff early,and by myself.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: Symbolic links to share groups in ulx?
« Reply #4 on: August 26, 2013, 11:08:54 pm »
All the important things could be done in launch parameters. The only thing would be the addons. You'd have to write in a check to only enable certain ones on certain servers.

The SQL method is much easier.

Offline bran92don

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Symbolic links to share groups in ulx?
« Reply #5 on: August 27, 2013, 11:44:33 am »
I don't even know where to begin with sql, and every time I try to look up one for ulx I read stuff about " It is to much of a headache", or "you need to code it yourself. I am fine with coding stuff myself, but sorta hard when you have never attempted sql. It also baffles me that not many admin mods have sql in them. You'd think servers would have run into this issue before and decided to make it apart of the admin mod.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: Symbolic links to share groups in ulx?
« Reply #6 on: August 27, 2013, 12:13:19 pm »
We've said it a thousand times:

ULX will not have SQL support because Garrys Mod does not have SQL support.

Sure you can add SQL functionality through 3rd party addons, but then there are any number of things that could go wrong. Such as the author of the 3rd party addon losing interest and not maintaining it through garry's updates, or Garry breaking compatibility with the external module (because we all know garry is the best with compatibility).

That's ultimately why no admin mods have SQL support built in. I hope this at least sheds some light as to why it's not built in.

Offline bran92don

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Symbolic links to share groups in ulx?
« Reply #7 on: August 27, 2013, 06:24:31 pm »
I got this working, but I do not like how it does not allow me to edit the permission on the fly. Also I have to read myself to superadmin on every server.  /index.php/topic,5738.0.html

Offline Buzzkill

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 176
  • Karma: 59
    • The Hundred Acre Bloodbath
Re: Symbolic links to share groups in ulx?
« Reply #8 on: May 06, 2015, 09:12:54 am »
I'm resurrecting this thread because it's directly relevant to my question, and since Google brought me here I figured its probably better to resurrect than reinvent.  :)

I have 8 servers, all with identical group and user files.  I'm in the process of rolling all of the shared content (ie, addons) into a single spot and using links to centralize everything.

I understand that file contention issues make the subject of linking a central data file to multiple servers inherently dangerous.  That being said, I only see one place where either of the files gets written to regularly.  That is users.txt, and has to do with the nickname update done in ucl.lua

Code: Lua
  1. -- Update their name
  2.                         ucl.authed[ uid ].name = ply:Nick()
  3.                         ucl.saveUsers()

This is cosmetic as far as I'm concerned.  If I rem this out and am judicious about not doing something stupid (updating permissions from two different servers simultaneously, for example), do I mitigate the chance of collision/corruption, or am I missing some file write access scenarios somewhere?

Thanks!!

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Symbolic links to share groups in ulx?
« Reply #9 on: May 06, 2015, 10:20:55 am »
The only thing I could think of is user group changes.  If you have something like autopromote and one user gets promoted on one server and another gets promoted on another server, the servers will overwrite each other.

Offline Buzzkill

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 176
  • Karma: 59
    • The Hundred Acre Bloodbath
Re: Symbolic links to share groups in ulx?
« Reply #10 on: May 06, 2015, 11:38:16 am »
Yep, thanks.  Definitely wouldn't run this on the servers I use autopromote on.


Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Symbolic links to share groups in ulx?
« Reply #11 on: May 06, 2015, 08:15:01 pm »
Does Gmod (or our 'more stable cause Gmod broke it several times' file i/o) lock files when server is running, even when not in use?
Just something to watch out for. I've never tested personally.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Symbolic links to share groups in ulx?
« Reply #12 on: May 06, 2015, 08:32:50 pm »
GMod does not lock files.
Experiencing God's grace one day at a time.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: Symbolic links to share groups in ulx?
« Reply #13 on: May 06, 2015, 09:32:00 pm »
I've run multiple servers using one set of data files (using symbolic links) before and for some situations, it works great.

For something like ULX/ULib where it only reads the file once when the server loads and then saves copies over the original when things are changed in memory, it may not work so great.

Offline Buzzkill

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 176
  • Karma: 59
    • The Hundred Acre Bloodbath
Re: Symbolic links to share groups in ulx?
« Reply #14 on: May 07, 2015, 12:42:16 pm »
Yep -- I'm going to be religious about which server I consider the "head" in terms of making updates to the data files.  The other servers will essentially slave to the data files.  The obvious situation I don't want to allow for is :  Change To Server A.  Change to Server B.  A persists.  B persists, overwriting change from A. 

Otherwise, I think corruption possibilities are very remote.  Key word being "think".  :)

  • Print