Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
tftp doesn't return proper value after failure.
Case #1 - sending non-existent file:
i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# tftp 192.168.1.1 -m binary -c put test.txt
tftp: test.txt: No such file or directory
i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# echo $?
0
Case #2 - sending existing file to non-existent tftp server:
i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# ip -f inet addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
inet 10.16.66.121/21 brd 10.16.71.255 scope global eth0
i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# ls server.log
server.log
i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# tftp server.log -m binary -c put 192.168.1.1
Error: Name or service not known
server.log: unknown host
No target machine specified.
i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# echo $?
0
Case #3 - getting non-existent file from non-existent server:
i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# tftp whatever -m binary -c get 192.168.1.1
Error: Name or service not known
whatever: unknown host
usage: get host:file host:file ... file, or
get file file ... file if connected
i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# echo $?
0
Case #4 - getting non-existent file from proper tftp server:
i:i386|m:i686 root@hp-bl460c-02 [test]# ls
i:i386|m:i686 root@hp-bl460c-02 [test]# tftp 10.16.65.70 -m binary -c get status
i:i386|m:i686 root@hp-bl460c-02 [test]# echo $?
0
i:i386|m:i686 root@hp-bl460c-02 [test]# ls -la
drwxr-xr-x. 2 root root 4096 Oct 18 09:04 .
dr-xr-x---. 15 root root 4096 Oct 18 09:02 ..
-rw-r--r--. 1 root root 12 Oct 18 09:04 status
# this part works
i:i386|m:i686 root@hp-bl460c-02 [test]# tftp 10.16.65.70 -m binary -c get server.log
Error code 1: File not found
i:i386|m:i686 root@hp-bl460c-02 [test]# echo $?
0
i:i386|m:i686 root@hp-bl460c-02 [test]# ls -la
total 12
drwxr-xr-x. 2 root root 4096 Oct 18 09:04 .
dr-xr-x---. 15 root root 4096 Oct 18 09:02 ..
-rw-r--r--. 1 root root 0 Oct 18 09:04 server.log
-rw-r--r--. 1 root root 12 Oct 18 09:04 status
# this doesn't, and it also create file we want to download
Version-Release number of selected component (if applicable):
tftp-0.49-7.el6
How reproducible:
Always
Steps to Reproduce:
1. See 4 cases above
Actual results:
Returns 0 when fails
Expected results:
Return some non-zero value
Additional info:
I think it shouldn't also create file with zero size when it can't download it. But I don't really know if there isn't some kind of routine that could break the downloading process or crash when the file would be created after some received bytes.
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.
Comment 11RHEL Program Management
2012-09-07 05:11:03 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.
Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Since this component was not scheduled for update in past releases I am closing this bug as WONTFIX. If PM or reporter thinks otherwise please reopen it.
Description of problem: tftp doesn't return proper value after failure. Case #1 - sending non-existent file: i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# tftp 192.168.1.1 -m binary -c put test.txt tftp: test.txt: No such file or directory i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# echo $? 0 Case #2 - sending existing file to non-existent tftp server: i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# ip -f inet addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN inet 127.0.0.1/8 scope host lo 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 inet 10.16.66.121/21 brd 10.16.71.255 scope global eth0 i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# ls server.log server.log i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# tftp server.log -m binary -c put 192.168.1.1 Error: Name or service not known server.log: unknown host No target machine specified. i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# echo $? 0 Case #3 - getting non-existent file from non-existent server: i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# tftp whatever -m binary -c get 192.168.1.1 Error: Name or service not known whatever: unknown host usage: get host:file host:file ... file, or get file file ... file if connected i:x86_64|m:x86_64 root@penguin-a1300-01 [~]# echo $? 0 Case #4 - getting non-existent file from proper tftp server: i:i386|m:i686 root@hp-bl460c-02 [test]# ls i:i386|m:i686 root@hp-bl460c-02 [test]# tftp 10.16.65.70 -m binary -c get status i:i386|m:i686 root@hp-bl460c-02 [test]# echo $? 0 i:i386|m:i686 root@hp-bl460c-02 [test]# ls -la drwxr-xr-x. 2 root root 4096 Oct 18 09:04 . dr-xr-x---. 15 root root 4096 Oct 18 09:02 .. -rw-r--r--. 1 root root 12 Oct 18 09:04 status # this part works i:i386|m:i686 root@hp-bl460c-02 [test]# tftp 10.16.65.70 -m binary -c get server.log Error code 1: File not found i:i386|m:i686 root@hp-bl460c-02 [test]# echo $? 0 i:i386|m:i686 root@hp-bl460c-02 [test]# ls -la total 12 drwxr-xr-x. 2 root root 4096 Oct 18 09:04 . dr-xr-x---. 15 root root 4096 Oct 18 09:02 .. -rw-r--r--. 1 root root 0 Oct 18 09:04 server.log -rw-r--r--. 1 root root 12 Oct 18 09:04 status # this doesn't, and it also create file we want to download Version-Release number of selected component (if applicable): tftp-0.49-7.el6 How reproducible: Always Steps to Reproduce: 1. See 4 cases above Actual results: Returns 0 when fails Expected results: Return some non-zero value Additional info: I think it shouldn't also create file with zero size when it can't download it. But I don't really know if there isn't some kind of routine that could break the downloading process or crash when the file would be created after some received bytes.