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 #11950: Add a rudder-server init script that will replace the rudder script on server #1449
Conversation
PR rebased |
43d7ded
to
a84712d
Compare
Commit modified |
a84712d
to
991cdd5
Compare
Commit modified |
991cdd5
to
33a8431
Compare
rm -f /var/rudder/tmp/migration-rudder-service-rename | ||
rm -f /var/rudder/tmp/migration-rudder-service-systemd | ||
rm -f /var/rudder/tmp/migration-rudder-service-enabled | ||
rm -f /var/rudder/tmp/migration-rudder-cf-serverd-disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you do this here ? They are used just afterwards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but if the rudder-server-root
is installed after rudder-agent
, we need to keep the flags (as the init file will be gone too)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does removing them at the begining of the postinst prevent that ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will absolutely not, you're right, do you have an idea to handle this problem?
true | ||
|
||
install: | ||
# Init files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a double negation, put a comment to say what it means for the default value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be better, like "default is false -> use init"
echo "Rudder is now installed but not configured." | ||
echo "Please run /opt/rudder/bin/rudder-init" | ||
echo "************************************************************" | ||
CFRUDDER_FIRST_INSTALL=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CFRUDDER_FIRST_INSTALL=$1 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed!
@@ -49,7 +44,8 @@ binary-arch: install | |||
dh_installchangelogs | |||
# dh_installdocs | |||
# dh_installexamples | |||
dh_install --SOURCEDIR=$(CURDIR)/SOURCES/ rudder-server-root /opt/rudder/etc/server-roles.d/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you remove the roles file ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
install in now done in make install
Commit modified |
77c807c
to
54cb7c9
Compare
Commit modified |
rudder-agent/SPECS/rudder-agent.spec
Outdated
@@ -358,13 +358,13 @@ then | |||
# If old rudder-agent service is here and enabled | |||
if chkconfig --list rudder-agent 2>&1 | grep -q -e 3:on -e B:on | |||
then | |||
touch /var/rudder/tmp/migration-rudder-service-enabled | |||
touch /var/rudder/tmp/migration-rudder-service-enabled{,-server} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bashism
rudder-agent/debian/preinst
Outdated
@@ -59,12 +59,12 @@ then | |||
|
|||
if test /etc/rc`/sbin/runlevel | cut -d' ' -f2`.d/S??rudder-agent | |||
then | |||
touch /var/rudder/tmp/migration-rudder-service-enabled | |||
touch /var/rudder/tmp/migration-rudder-service-enabled{,-server} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bashism
fi | ||
|
||
# Clean flag | ||
rm -r /var/rudder/tmp/migration-rudder-service-enabled-server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you mean -f ?
then | ||
if chkconfig --list rudder 2>&1 | grep -q -e 3:on -e B:on | ||
then | ||
touch /var/rudder/tmp/migration-rudder-service-enabled-server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing the 2nd file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not need it here as rudder-server-root scripts have no side effect on rudder-agent
then | ||
if test /etc/rc`/sbin/runlevel | cut -d' ' -f2`.d/S??rudder | ||
then | ||
touch /var/rudder/tmp/migration-rudder-service-enabled-server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing the second file ?
rudder-agent/debian/rules
Outdated
@@ -62,7 +62,7 @@ install: build | |||
dh_installdirs | |||
cd SOURCES && $(MAKE) install $(MAKE_OPTIONS) DESTDIR=$(CURDIR)/debian/tmp | |||
# let this file be managed by dh_installinit | |||
mv $(CURDIR)/debian/tmp/etc/init.d/rudder-agent debian/rudder-agent.init | |||
mv $(CURDIR)/debian/tmp/etc/init.d/rudder-server.init debian/rudder-server.init |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
Commit modified |
54cb7c9
to
e1e60ab
Compare
…udder script on server
Commit modified |
e1e60ab
to
1bb7be6
Compare
This PR is not mergeable to upper versions. |
OK, merging this PR |
https://www.rudder-project.org/redmine/issues/11950
Replacing previous PR: #1439