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 #8196: Tell if we are on a relay in rudder agent info #58

Conversation

peckpeck
Copy link
Member

@jooooooon
Copy link
Member

I see the value in displaying whether a machine is a relay or not.

However, this method seems a bit flaky - just checking if a directory exists. Don't we have a more reliable method? I know that as of recent versions there is a "rudder-server-relay" package. We could start by checking for that, maybe, and go back to directories as a fallback?

@peckpeck
Copy link
Member Author

/var/rudder/share is created by the relay promises and /var/rudder/inventories/incoming is created by the relay package

Checking the package is hard since we are in a shell script and we need to first detect the os.

ROLES="${ROLES}, rudder-relay"
elif [ -d /var/rudder/inventories/incoming ]
then
ROLES="${ROLES}, rudder-relay (not registered)"
Copy link
Member

Choose a reason for hiding this comment

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

Currently, it looks to me as if this will display a "rudder-relay" role on root servers too. Surely we should protect against this?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes we should

@peckpeck
Copy link
Member Author

PR updated

@peckpeck peckpeck force-pushed the bug_8196/tell_if_we_are_on_a_relay_in_rudder_agent_info branch from f21022d to 8d5a178 Compare April 27, 2016 08:38
@jooooooon jooooooon merged commit 3e656e1 into Normation:master Apr 27, 2016
@peckpeck peckpeck deleted the bug_8196/tell_if_we_are_on_a_relay_in_rudder_agent_info branch July 13, 2020 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants