Bug 1464065 - [WALA] "waagent -configuration-path:/path -start" not take effect
[WALA] "waagent -configuration-path:/path -start" not take effect
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: WALinuxAgent (Show other bugs)
x86_64 Linux
low Severity low
: rc
: ---
Assigned To: Vitaly Kuznetsov
Virtualization Bugs
: Extras
Depends On: 1451174
  Show dependency treegraph
Reported: 2017-06-22 07:18 EDT by Yuhui Jiang
Modified: 2017-07-24 05:31 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-07-24 05:31:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Github /Azure/WALinuxAgent/issues/764 None None None 2017-06-22 07:18 EDT

  None (edit)
Description Yuhui Jiang 2017-06-22 07:18:44 EDT
Description of problem:
I've ran the command "waagent -configuration-path:/path -start",but the parameter "-configuration-path" not take effect.
This will affect WALA running on RHEL6.x
(Because on RHEL6.x, execute WALA service through "serivce waagent start",it will invoke /etc/init.d/waaget.And in this file,execute WALA through "waagent -start",so this will affect WALA)

below is code in agent.py

220 def start():
221     """
222     Start agent daemon in a background process and set stdout/stderr to
223     /dev/null
224     """
225     devnull = open(os.devnull, 'w')
226     subprocess.Popen([sys.argv[0], '-daemon'], stdout=devnull, stderr=devnull)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Prepare a RHEL6.9 VM on Azure with WALA-2.2.12-1 installed
2.Modify WALA init file(/etc/init.d/waagent),add "-configuration-path:/root/waagent" on line#19,like this "$WAZD_BIN -configuration-path:/root/waagent.conf -start",save and exit
3.Restart WALA service    #service waagent restart
4.Check WALA process  #ps aux | grep waagent

Actual results:
[root@wala69test1 ~]# ps aux | grep waagent
root     38459  0.6  0.6 203908 11212 pts/0    S    06:40   0:00 python /usr/sbin/waagent -daemon
root     38466  1.5  0.8 367988 13864 pts/0    Sl   06:40   0:00 python -u /usr/sbin/waagent -run-exthandlers

Expected results:
[root@walayjgrhelrun2 ~]# ps aux | grep waagent
root     21280  1.8  0.1 222104 13060 ?        Ss   18:43   0:00 /usr/bin/python -u /usr/sbin/waagent -configuration-path:/root/waagent.conf -daemon
root     21285  4.5  0.2 382588 18236 ?        Sl   18:43   0:00 python -u /usr/sbin/waagent -run-exthandlers -configuration-path:/root/waagent.conf

Additional info:
Comment 2 Mohammed Gamal 2017-06-23 04:55:41 EDT
Fixed in v.2.2.14
Comment 3 Yuhui Jiang 2017-07-06 06:40:19 EDT
Verified this issue on RHEL-7.4 with WALinuxAgent-2.2.14-1.el6.noarch.rpm pass.
The issue has solved.

Verify Steps:
 #refer this issue's Description
Comment 4 yuxisun@redhat.com 2017-07-24 05:31:35 EDT
Close this issue because WALinuxAgent-2.2.14-1.el7/6 has shipped.

Note You need to log in before you can comment on or make changes to this bug.