[fuel-agent] artifact utils target must check if given filename is a block device and exists

Bug #1492989 reported by Alexander Gordeev
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Andrey Tykhonov

Bug Description

This following piece of code:
https://github.com/stackforge/fuel-agent/blob/master/fuel_agent/utils/artifact.py#L51-L63

will silently create new file if it doesn't exist and won't throw any error for that case.

it should check at least: that existing file is a block device. Otherwise, an exception must be raised.

Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Andrey Tykhonov (atykhonov)
Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-agent (master)

Reviewed: https://review.openstack.org/228503
Committed: https://git.openstack.org/cgit/stackforge/fuel-agent/commit/?id=b2050bd4ee6b8c8b497a8ef89d4b5262a06f09ec
Submitter: Jenkins
Branch: master

commit b2050bd4ee6b8c8b497a8ef89d4b5262a06f09ec
Author: Andrey Tykhonov <email address hidden>
Date: Mon Sep 28 18:39:44 2015 +0300

    Check whether given filename is a special device

    Accept only a special device file, otherwise throw an exception.

    Change-Id: I23598b52d273091a877896968d17377373322cae
    Closes-bug: #1492989

Changed in fuel:
status: In Progress → Fix Committed
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
status: Fix Committed → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-agent (master)

Fix proposed to branch: master
Review: https://review.openstack.org/233580

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-agent (master)

Reviewed: https://review.openstack.org/233580
Committed: https://git.openstack.org/cgit/stackforge/fuel-agent/commit/?id=29818cf4c1e5cf086f433b222a5055fed686d104
Submitter: Jenkins
Branch: master

commit 29818cf4c1e5cf086f433b222a5055fed686d104
Author: Andrey Tykhonov <email address hidden>
Date: Mon Oct 12 13:59:49 2015 +0300

    Check whether given filename is a special device

    Accept only a special device file, otherwise throw an exception.

    Change-Id: Ib91aaba64be2c338845d66b819f0125a586131a4
    Closes-bug: #1492989

Changed in fuel:
status: In Progress → Fix Committed
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
tags: added: dev-to-verify
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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