redhat-imaging / novaimagebuilder

Image building tool for OpenStack.
Apache License 2.0
0 stars 1 forks source link

Exception in CacheManager when building windows image #5

Open dkliban opened 10 years ago

dkliban commented 10 years ago

If the /var/lib/novaimagebuilder/_cache_index does not contain any Windows artifacts and the following command is run

./nova-install --name windows-demo-image --os win2k8 --install_iso http://laforge.usersys.redhat.com/isos/winserver2008x86_64.iso --install_script autounattend.xml

The following exception is thrown:

Traceback (most recent call last): File "./nova-install", line 147, in sys.exit(Application().main()) File "./nova-install", line 129, in main self.builder.run() File "/home/stack/novaimagebuilder/novaimagebuilder/Builder.py", line 80, in run self.os_delegate.prepare_install_instance() File "/home/stack/novaimagebuilder/novaimagebuilder/WindowsOS.py", line 54, in prepare_install_instance driver_locations = self.cache.retrieve_and_cache_object("driver-iso", self, None, True) File "/home/stack/novaimagebuilder/novaimagebuilder/CacheManager.py", line 226, in retrieve_and_cache_object self._http_download_file(source_url, local_object_filename) File "/home/stack/novaimagebuilder/novaimagebuilder/CacheManager.py", line 295, in _http_download_file c.setopt(c.URL, url) TypeError: unsetopt() is not supported for this option

dkliban commented 10 years ago

The exception is thrown when CacheManager tries to download the driver-iso from a None url. This occurs because the current implementation assumes that the driver-iso has already been cached.