-
Notifications
You must be signed in to change notification settings - Fork 366
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
2 waagent deamon processes exist after rpm -U #404
Comments
@yuxisun1217 Good catch. We'll change the agent code to stop all prior versions before starting the new version. |
@yuxisun1217 I have pushed a fix to make sure we stop any running services before starting, which should prevent this. However, I think even without this fix, running another service start should result in no action if another exists. Perhaps the sysv script should also be checking pid to see if the process is already running, since the user may decide to call service start multiple times. |
@hglkrijger Yes, I quite agree with you. It's very nice if we can use sysv script to make sure there's only 1 process. Just personal suggestion: perhaps we can use both /var/run/waagent.pid and /var/lock/subsys/waagent to control it? |
Hi @hglkrijger , may I suggest to add the "condrestart|try-restart" into the sysv script? It seems that many services run "service condrestart" in their spec files. Now we don't have this command so we have use "service restart" instead. |
sounds good, thanks @yuxisun1217 - closing this issue as the restart code is merged. |
Hi,
I make a WALinuxAgent-2.1.5 package follow the rpm/README, and then use rpm -U to upgrade from 2.0.16 to 2.1.5 on RHEL-6.8. After that, there's 2 waagent -daemon processes.
Steps:
[root@localhost ~]# ps aux|grep waagent
root 2158 5.0 1.0 197388 10808 pts/2 S 10:04 0:00 python /usr/sbin/waagent -daemon
root 2184 5.0 1.0 197384 10804 pts/2 S 10:04 0:00 python /usr/sbin/waagent -daemon
I made a new spec file, added "service waagent stop" in the %pre phase, to prevent this. (Hans helped to review that spec file). But it's only a workaround. And we read some spec files of other services(such as sshd, squid and so on), all of them there's no "service stop" in the %pre phase. So we still try to find some resolutions in the regular way(I mean if there's no %pre phase, there also shouldn't be 2 processes). Do you have some ideas about this issue? Thanks!
The text was updated successfully, but these errors were encountered: