Wrong credentials when using vmware power returns unclear message

Bug #2024856 reported by Joao Andre Simioni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Triaged
Medium
Unassigned

Bug Description

[Description]

When configuring a machine with Power type = VMWare, and providing wrong
credentials, MAAS throws the following log message:

Failed to query node's BMC - __init__() takes 1 positional argument but 2 were given

Instead of a better message, such as wrong credentials, which is misleading.

Tested in MAAS 3.2 and 3.4

description: updated
Revision history for this message
Alexsander de Souza (alexsander-souza) wrote :

Hi, can you check regiond.log/rackd.log for the stack trace of this error? It would help us to track down where this error originates.

Changed in maas:
status: New → Incomplete
Revision history for this message
Joao Andre Simioni (jasimioni) wrote :

Hi Alexsander,

I don't see any error messages in rackd.log / regiond.log / maas.log, only in Logs tab of the Web UI.

Failed to query node's BMC - __init__() takes 1 positional argument but 2 were given

Grepping maas.log I see the same error string at different timestamps - I think it's related to some maas periodic activity to check the machine status:

2023-06-22T15:43:31.155046+00:00 maas327snap maas.interface: [info] ens3 (physical) on maas327snap: New MAC, IP binding observed: 52:54:00:7a:18:89, 192.168.122.53
2023-06-22T15:52:08.463660+00:00 maas327snap maas.interface: [info] ens10 (physical) on maas327snap: New MAC, IP binding observed: 00:0c:29:81:5e:1e, 192.168.0.197
2023-06-22T16:08:08.151350+00:00 maas327snap maas.power: [error] vmware-vm: Power state could not be queried: __init__() takes 1 positional argument but 2 were given
2023-06-22T16:08:08.172181+00:00 maas327snap maas.power: [error] vmware-vm: Failed to refresh power state: __init__() takes 1 positional argument but 2 were given
2023-06-22T16:40:35.508143+00:00 maas327snap maas.import-images: [info] Downloading image descriptions from http://images.maas.io/ephemeral-v3/stable/

There are no logs in regiond.log or rackd.log in those timestamps.

I can create and share a reproducer if needed.

Kind regards

Revision history for this message
Alexsander de Souza (alexsander-souza) wrote :

can you run this command in the rack controller?

maas.power status vmware --power-address $VM_IP --power-user $USERNAME --power-pass wrong-pass

I think MAAS is truncating the error message.

Changed in maas:
status: Incomplete → New
status: New → Incomplete
Revision history for this message
Joao Andre Simioni (jasimioni) wrote :

Below the last lines of the trace:

  File "/snap/maas/28584/lib/python3.8/site-packages/pyVmomi/VmomiSupport.py", line 580, in <lambda>
    self.f(*(self.args + (obj,) + args), **kwargs)
  File "/snap/maas/28584/lib/python3.8/site-packages/pyVmomi/VmomiSupport.py", line 386, in _InvokeMethod
    return self._stub.InvokeMethod(self, info, args)
  File "/snap/maas/28584/lib/python3.8/site-packages/pyVmomi/SoapAdapter.py", line 1373, in InvokeMethod
    raise obj # pylint: disable-msg=E0702
pyVmomi.VmomiSupport.vim.fault.InvalidLogin: (vim.fault.InvalidLogin) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   msg = 'Cannot complete login due to an incorrect user name or password.',
   faultCause = <unset>,
   faultMessage = (vmodl.LocalizableMessage) []
}

Full Trace: https://pastebin.ubuntu.com/p/QWqSWmtkQM/

Revision history for this message
Alexsander de Souza (alexsander-souza) wrote :

thanks, now I see what Exception we should catch.

Changed in maas:
status: Incomplete → Triaged
importance: Undecided → Medium
milestone: none → 3.5.0
Changed in maas:
milestone: 3.5.0 → 3.5.x
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.