Activity log for bug #1285607

Date Who What changed Old value New value Message
2014-02-27 11:02:05 Jeroen T. Vermeulen bug added bug
2014-02-27 11:17:30 Jeroen T. Vermeulen description Lord_Set reports that some systems are not enlisting. Running maas_ipmi_autodetect.py manually produces this error: raceback (most recent call last): File "maas_ipmi_autodetect.py", line 309, in <module> main() File "maas_ipmi_autodetect.py", line 276, in main apply_ipmi_user_settings(user_settings) File "maas_ipmi_autodetect.py", line 189, in apply_ipmi_user_settings ipmi_user_number = pick_user_number(username) File "maas_ipmi_autodetect.py", line 138, in pick_user_number raise IPMIError('No IPMI user slots available.') __main__.IPMIError: No IPMI user slots available. Yet there are clearly empty slots: User1, User2, User3 and so on. Obtaining the user names for one of these slots as the script does it, produced: # bmc-config --checkout --key-pair=User5:Username Section User5 ## Give Username Username EndSection (Indentation may not be correct: the text went through IRC). The cause of the problem seems to be in bmc_user_get(). It matches that user query output to: r'^\s*%s(?:[ \t])+([^# \t\r\n\v\f]*[^\n]+)$' % (parameter) If that doesn't match, bmc_user_get() returns None. Otherwise, it returns the match. But it looks as if just indentation whitespace _can_ produce a match: in this case the returned user name for an empty slot consisted of just blank space! I think either the regex needs fixing, or we need to strip the output and also consider the empty user name to indicate an empty slot. Lord_Set reports that some systems are not enlisting. Running maas_ipmi_autodetect.py manually produces this error: raceback (most recent call last):   File "maas_ipmi_autodetect.py", line 309, in <module>     main()   File "maas_ipmi_autodetect.py", line 276, in main     apply_ipmi_user_settings(user_settings)   File "maas_ipmi_autodetect.py", line 189, in apply_ipmi_user_settings     ipmi_user_number = pick_user_number(username)   File "maas_ipmi_autodetect.py", line 138, in pick_user_number     raise IPMIError('No IPMI user slots available.') __main__.IPMIError: No IPMI user slots available. Yet there are clearly empty slots: User1, User2, User3 and so on. Obtaining the user names for one of these slots as the script does it, produced: # bmc-config --checkout --key-pair=User5:Username Section User5         ## Give Username         Username EndSection (Indentation may not be correct: the text went through IRC). The cause of the problem seems to be in bmc_user_get(). It matches that user query output to:     r'^\s*%s(?:[ \t])+([^# \t\r\n\v\f]*[^\n]+)$' % (parameter) If that doesn't match, bmc_user_get() returns None. Otherwise, it returns the match. But it looks as if just indentation whitespace _can_ produce a match: in this case the returned user name for an empty slot consisted of just a single space! I think either the regex needs fixing, or we need to strip the output and also consider the empty user name to indicate an empty slot.
2014-02-27 13:40:14 Andres Rodriguez maas: assignee Jason Hobbs (jason-hobbs)
2014-02-27 13:51:36 Launchpad Janitor branch linked lp:~jtv/maas/bug-1285607
2014-02-27 14:16:51 Jason Hobbs maas: status Triaged In Progress
2014-02-27 15:05:47 Launchpad Janitor branch linked lp:~jason-hobbs/maas/lp-1285607-dont-match-empty-username
2014-02-27 15:57:55 MAAS Lander maas: status In Progress Fix Committed
2014-02-27 22:39:43 Jason Hobbs tags server-hwe
2014-04-17 05:15:06 Julian Edwards maas: status Fix Committed Fix Released