Comment 6 for bug 1291692

Revision history for this message
Denis Ipatov (dipatov) wrote :

For Fuel 4.1

Install MirantisOpenStack 4.1, and the patch https://drive.google.com/file/d/0BxTNdnj6Yn5fYTBGVGRBSnJpVXM/edit?usp=sharing ( fuel_initramfs_debug), plus modifications in the pmanager.py.

First, the hdparm does not work with anything because some partitions are already mounted and swap is on when it gets invoked.
Second, our hack is to mount/umount the partitions before this gets invoked.

In the file pmanager.py:

look for self.umount_target() calls, self.mount_target() calls, and the two functions:

def umount_target(self):
        self.log_lvm("umount everything", False)

        for disk in self.iterdisks():
            self.late("umount /target/dev /target/sys /target/proc /target/boot /target")
            self.late("umount {0}{1}3".format(self._disk_dev(disk),
                                              self._pseparator(disk["id"])))
            self.late("swapoff {0}{1}4".format(self._disk_dev(disk),
                                               self._pseparator(disk["id"])))

    def mount_target(self):
        for disk in self.iterdisks():
            self.late("mount {0}{1}3 /target".format(self._disk_dev(disk),
                                                     self._pseparator(disk["id"])))
            self.late("mount {0}{1}2 /target/boot".format(self._disk_dev(disk),
                                                          self._pseparator(disk["id"])))
            self.late("mount -t proc none /target/proc")
            self.late("mount -o bind /dev /target/dev")
            self.late("mount -o bind /sys /target/sys")
            self.late("swapon {0}{1}4".format(self._disk_dev(disk),
                                              self._pseparator(disk["id"])))

But we do not think this is a viable solution.

A clean patch would be great!