diff --git a/octane/handlers/upgrade/compute.py b/octane/handlers/upgrade/compute.py index d71b3803..537fca3a 100644 --- a/octane/handlers/upgrade/compute.py +++ b/octane/handlers/upgrade/compute.py @@ -23,7 +23,7 @@ from octane.util import ssh class ComputeUpgrade(upgrade.UpgradeHandler): def prepare(self): - self.create_extra_partition() + self.create_configdrive_partition() self.preserve_partition() disk.update_node_partition_info(self.node.id) @@ -67,7 +67,7 @@ class ComputeUpgrade(upgrade.UpgradeHandler): 'xargs -I% nova stop %'] out, err = ssh.call(cmd, stdout=ssh.PIPE, node=self.node) - def create_extra_partition(self): + def create_configdrive_partition(self): disks = disk.get_node_disks(self.node) if not disks: raise Exception("No disks info was found " diff --git a/octane/helpers/disk.py b/octane/helpers/disk.py index 93ea508c..387ec1cc 100644 --- a/octane/helpers/disk.py +++ b/octane/helpers/disk.py @@ -11,14 +11,12 @@ # under the License. import os.path -from fuelclient.objects import node as node_obj - from octane.util import docker from octane.util import ssh def get_node_disks(node): - return node_obj.get_attribute(node, 'disks') + return node.get_attribute('disks') def parse_last_partition_end(out): @@ -37,7 +35,7 @@ def create_partition(disk_name, size, node): start = parse_last_partition_end(out) + 1 end = start + size ssh.call(['parted', '/dev/%s' % disk_name, 'unit', 'MB', 'mkpart', - 'custom', 'ext4', start, end], + 'custom', 'ext4', str(start), str(end)], node=node)