Commit Graph

39 Commits

Author SHA1 Message Date
Cole Robinson 393aed191e urlfetcher: Detect centos URLs as centos, not rhel variants 2015-04-04 15:41:13 -04:00
Cole Robinson bd9ab2d5b5 osdict: Add toplevel OSDB as API entry point
Makes code more readable, and lazy loading simpler.
2015-04-04 12:06:41 -04:00
Cole Robinson 82e9684fa6 urlfetcher: Make debian treearch checking more generic
Use regex parsing rather than a whitelist
2015-03-27 13:06:26 -04:00
Mauricio Faria de Oliveira 0dc334fa58 Add ppc64el support for 'virt-install --location' (Debian/Ubuntu)
The installation of Debian/Ubuntu for ppc64el (a.k.a. ppc64le on Fedora/RHEL)
fails with 'virt-install --location', as the arch dir and kernel filename
are not correct for this arch/distros.

This patch fixes it by adding checks for 'treeArch' and 'hvm_kernel_paths'.

Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
2015-03-27 12:30:04 -04:00
Cole Robinson 6871ee0c91 urlfetcher: Hint at the user if URL appears unaccessible 2014-12-10 13:57:10 -05:00
Gabriel de Perthuis 24faf86750 URL installs: remove hasFile("") check
Specialised proxies like apt-cacher-ng disallow directory listing.
OSDistro subclasses do have checks for known files and they are
sufficient.
2014-12-10 13:46:11 -05:00
Cole Robinson be3787f2d1 urlfetcher: Detect RHEL ARM distro from treeinfo 2014-11-20 19:15:11 -05:00
Chen Hanxiao a6e72f30f3 virtinst: fix some comment typos
s/occurence/occurrence

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-10-29 16:00:28 +08:00
Cole Robinson 86417d42ca osxml: Ensure kernel/initrd/dtb are absolute paths 2014-09-23 14:32:01 -04:00
Cole Robinson eb7612356e virtinst: Switch to relative imports, fix cyclic import warnings 2014-09-12 16:28:38 -04:00
Cole Robinson d8d6af55e5 distroinstaller: Cache fetcher and distro store lookups
Since we already determine the distro store ahead of time via
check_location and detect_distro, cache the result in the installer
class to save us some network traffic.
2014-09-07 14:40:09 -04:00
Cole Robinson 050d0fb16e urlfetcher: Make fetcher cleanup idempotent 2014-09-07 14:22:56 -04:00
Cole Robinson faa0ef5e55 urlfetcher: Point to man page if location URL is invalid 2014-09-07 14:01:40 -04:00
Cole Robinson 46e135c7a1 urlfetcher: Remove outdated comment 2014-09-07 13:59:54 -04:00
Cole Robinson 2e7d477156 urlfetcher: Bunch of distro detection fixes
And update test_urls to ensure it's passing
2014-09-06 16:42:09 -04:00
Ron ea1d973957 Don't create disk images world readable and executable
Python's os.open() defaults to mode 0777 if not explicitly specified.
Disk image files don't need to be executable, and having them world
readable isn't an ideal situation either.  Owner writable and group
readable is probably more than sufficient when initially creating
them.

Signed-off-by: Ron Lee <ron@debian.org>
2014-07-02 07:35:15 +02:00
Chen Hanxiao 7ce434fed7 urlfetcher: fix a comment typo
s/Explictly/Explicitly

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-06-30 10:58:53 +08:00
Giuseppe Scrivano 1d312a520e 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@redhat.com>
2014-04-14 15:20:18 +02:00
Giuseppe Scrivano db6d001b0e tests: fix to not fail with libosinfo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-24 12:40:42 +01:00
Cole Robinson 797afb3b27 virt-install: Fix --location iso again, and test it (bz 1071513) 2014-03-06 12:46:46 -05:00
Cole Robinson f431efc9b7 tests: Don't overwrite mkstemp, just check environment
Since this can interfere with the initrdinject test
2014-02-14 11:02:35 -05:00
Cole Robinson 073b3a69e3 urlfetcher: Use inst.repo kernel option for new RH distros (bz 1026841) 2014-01-18 13:04:47 -05:00
Cole Robinson a70077172e urlfetcher: Don't mandate boot.iso in treeinfo for Generic distro
Hit this if doing --location /path/to/mounted/RHS.iso

https://bugzilla.redhat.com/show_bug.cgi?id=1039456
2014-01-11 16:24:13 -05:00
Cole Robinson 1ffcc0cced urlfetcher: Fix breakage after kernel err report fix 2013-11-10 11:35:22 -05:00
Cole Robinson 8b42bca801 urlfetcher: Fix error reporting if fetching kernel fails (bz 1017419) 2013-11-09 18:56:09 -05:00
Cole Robinson eb33bd34e7 Misc improvements to some debug messages 2013-11-09 18:17:29 -05:00
Giuseppe Scrivano 2a040ccd17 mass update: remove double spaces from comments
Updated by this script:

find -name '*.py' -exec sed -i "s|^\(#.*[^.?\!]\)  \(.*[^#]\)$|\1 \2|g" \{\} \;

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:31 +01:00
Cole Robinson 1a88cef3af altlinux doesn't have installable URLs, clarify 2013-10-15 11:21:53 -04:00
Cole Robinson d49e11dabc urlfetcher: Fix distro lookup short circuiting if os_variant specified 2013-09-26 17:45:02 -04:00
Cole Robinson 7aa24be31a urlfetcher: Detect debian, ubuntu, and opensuse variant from URL 2013-09-26 17:44:57 -04:00
Cole Robinson a78235c8bf urlfetcher: More cleanups of isValidDistro impls 2013-09-26 16:31:53 -04:00
Cole Robinson 4378e40aad urlfetcher: Drop Solaris and Netware distro classes
They are untested, likely broken, and I don't think anyone cares
anyways. Maybe opensolaris but it was tied in with a bunch of
extra junk.
2013-09-26 14:54:02 -04:00
Cole Robinson c5f5d5ad9d urlfetcher: Clean up APIs for fetching URL media 2013-09-26 14:28:13 -04:00
Cole Robinson 655f458298 test_urls: Turn each URL test into an object, not a dict
Update the URL list and fix a couple bugs
2013-09-26 12:36:21 -04:00
Cole Robinson 8ba600a8e7 virt-install: Fix --location nfs:// (bz 1011177) 2013-09-23 21:23:36 -04:00
Cole Robinson f220e6778c Guest: Drop OS listing helpers, and OS_TYPES back compat 2013-08-11 14:52:30 -04:00
Cole Robinson c426d5a16f Guest: Drop os_type, just use single os_variant
Internally the distinction hasn't been valuable for a long time,
so simplify the API here.
2013-08-11 12:39:36 -04:00
Cole Robinson 737d3e60f3 urlfetcher: Drop old SUSE RPM hacking
This is for an old old distro which has seen servicepack-esque updates
that invalidate all this hacking. It's basically impossible to test
anyways.
2013-08-11 12:39:28 -04:00
Cole Robinson 952708f509 virtinst: Rename most files to be more sensible
- Lower case everything
- Virtual... -> device...
- A few other similar bits
2013-08-09 08:54:39 -04:00