MAAS Incorrectly compares AMT versions (as strings)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Andres Rodriguez | ||
1.10 |
Fix Released
|
High
|
Andres Rodriguez |
Bug Description
On Xenial I seem to be unable to query power status on AMT nodes.
AMT_PASSWORD=***** /usr/bin/amttool 192.168.9.3 powercycle
404 Not Found at /usr/bin/amttool line 297.
I see a version of this error in the MAAS logs.
2016-02-03 16:02:02+0000 [ClusterClient,
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
current.result = callback(
File "/usr/lib/
_inlineCal
--- <exception caught here> ---
File "/usr/lib/
result = result.
File "/usr/lib/
return g.throw(self.type, self.value, self.tb)
File "/usr/lib/
raise exc_type(
File "/usr/lib/
system_id, hostname, power_type, context)
File "/usr/lib/
result = result.
File "/usr/lib/
return g.throw(self.type, self.value, self.tb)
File "/usr/lib/
self.
File "/usr/lib/
result = inContext.theWork()
File "/usr/lib/
inContext.
File "/usr/lib/
return self.currentCon
File "/usr/lib/
return func(*args,**kw)
File "/usr/lib/
return self.amttool_
File "/usr/lib/
'info', ip_address, power_pass)
File "/usr/lib/
return self._run(command, power_pass, stdin=stdin)
File "/usr/lib/
"Failed to run command: %s with error: %s" % (command, stderr))
provisioningse
Related branches
- Andres Rodriguez (community): Approve
-
Diff: 12 lines (+1/-1)1 file modifiedsrc/provisioningserver/drivers/power/amt.py (+1/-1)
- Andres Rodriguez (community): Approve
-
Diff: 24 lines (+2/-1)2 files modifieddocs/changelog.rst (+1/-0)
src/provisioningserver/drivers/power/amt.py (+1/-1)
Changed in maas: | |
status: | Incomplete → Triaged |
importance: | Undecided → High |
milestone: | none → 1.10.0 |
milestone: | 1.10.0 → 2.0.0 |
summary: |
- [1.10] AMT queries seem to be failing on Xenial + [1.10, 2.0] AMT versions > 9 are broken in MAAS |
summary: |
- [1.10, 2.0] AMT versions > 9 are broken in MAAS + AMT versions > 9 are broken in MAAS |
summary: |
- MAAS Incorrectly compares for AMT versions + MAAS Incorrectly compares AMT versions (as strings) |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Possibly related: #1513198. I noticed that we see the same "404 Not Found" error when when querying AMT versions > 8. Do you know which version of AMT is running on the node being queried?
In MAAS, it seems that we are relying on an initial run of "amttool <ip-address> info" in order to report the AMT version before choosing a tool to use in order to do the power control (or query).
Can you add the full output of the following command (stdout and stderr) to this bug:
AMT_PASSWORD= your-password /usr/bin/amttool 192.168.9.3 info
Reading the code, I'm concerned that if the AMT version is 10 or higher, MAAS may incorrectly attempt to use amttool rather than wsman. This is because in amt.py, we have the following check:
version = stdout.split( ')[1].split( )[0].split( '.')[0]
'AMT version:
if version > '8':
return 'wsman'
else:
return 'amttool'
If the version here is '10', I suspect we'll incorrectly select 'amttool':
>>> '10' > '8'
False