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

Fixes #7050: Add a rudder server disable command #21

Conversation

peckpeck
Copy link
Member

@Kegeruneku
Copy link

I'm pretty sure that stopping the agent during disable should be the default, I (at least) would expect if I "disable the agent" that it it turned off completely afterwards :) (POLA and all)

Maybe you should reverse the logic and change the switch to "do not turn the agent off" ?

@peckpeck
Copy link
Member Author

peckpeck commented Aug 6, 2015

If so it should not be named disable but stop

@jooooooon
Copy link
Member

I don't think that these 2 different services should be mixed together. I see plenty of valid reasons to want to stop just the policy distribution (ie, "server stop" or maybe "server policy stop" since we have several servers in effet), such as "I want to continue enforcing current configs but not roll out any changes right now". In such a case, it would be desirable to have rudder-agent continue to run (just not get any policy updates).

The process to be managed is actually cf-serverd, not just rudder-agent. The init script for rudder-agent runs both cf-serverd and cf-execd (which in turn runs rudder-agent). So, IMHO, POLA would indicate that this command only stop cf-serverd, not cf-execd or rudder-agent.

@peckpeck
Copy link
Member Author

peckpeck commented Sep 1, 2015

But if we only stop cf-served rudder agent will rerun it as soon as it runs.

@jooooooon
Copy link
Member

We could use a flag file on the FS that our policy checks before restarting cf-serverd? A bit like disable-rudder-agent, but disable-rudder-policy-server or similar?

@peckpeck
Copy link
Member Author

couldn't we just merge the command and add an option later to only stop the server ?

echo "Agent not stopped !" 1>&2
fi
else
echo "rudder-agent has been enabled but not started, wait for next cron run"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/enabled/disabled/ + s/started/stopped/ + remove the bit about a cron run

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose to add "run rudder agent disable -s to stop the agent" too

@jooooooon
Copy link
Member

I'm fine with the "rudder agent disable" command as is (minus the backwards warning message I commented on above), but I'm really not comfortable having a "rudder server disable" that only disables one small part of the server, and even then, as Matthieu says, won't ever actually stop it by default.

@peckpeck
Copy link
Member Author

Disabling only the promise distribution is a real use case we met. We want the server to continue running, but we don't trust what's in tit to be used by the agents.

May be we can add a mandatory parameter --cfengine which we'll expand later with others like --webapp, --apache ... and a --all

@jooooooon
Copy link
Member

That sounds better. Not "--cfengine" though, how about "--policy-server"?

@peckpeck peckpeck force-pushed the ust_7050/add_a_rudder_server_disable_command branch from 63c9e46 to e308f37 Compare January 26, 2016 13:07
@peckpeck
Copy link
Member Author

PR updated

@jooooooon
Copy link
Member

We agreed on naming the command "rudder server disable-policy-distribution" and adding a "flag file" /opt/rudder/etc/disable-policy-distribution so that the agent doesn't start cf-serverd again.

@jooooooon
Copy link
Member

Replaced by #62

@jooooooon jooooooon closed this May 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants