summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Hussey <sh8121@att.com>2018-10-05 14:02:06 -0500
committerScott Hussey <sh8121@att.com>2018-10-05 14:02:06 -0500
commite45306b598becc1828c454d324a1a4bd995481af (patch)
treeeeae413ff93945ca3e3ddf81be691c55e409f9b5
parentc38a38fa4ca54f34f469e9866dae0838ac205369 (diff)
(fix) Register error for missing disk
- When a block device isn't found on a node the failure isn't registered as such Change-Id: Iaeab6d2e797e1d0c6089e26da9abcd1c60f2c5c5
Notes
Notes (review): Code-Review+2: Felipe Monteiro <felipe.monteiro@att.com> Code-Review+2: Bryan Strassner <bryan.strassner@gmail.com> Workflow+1: Bryan Strassner <bryan.strassner@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 05 Oct 2018 21:12:39 +0000 Reviewed-on: https://review.openstack.org/608340 Project: openstack/airship-drydock Branch: refs/heads/master
-rw-r--r--python/drydock_provisioner/drivers/node/maasdriver/actions/node.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/python/drydock_provisioner/drivers/node/maasdriver/actions/node.py b/python/drydock_provisioner/drivers/node/maasdriver/actions/node.py
index 732aec9..11ccd6b 100644
--- a/python/drydock_provisioner/drivers/node/maasdriver/actions/node.py
+++ b/python/drydock_provisioner/drivers/node/maasdriver/actions/node.py
@@ -1814,11 +1814,7 @@ class ApplyNodeStorage(BaseMaasAction):
1814 # for the partition table and once the table is written, there is not 1814 # for the partition table and once the table is written, there is not
1815 # enough space for the 'full size' partition. So reserve the below 1815 # enough space for the 'full size' partition. So reserve the below
1816 # when calculating 'rest of device' sizing w/ the '>' operator 1816 # when calculating 'rest of device' sizing w/ the '>' operator
1817 # 1817 PART_TABLE_RESERVATION = 1024 * 1024 * 4 # 4MB reservation for partition size
1818 # This size is based on documentation that for backwards compatability
1819 # the first partition should start on LBA 63 and we'll assume 4096 byte
1820 # blocks, thus 63 (add one for safety) x 4096 = 258048
1821 PART_TABLE_RESERVATION = 258048
1822 1818
1823 def start(self): 1819 def start(self):
1824 try: 1820 try:
@@ -1945,9 +1941,12 @@ class ApplyNodeStorage(BaseMaasAction):
1945 n.get_logicalname(d.name) 1941 n.get_logicalname(d.name)
1946 }) 1942 })
1947 if maas_dev is None: 1943 if maas_dev is None:
1948 self.logger.warning( 1944 msg = "Dev %s (%s) not found on node %s" % (
1949 "Dev %s (%s) not found on node %s" % 1945 d.name, n.get_logicalname(d.name), n.name)
1950 (d.name, n.get_logicalname(d.name), n.name)) 1946 self.logger.warning(msg)
1947 self.task.add_status_msg(
1948 msg=msg, error=True, ctx=n.name, ctx_type='node')
1949 self.task.failure(focus=n.get_id())
1951 continue 1950 continue
1952 1951
1953 if d.volume_group is not None: 1952 if d.volume_group is not None: