Skip to content
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

Allow reload of lsyncd config independent of slave change check #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

amarnus
Copy link

@amarnus amarnus commented Mar 19, 2013

Right now, a new lsyncd config - lsyncd.conf.lua is generated only when new slaves have been added/removed from the load balancer. However, it is possible that there is a change in the original config template - lsyncd.conf.lua.template itself or a change in the values for certain parameters in the config.php file (app config) in which case we may want to do a lsyncd config reload independently.

This pull request adds a new file reload_config.php (open to a better name) that can be used for this purpose.

# Generates a new data/lsyncd.conf.lua file 
php reload_config.php
# Generates a new lsyncd conf file & restarts the daemon
php reload_config.php --restart

Have also refactored out three methods in utilities.php:

getSlaves()
setSlaves()
reloadConfig()

…php. Added a new script: reload_config.php that forces generation of a new lsyncd config file and optional restart of lsyncd itself.
@uzyn
Copy link
Member

uzyn commented Apr 3, 2013

Looks like a good thing to have but would probably be better if it is in the same file as monitor.php with arguments.

@amarnus
Copy link
Author

amarnus commented Apr 4, 2013

Sure. On it.

@Brettk80
Copy link

Any known reason why syncing would happen to on instance in a LB group and not another? I've tested shh from the master to the box using the pub key setup and it works. Same directory structure, etc.

I have:
Master
Slave1
Slave2 - created from AMI image of Slave 1

Slave 1 updates, Slave 2 doesnt. They are all in the same LB group; though autoscaling hasnt been configured. Looking at the source though, it doesnt look like it matters that we're not using AutoScaling yet in the test environment.

Any pointers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants