[Ubuntu] After deployment sends data with wrong disks format

Bug #1263648 reported by Evgeniy L
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Vladimir Kozhukalov

Bug Description

From https://bugs.launchpad.net/fuel/+bug/1262973

The problem is after deployment changed disks naming

Before deployment it looked good
[
    {
        "disk": "disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0",
        "model": "ST3160815AS",
        "size": 160041885696,
        "name": "sda"
    },
    {
        "disk": "disk/by-path/pci-0000:00:1f.2-scsi-2:0:0:0",
        "model": "ST2000DM001-1CH1",
        "size": 2000398934016,
        "name": "sdc"
    },
    {
        "disk": "disk/by-path/pci-0000:00:1f.2-scsi-1:0:0:0",
        "model": "ST2000DM001-1CH1",
        "size": 2000398934016,
        "name": "sdb"
    }
]

But after deployment format was changed

[
    {
        "model": "ST2000DM001-1CH1",
        "disk": "sdc",
        "size": 2000398934016,
        "name": "sdc"
    },
    {
        "model": "ST2000DM001-1CH1",
        "disk": "sdb",
        "size": 2000398934016,
        "name": "sdb"
    },
    {
        "model": "ST3160815AS",
        "disk": "disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0",
        "size": 160041885696,
        "name": "sda"
    }
]

We use `disk` as uniq disk identificator in nailgun.
Name like sdb\sdc in `disk` field use in case if disk wasn't found in /dev/disk/by-path
See https://github.com/stackforge/fuel-web/blob/master/bin/agent#L249-L253

Evgeniy L (rustyrobot)
description: updated
Revision history for this message
Andrey Korolyov (xdeller) wrote :

xdeller@ubuntuprecise:/sys$ find . -name vda
./devices/pci0000:00/0000:00:05.0/virtio2/block/vda
./block/vda
./class/block/vda

Useful subfiles are:
size
vendor(available only under address-based path: /sys/devices/pci0000:00/0000:00:03.0/virtio0/vendor)

As I mentioned we can use sysfs-based discovery. Is there any additional hints which may be useful for implementation?

Changed in fuel:
assignee: Andrey Korolyov (xdeller) → Evgeniy L (rustyrobot)
Evgeniy L (rustyrobot)
Changed in fuel:
assignee: Evgeniy L (rustyrobot) → nobody
Mike Scherbakov (mihgen)
Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
Changed in fuel:
status: Confirmed → Triaged
tags: added: customer-found
Revision history for this message
Mike Scherbakov (mihgen) wrote :

What is the user impact here?

Revision history for this message
Evgeniy L (rustyrobot) wrote :

User impact is an user would see wrong disks mapping on UI, I guess.

Evgeniy L (rustyrobot)
Changed in fuel:
importance: High → Medium
Revision history for this message
Anastasia Palkina (apalkina) wrote :

Reproduced on ISO #108
"build_id": "2014-02-10_01-17-30", "ostf_sha": "d15d6b5b952e455e3afff383413ffa6d89ee7981", "build_number": "108", "nailgun_sha": "da98419023973c10b73aec73fe0d476936f3f662", "fuelmain_sha": "981c07d7a8791a137db636fc7eafc7d22e4f06ea", "astute_sha": "d002c3bf626cff96a1d4aec9eb92fc4d5f4542c4", "release": "4.1", "fuellib_sha": "81ba00fc10375f992f92cb755a9bfa87cfa79755"

1. Create new environment (Ubuntu, HA mode)
2. Choose GRE segmentation
3. Add 3 controllers and 2 compute nodes
4. Nodes had 3 disks before deployment
5. Start deployment. It was successful
6. But nodes has 1 disk after deployment

    "mac": "08:00:27:C0:7F:9D",
    "platform_name": null,
    "meta": {
        "disks": [
            {
                "model": "VBOX HARDDISK",
                "size": 68718428160,
                "name": "sdc",
                "disk": "disk/by-path/pci-0000:00:0d.0-scsi-0:0:0:0"
            }
        ],

root@node-20:~# ls /dev/disk/by-path/
pci-0000:00:0d.0-scsi-0:0:0:0 pci-0000:00:0d.0-scsi-0:0:0:0-part2 pci-0000:00:0d.0-scsi-0:0:0:0-part4
pci-0000:00:0d.0-scsi-0:0:0:0-part1 pci-0000:00:0d.0-scsi-0:0:0:0-part3 pci-0000:00:0d.0-scsi-0:0:0:0-part5

Revision history for this message
Vladimir Kozhukalov (kozhukalov) wrote :

This bug appears because Ubuntu kernel maps all hard drives on Vbox in one address (sysfs PATH_ID). When udev daemon creates by-path links it rewrites former links with new ones. So we have just one by-path link for sdc hard drive. We discussed this situation for a while and the only solution is to make our own proprietary links based on some combination of those sysfs variables which are available.

Changed in fuel:
milestone: 4.1 → 5.0
Revision history for this message
Vladimir Kozhukalov (kozhukalov) wrote :
tags: added: release-notes
Revision history for this message
Vladimir Kozhukalov (kozhukalov) wrote :

At the moment we have reliable enough mechanism how to identify disks. We use a combination of by-id and by-path links. by-id links we store in disk extra field. So, despite the fact that Vbox maps all disks in one by-path link, we are still able to identify links if necessary.

Revision history for this message
Vladimir Kozhukalov (kozhukalov) wrote :
Changed in fuel:
status: Triaged → Fix Committed
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Vladimir Kozhukalov (kozhukalov)
Revision history for this message
Meg McRoberts (dreidellhasa) wrote :

Added to "Fixed Issues" in 5.0 Release Notes

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.