Bug 1086554
| Summary: | Error info is not clear when network install vm with url "ftp://" | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | zhengqin <zsong> | |
| Component: | virt-manager | Assignee: | Giuseppe Scrivano <gscrivan> | |
| Status: | CLOSED UPSTREAM | QA Contact: | Virtualization Bugs <virt-bugs> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 7.0 | CC: | codong, dyuan, gscrivan, lcui, mzhan, tzheng | |
| Target Milestone: | rc | |||
| Target Release: | --- | |||
| Hardware: | x86_64 | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1086561 (view as bug list) | Environment: | ||
| Last Closed: | 2014-04-14 13:21:50 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1086561 | |||
|
Description
zhengqin
2014-04-11 06:23:41 UTC
both the cryptic error message and the exception come from the python ftplib.FTP class, where the exception message is not clear. Reproducer: >>> ftp = FTP('foo') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/ftplib.py", line 117, in __init__ self.connect(host) File "/usr/lib64/python2.7/ftplib.py", line 132, in connect self.sock = socket.create_connection((self.host, self.port), self.timeout) File "/usr/lib64/python2.7/socket.py", line 553, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): socket.gaierror: [Errno -2] Name or service not known >>> ftp = FTP('') >>> ftp.login() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/ftplib.py", line 387, in login resp = self.sendcmd('USER ' + user) File "/usr/lib64/python2.7/ftplib.py", line 243, in sendcmd self.putcmd(cmd) File "/usr/lib64/python2.7/ftplib.py", line 178, in putcmd self.putline(line) File "/usr/lib64/python2.7/ftplib.py", line 173, in putline self.sock.sendall(line) AttributeError: 'NoneType' object has no attribute 'sendall' patch proposed upstream: https://www.redhat.com/archives/virt-tools-list/2014-April/msg00079.html fixed by:
commit 1d312a520e92e89da1b4d958b9de0270eecc6b4b
Author: Giuseppe Scrivano <gscrivan>
Date: Mon Apr 14 14:49:21 2014 +0200
virtinst: early detect ftp connection errors
It fixes two problems:
i) "ftp://" was accepted as valid URL but then it causes this
exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.7/ftplib.py", line 387, in login
resp = self.sendcmd('USER ' + user)
File "/usr/lib64/python2.7/ftplib.py", line 243, in sendcmd
self.putcmd(cmd)
File "/usr/lib64/python2.7/ftplib.py", line 178, in putcmd
self.putline(line)
File "/usr/lib64/python2.7/ftplib.py", line 173, in putline
self.sock.sendall(line)
AttributeError: 'NoneType' object has no attribute 'sendall'
ii) only a cryptic error message "Unable to complete install: '[Errno
-2] Name or service not known'" was showed to users when the DNS
lookup failed. The exception is now intercepted and decorated with
more information.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1086554
Signed-off-by: Giuseppe Scrivano <gscrivan>
|