From: Loic Dachary <loic@dachary.org>
To: Jeremy Hanmer <jeremy.hanmer@dreamhost.com>,
Ceph Development <ceph-devel@vger.kernel.org>
Subject: Re: pre-Infernalis ceph-disk bug
Date: Wed, 14 Oct 2015 00:31:34 +0200 [thread overview]
Message-ID: <561D8646.9050404@dachary.org> (raw)
In-Reply-To: <CAKRUTFCOucYJL-fqNoSA69V6ACjNNEr4hTskmcv=H1v+XSsoFA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2350 bytes --]
Hi,
On 14/10/2015 00:02, Jeremy Hanmer wrote:
> I think I've found a bug in ceph-disk when running on Ubuntu 14.04
> (and I believe 12.04 as well, but haven't confirmed) and using
> --dmcrypt.
>
> The problem is that when update_partition() is called, partprobe is
> used to re-read the partition table (as opposed to partx on all other
> distros) and it appears that it isn't smart/thorough enough to update
> all of the device's metadata. Specifically, ID_PART_ENTRY_TYPE isn't
> updated:
>
> root@ceph-osd03:~# udevadm info --query=env --name=/dev/vdd1 | grep
> ID_PART_ENTRY_TYPE
> ID_PART_ENTRY_TYPE=89c57f98-2fe5-4dc0-89c1-5ec00ceff2be
>
> running `partx -u` rather than `partprobe` does the appropriate thing:
>
> root@ceph-osd03:~# partx -u /dev/vdd1
> root@ceph-osd03:~# udevadm info --query=env --name=/dev/vdd1 | grep
> ID_PART_ENTRY_TYPE
> ID_PART_ENTRY_TYPE=4fbd7e29-9d25-41b8-afd0-5ec00ceff05d
>
>
> I have an experimental patch here that Works For Me, but Sage wanted
> me to ping the list for input:
>
> https://github.com/fzylogic/ceph/commit/8c83f75392d68fbec7def8aa61f20b2c9c237571
>
>
> I also want to test the new Infernalis code for this same bug (after a
> cursory check, I strongly suspect it's there as well), but it'll take
> a little bit to get another test cluster up to confirm.
There has been many changes in infernalis, most of them to make it more robust. It would be great if you could try to reproduce the problem you had with infernalis.
Your patch looks good and you could also remove https://github.com/fzylogic/ceph/blob/8c83f75392d68fbec7def8aa61f20b2c9c237571/src/ceph-disk#L1505 which will happen immediately after the function returns.
An alternate fix would be to udevadm settle before https://github.com/fzylogic/ceph/blob/8c83f75392d68fbec7def8aa61f20b2c9c237571/src/ceph-disk#L985 and after it to avoid races. I think the reason why partprobe does not appear to work is because it triggers udev events that race with udev events triggered by sgdisk while creating the partition.
Cheers
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Loïc Dachary, Artisan Logiciel Libre
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2015-10-13 22:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 22:02 pre-Infernalis ceph-disk bug Jeremy Hanmer
2015-10-13 22:31 ` Loic Dachary [this message]
2015-10-13 22:51 ` Jeremy Hanmer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=561D8646.9050404@dachary.org \
--to=loic@dachary.org \
--cc=ceph-devel@vger.kernel.org \
--cc=jeremy.hanmer@dreamhost.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.