Merge lp:~nick-schutt/lava-dispatcher/nicks-highbank-support into lp:lava-dispatcher

Proposed by Nicholas Schutt
Status: Merged
Merged at revision: 595
Proposed branch: lp:~nick-schutt/lava-dispatcher/nicks-highbank-support
Merge into: lp:lava-dispatcher
Diff against target: 21 lines (+3/-1)
1 file modified
lava_dispatcher/device/highbank.py (+3/-1)
To merge this branch: bzr merge lp:~nick-schutt/lava-dispatcher/nicks-highbank-support
Reviewer Review Type Date Requested Status
Antonio Terceiro Approve
Review via email: mp+160356@code.launchpad.net

Description of the change

Add dd to clear the start of the hard disk before deploying an image.

dd if=/dev/zero of=%s bs=4M count=4

To post a comment you must log in.
Revision history for this message
Antonio Terceiro (terceiro) wrote :

Looks good to me

 review approve

review: Approve
Revision history for this message
Fathi Boudra (fboudra) wrote :

What's the issue observed? Since we deploy the image later using dd.

Revision history for this message
Nicholas Schutt (nick-schutt) wrote :

The basic idea is to corrupt the hdd so that if the deploy fails, then the
previously-written image won't boot.

On 24 April 2013 08:07, Fathi Boudra <email address hidden> wrote:

> What's the issue observed? Since we deploy the image later using dd.
> --
>
> https://code.launchpad.net/~nick-schutt/lava-dispatcher/nicks-highbank-support/+merge/160356
> You are the owner of
> lp:~nick-schutt/lava-dispatcher/nicks-highbank-support.
>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lava_dispatcher/device/highbank.py'
2--- lava_dispatcher/device/highbank.py 2013-04-22 13:32:10 +0000
3+++ lava_dispatcher/device/highbank.py 2013-04-23 12:49:26 +0000
4@@ -91,6 +91,9 @@
5 def _deploy_image(self, image_file, device):
6 with self._as_master() as runner:
7
8+ # erase the first part of the disk to make sure the new deploy works
9+ runner.run("dd if=/dev/zero of=%s bs=4M count=4" % device, timeout=1800)
10+
11 # compress the image to reduce the transfer size
12 if not image_file.endswith('.bz2') and not image_file.endswith('gz'):
13 os.system('bzip2 -9v ' + image_file)
14@@ -157,7 +160,6 @@
15 else:
16 logging.warning("unknown partition type for resize: %s" % parttype)
17
18-
19 @contextlib.contextmanager
20 def file_system(self, partition, directory):
21 logging.info('attempting to access master filesystem %r:%s' %

Subscribers

People subscribed via source and target branches