utah: urlchecker does not check the validity of the preseed location

Bug #1025220 reported by Para Siva
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
UTAH
Fix Released
Low
Javier Collado

Bug Description

At the moment the url validity checker does not check if the location specified for preseed file is a valid location and that the file exists in where it is said it is.
Since the checker is already doing this check for image files and the run lists, it will be better that it does the same for preseed files.

Related branches

Para Siva (psivaa)
tags: added: qa-manual-testing quantal
Changed in utah:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Javier Collado (javier.collado)
Revision history for this message
Max Brustkern (nuclearbob) wrote :

If we're doing this for preseed files, we might as well do kernel files, initrd files, and vm xml files. There's a block in utah/provisioning/provisioning.py like this:

        for item in ['preseed', 'xml', 'kernel', 'initrd', 'image']:
            if locals()[item] is None:
                self.__dict__[item] = None
            else:
                if '~' in locals()[item]:
                    path = os.path.expanduser(locals()[item])
                    self.logger.debug('Rewriting ~-based path: ' + locals()[item] + ' to: ' + path)
                else:
                    path = locals()[item]
                self.percent = 0
                self.logger.info('Preparing ' + item + ': ' + path)
                self.__dict__[item] = urllib.urlretrieve(path, reporthook=self.dldisplay)[0]
                self.logger.debug(path + ' is locally available as ' + self.__dict__[item])

I think maybe that block, in the base Machine class, would be a good place to insert checking for all of those, since one change there will cover all of those file types. We'd probably want to raise an exception that gets caught by the script provisioning the machine.

Revision history for this message
Javier Collado (javier.collado) wrote :

Nice advice. I'll look into checking the URLs in that loop. Thanks.

Changed in utah:
status: Confirmed → In Progress
Changed in utah:
status: In Progress → Fix Committed
Changed in utah:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.