Wget output is considered to be an error in proxy.log

Hi all,

I have installed Foreman along with Foreman proxy (TFTP enabled) from RPM
(1.5.2).
When I set "Build" on any host, I get the following in
/var/log/foreman-proxy/proxy.log

D, [2014-07-30T09:29:41.942542 #2174] DEBUG – : Starting task (total: 0):
/usr/bin/wget --timeout=10 --tries=3 --no-check-certificate -nv -c "
http://download.eng.tlv.redhat.com/pub/rhel/released/RHEL-6/6.5/Server/x86_64/os//images/pxeboot/vmlinuz"
-O "/var/lib/tftpboot/boot/RedHat-6.5-x86_64-vmlinuz"
D, [2014-07-30T09:29:42.130306 #2174] DEBUG – : Starting task (total: 0):
/usr/bin/wget --timeout=10 --tries=3 --no-check-certificate -nv -c "
http://download.eng.tlv.redhat.com/pub/rhel/released/RHEL-6/6.5/Server/x86_64/os//images/pxeboot/initrd.img"
-O "/var/lib/tftpboot/boot/RedHat-6.5-x86_64-initrd.img"
E, [2014-07-30T09:29:42.188848 #2174] ERROR – : [7469] 2014-07-30 09:29:42
URL:
http://download.eng.tlv.redhat.com/pub/rhel/released/RHEL-6/6.5/Server/x86_64/os//images/pxeboot/vmlinuz
[4128944/4128944] -> "/var/lib/tftpboot/boot/RedHat-6.5-x86_64-vmlinuz" [1]
E, [2014-07-30T09:29:42.791874 #2174] ERROR – : [9921] 2014-07-30 09:29:42
URL:
http://download.eng.tlv.redhat.com/pub/rhel/released/RHEL-6/6.5/Server/x86_64/os//images/pxeboot/initrd.img
[33383449/33383449] ->
"/var/lib/tftpboot/boot/RedHat-6.5-x86_64-initrd.img" [1]

The files (vmlinuz & initrd) are successfully downloaded.
Taking a look at the smart-proxy repo (@github), I've understood that
Proxy::HttpDownload's initialize is invoked passing the command method to
the super function, where the stderr and stdout are routed to logger.error
and logger.debug respectively. However, it seems like wget messages are
streamed to stderr, even though they don't indicate of an error or a
problem.

I don't mind to fix this bug, but I do need someone to mentor me, since I
am not sure what is the appropriate way to do this:

  1. create another class that stores the message and only if the status-code
    is not zero, streams the message to logger.error.
  2. add a different logic to Proxy::Util::CommandTask @ lib/proxy/util.rb.
  3. any other ideas?

Best Regards.

I think this has already been fixed in CommandTask in the develop (1.6)
branch. The stderr output is now sent to logger.debug rather than
logger.error.

··· On 03/08/14 17:26, boaz s wrote: > Hi all, > > I have installed Foreman along with Foreman proxy (TFTP enabled) from > RPM (1.5.2). > When I set "Build" on any host, I get the following in > /var/log/foreman-proxy/proxy.log > > D, [2014-07-30T09:29:41.942542 #2174] DEBUG -- : Starting task (total: > 0): /usr/bin/wget --timeout=10 --tries=3 --no-check-certificate -nv -c > "http://download.eng.tlv.redhat.com/pub/rhel/released/RHEL-6/6.5/Server/x86_64/os//images/pxeboot/vmlinuz" > -O "/var/lib/tftpboot/boot/RedHat-6.5-x86_64-vmlinuz" > D, [2014-07-30T09:29:42.130306 #2174] DEBUG -- : Starting task (total: > 0): /usr/bin/wget --timeout=10 --tries=3 --no-check-certificate -nv -c > "http://download.eng.tlv.redhat.com/pub/rhel/released/RHEL-6/6.5/Server/x86_64/os//images/pxeboot/initrd.img" > -O "/var/lib/tftpboot/boot/RedHat-6.5-x86_64-initrd.img" > E, [2014-07-30T09:29:42.188848 #2174] ERROR -- : [7469] 2014-07-30 > 09:29:42 > URL:http://download.eng.tlv.redhat.com/pub/rhel/released/RHEL-6/6.5/Server/x86_64/os//images/pxeboot/vmlinuz > [4128944/4128944] -> "/var/lib/tftpboot/boot/RedHat-6.5-x86_64-vmlinuz" [1] > E, [2014-07-30T09:29:42.791874 #2174] ERROR -- : [9921] 2014-07-30 > 09:29:42 > URL:http://download.eng.tlv.redhat.com/pub/rhel/released/RHEL-6/6.5/Server/x86_64/os//images/pxeboot/initrd.img > [33383449/33383449] -> > "/var/lib/tftpboot/boot/RedHat-6.5-x86_64-initrd.img" [1] > > The files (*vmlinuz* & *initrd*) are successfully downloaded. > Taking a look at the smart-proxy repo (@github), I've understood that > Proxy::HttpDownload's initialize is invoked passing the command method > to the super function, where the stderr and stdout are routed to > logger.error and logger.debug respectively. However, it seems like wget > messages are streamed to stderr, even though they don't indicate of an > error or a problem. > > I don't mind to fix this bug, but I do need someone to mentor me, since > I am not sure what is the appropriate way to do this: > 1. create another class that stores the message and only if the > status-code is not zero, streams the message to logger.error. > 2. add a different logic to Proxy::Util::CommandTask @ lib/proxy/util.rb. > 3. any other ideas?


Dominic Cleal
Red Hat Engineering

Hi Dominic,

Yes, you're right.

Thanks.

··· On Monday, August 4, 2014 10:06:34 AM UTC+3, Dominic Cleal wrote: > > On 03/08/14 17:26, boaz s wrote: > > Hi all, > > > > I have installed Foreman along with Foreman proxy (TFTP enabled) from > > RPM (1.5.2). > > When I set "Build" on any host, I get the following in > > /var/log/foreman-proxy/proxy.log > > > > D, [2014-07-30T09:29:41.942542 #2174] DEBUG -- : Starting task (total: > > 0): /usr/bin/wget --timeout=10 --tries=3 --no-check-certificate -nv -c > > " > http://download.eng.tlv.redhat.com/pub/rhel/released/RHEL-6/6.5/Server/x86_64/os//images/pxeboot/vmlinuz" > > > -O "/var/lib/tftpboot/boot/RedHat-6.5-x86_64-vmlinuz" > > D, [2014-07-30T09:29:42.130306 #2174] DEBUG -- : Starting task (total: > > 0): /usr/bin/wget --timeout=10 --tries=3 --no-check-certificate -nv -c > > " > http://download.eng.tlv.redhat.com/pub/rhel/released/RHEL-6/6.5/Server/x86_64/os//images/pxeboot/initrd.img" > > > -O "/var/lib/tftpboot/boot/RedHat-6.5-x86_64-initrd.img" > > E, [2014-07-30T09:29:42.188848 #2174] ERROR -- : [7469] 2014-07-30 > > 09:29:42 > > URL: > http://download.eng.tlv.redhat.com/pub/rhel/released/RHEL-6/6.5/Server/x86_64/os//images/pxeboot/vmlinuz > > [4128944/4128944] -> "/var/lib/tftpboot/boot/RedHat-6.5-x86_64-vmlinuz" > [1] > > E, [2014-07-30T09:29:42.791874 #2174] ERROR -- : [9921] 2014-07-30 > > 09:29:42 > > URL: > http://download.eng.tlv.redhat.com/pub/rhel/released/RHEL-6/6.5/Server/x86_64/os//images/pxeboot/initrd.img > > [33383449/33383449] -> > > "/var/lib/tftpboot/boot/RedHat-6.5-x86_64-initrd.img" [1] > > > > The files (*vmlinuz* & *initrd*) are successfully downloaded. > > Taking a look at the smart-proxy repo (@github), I've understood that > > Proxy::HttpDownload's initialize is invoked passing the command method > > to the super function, where the stderr and stdout are routed to > > logger.error and logger.debug respectively. However, it seems like wget > > messages are streamed to stderr, even though they don't indicate of an > > error or a problem. > > > > I don't mind to fix this bug, but I do need someone to mentor me, since > > I am not sure what is the appropriate way to do this: > > 1. create another class that stores the message and only if the > > status-code is not zero, streams the message to logger.error. > > 2. add a different logic to Proxy::Util::CommandTask @ > lib/proxy/util.rb. > > 3. any other ideas? > > I think this has already been fixed in CommandTask in the develop (1.6) > branch. The stderr output is now sent to logger.debug rather than > logger.error. > > -- > Dominic Cleal > Red Hat Engineering >