ceph-disk: more robust parted output parser
In some cases, depending on the implementation or the operating system,
parted --machine -- /dev/sdh print
may contain empty lines. The current parsing code is fragile and highly
depends on output details. Replace it with code that basically does the
same sanity checks (output not empty, existence of units, existence of
the dev entry) but handles the entire output instead of checking line by
line.
http://tracker.ceph.com/issues/10983 Fixes: #10983
Signed-off-by: Loic Dachary <ldachary@redhat.com>
(cherry picked from commit
f5acf6bb6a342b05897605703d7d9cb7c09714fd)