Woodpecker should respect 'fio' action's 'disk-devices' parameter regardless of configuration of 'test-devices'

Bug #1958140 reported by Przemyslaw Hausman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Woodpecker Charm
Triaged
Medium
Unassigned

Bug Description

Woodpecker should respect 'fio' action's 'disk-devices' parameter regardless of configuration of 'test-devices'.

Currently, if 'test-devices' is configured, woodpecker ignores 'fio' action's 'disk-devices' parameter. See the current implementation in on_fio_action():

```
if not self.ceph_client.pools_available and test_devices:
    event.params["disk-devices"] = (
        " ".join([str(d.location) for d in test_devices])
    )
```

It makes it impossible to specify exactly which disk-devices should be used for testing.

In my case, I'd like to run fio tests on ephemeral device, instead of on cinder volumes attached to the woodpecker VM. For that. I have created a flavor with an ephemeral disk and I'm using this flavor when deploying woodpecker units:

```
openstack flavor create \
  --vcpus 4 \
  --ram 8192 \
  --disk 20 \
  --ephemeral 10 \
  m1.large.ephemeral

juju deploy cs:~openstack-charmers-next/woodpecker \
  --num-units ${NUMBER_OF_UNITS} \
  --storage test-devices=cinder,3,10G \
  --constraints "cores=4 allocate-public-ip=true instance-type=m1.large.ephemeral" \
  --series bionic \
  woodpecker
```

Once I have woodpecker units deployed, I want to run fio action only on top of ephemeral devices:

```
juju run --application woodpecker sudo umount /mnt

juju run-action woodpecker/0 \
  fio operation=randwrite runtime=900 block-size=4k disk-devices=/dev/vdb
``

Currently, the above action is not run on a specified disk (disk-devices=/dev/vdb), as I would expect. Instead it is being run on vdc, vdd, and vde -- cinder volumes attached to the VM.

As a workaround, I have to first detach the juju storage from the woodpecker VMs:
```
juju detach-storage test-devices/{0..NUMBER_OF_DISKS}
```

Revision history for this message
Przemyslaw Hausman (phausman) wrote :

Action documentation is not in line with the code that implements it:

Action documentation:
```
fio:
  description: "Run the fio performance test"
  params:
    disk-devices:
      type: string
      description: "If unset, use the charm default rbd device in the ceph pool or the block devices provided using test-devices storage. If set run fio, against the set disk. Space delimited list of devices."
```

Code:
```
        # If storage binding provided then override disk-devices
        # unless the application is related to ceph.
        if not self.ceph_client.pools_available and test_devices:
            event.params["disk-devices"] = (
                " ".join([str(d.location) for d in test_devices])
            )
```

James Page (james-page)
Changed in charm-woodpecker:
status: New → Triaged
importance: Undecided → Medium
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.