When template cannot render correctly, node event log shows incorrect error
Bug #1420564 reported by
Andres Rodriguez
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
High
|
Unassigned |
Bug Description
Node event log shows a bad error when cannot render a power template:
Failed to query node's BMC — Node could not be queried node-dd1e7c1c-
Changed in maas: | |
milestone: | none → next |
status: | New → Triaged |
importance: | Undecided → Critical |
Changed in maas: | |
importance: | Critical → High |
Changed in maas: | |
importance: | High → Critical |
Changed in maas: | |
importance: | Critical → High |
status: | Triaged → Invalid |
Changed in maas: | |
milestone: | next → none |
To post a comment you must log in.
Why is this a "bad error"? (it might be raw but I argue that for this kind of error, you want the error to be as precise as possible and re-writing it somehow might hide details useful to fix the problem).
Now, about the error itself: %s@%s/? no_verify= 1" % (power_user, power_address)" control_ virsh(
{{repr( power_addr) .decode( "ascii" ) | safe}},
Here is the snippet that errors:
"""
power_addr = "esx://
try:
power_
""""
As you can see the last line is a *tempita expression*. The process goes like this: render tempita templace -> execute bash template (which, in turn, runs the Python code inside it).
So, the part that fails is the rendering of the tempita template. At this stage, power_addr isn't defined. You need to put the definition of 'power_addr' in the tempita template itself (for instance by using http:// pythonpaste. org/tempita/ #python- blocks).