Browse Source

More verbose logs for cluster ops

Most of the times issues with cluster update/upgrade/resize can be
identified just by looking at the parameters sent to Heat. This patch
changes the existing log messages for cluster update and resize to info
from debug. Adds a log message for cluster upgrade.

story: #2007636
task: #39689
(cherry-picked from f7a50223e7)
Change-Id: Ibac5e105885b6e7042e88dea31cfeafe42a401ab
tags/9.4.0
Theodoros Tsioutsias 5 months ago
committed by Spyros Trigazis
parent
commit
8e476dadff
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      magnum/drivers/heat/driver.py

+ 6
- 2
magnum/drivers/heat/driver.py View File

@@ -249,7 +249,6 @@ class HeatDriver(driver.Driver):
stack_params = stack.parameters
definition.add_nodegroup_params(cluster)
heat_params = definition.get_stack_diff(context, stack_params, cluster)
LOG.debug('Updating stack with these params: %s', heat_params)
scale_params = definition.get_scale_params(context,
cluster,
scale_manager)
@@ -261,6 +260,8 @@ class HeatDriver(driver.Driver):
'disable_rollback': not rollback
}

LOG.info('Updating cluster %s stack %s with these params: %s',
cluster.uuid, cluster.stack_id, heat_params)
osc.heat().stacks.update(cluster.stack_id, **fields)

def _resize_stack(self, context, cluster, resize_manager,
@@ -276,7 +277,6 @@ class HeatDriver(driver.Driver):
stack_params = stack.parameters
definition.add_nodegroup_params(cluster, nodegroups=[nodegroup])
heat_params = definition.get_stack_diff(context, stack_params, cluster)
LOG.debug('Updating stack with these params: %s', heat_params)

scale_params = definition.get_scale_params(context,
cluster,
@@ -289,6 +289,8 @@ class HeatDriver(driver.Driver):
'disable_rollback': not rollback
}

LOG.info('Resizing cluster %s stack %s with these params: %s',
cluster.uuid, nodegroup.stack_id, heat_params)
osc = clients.OpenStackClients(context)
osc.heat().stacks.update(nodegroup.stack_id, **fields)

@@ -434,6 +436,8 @@ class FedoraKubernetesDriver(KubernetesDriver):
'parameters': heat_params,
'disable_rollback': not rollback
}
LOG.info('Upgrading cluster %s stack %s with these params: %s',
cluster.uuid, nodegroup.stack_id, heat_params)
osc.heat().stacks.update(stack_id, **fields)

def get_nodegroup_extra_params(self, cluster, osc):


Loading…
Cancel
Save