Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ceph-volume: fix raw list with logical partition #43050

Merged
merged 2 commits into from
Sep 8, 2021

Conversation

dsavineau
Copy link
Contributor

This is a regression introduced by 9212420, when the host is using a
logical partition then lsblk reports that partition as a child from the
physical device.
That logical partition is prefixed by the └─ character.

This leads the raw list subcommand to show the lsblk error on the stderr.

$ ceph-volume raw list
{}
 stderr: lsblk: `-/dev/sda1: not a block device

The lsblk command output looks like:

$ lsblk --paths --output=NAME --noheadings
/dev/sda
└─/dev/sda1
/dev/sdb
/dev/sdc
/dev/sdd

Using the --list option with lsblk solves the issue.

$ lsblk --list --paths --output=NAME --noheadings
/dev/sda
/dev/sda1
/dev/sdb
/dev/sdc
/dev/sdd

Fixes: https://tracker.ceph.com/issues/52504

Signed-off-by: Dimitri Savineau dsavinea@redhat.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@dsavineau dsavineau requested a review from a team as a code owner September 3, 2021 18:33
@dsavineau
Copy link
Contributor Author

FYI @BlaineEXE

@dsavineau
Copy link
Contributor Author

jenkins test ceph-volume tox

@guits
Copy link
Contributor

guits commented Sep 7, 2021

we must be missing some tests

dsavineau and others added 2 commits September 7, 2021 15:37
This is a regression introduced by 9212420, when the host is using a
logical partition then lsblk reports that partition as a child from the
physical device.
That logical partition is prefixed by the `└─` character.

This leads the `raw list` subcommand to show the lsblk error on the stderr.

```
$ ceph-volume raw list
{}
 stderr: lsblk: `-/dev/sda1: not a block device
```

The lsblk command output looks like:

```
$ lsblk --paths --output=NAME --noheadings
/dev/sda
└─/dev/sda1
/dev/sdb
/dev/sdc
/dev/sdd
```

Using the `--list` option with lsblk solves the issue.

```
$ lsblk --list --paths --output=NAME --noheadings
/dev/sda
/dev/sda1
/dev/sdb
/dev/sdc
/dev/sdd
```

Fixes: https://tracker.ceph.com/issues/52504

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
Let's test we use the expected args when we build the `lsblk` command
to list the devices present on the node.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
@guits
Copy link
Contributor

guits commented Sep 7, 2021

jenkins test ceph-volume tox

@guits
Copy link
Contributor

guits commented Sep 7, 2021

jenkins test ceph-volume all

@guits
Copy link
Contributor

guits commented Sep 8, 2021

jenkins test ceph-volume lvm centos8-bluestore-create

@guits
Copy link
Contributor

guits commented Sep 8, 2021

jenkins test ceph-volume lvm centos8-filestore-dmcrypt

@guits
Copy link
Contributor

guits commented Sep 8, 2021

jenkins test ceph-volume lvm centos8-bluestore-dmcrypt

@guits
Copy link
Contributor

guits commented Sep 8, 2021

jenkins test ceph-volume lvm centos8-filestore-create

@guits
Copy link
Contributor

guits commented Sep 8, 2021

jenkins test ceph-volume lvm centos8-bluestore-dmcrypt

@BlaineEXE
Copy link
Contributor

Thanks @dsavineau. Sorry for the regression. 🤦‍♀️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants