launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #15127
[Merge] lp:~andreserl/maas/ipmi_usercreation_ilo_versions into lp:maas/1.2
Andres Rodriguez has proposed merging lp:~andreserl/maas/ipmi_usercreation_ilo_versions into lp:maas/1.2.
Requested reviews:
MAAS Maintainers (maas-maintainers)
Related bugs:
Bug #1119696 in MAAS: "IPMI User Creation on iLO differs between version"
https://bugs.launchpad.net/maas/+bug/1119696
For more details, see:
https://code.launchpad.net/~andreserl/maas/ipmi_usercreation_ilo_versions/+merge/147460
--
https://code.launchpad.net/~andreserl/maas/ipmi_usercreation_ilo_versions/+merge/147460
Your team MAAS Maintainers is requested to review the proposed merge of lp:~andreserl/maas/ipmi_usercreation_ilo_versions into lp:maas/1.2.
=== modified file 'contrib/preseeds_v2/enlist_userdata'
--- contrib/preseeds_v2/enlist_userdata 2012-11-30 17:34:43 +0000
+++ contrib/preseeds_v2/enlist_userdata 2013-02-08 19:54:19 +0000
@@ -99,9 +99,20 @@
res = show_re.search(output)
return res.group()
+ def get_ipmi_user_number(user):
+ for i in range(1, 17):
+ ipmi_user_number = "User%s" % i
+ (status, output) = commands.getstatusoutput('bmc-config --checkout --key-pair="%s:Username"' % ipmi_user_number)
+ if user in output:
+ return ipmi_user_number
+ return None
+
def commit_ipmi_user_settings(user, password):
- (status, output) = commands.getstatusoutput('bmc-config --commit --key-pair="User3:Username=%s"' % user)
- (status, output) = commands.getstatusoutput('bmc-config --commit --key-pair="User3:Password=%s"' % password)
+ ipmi_user_number = get_ipmi_user_number(user)
+ if ipmi_user_number is None:
+ (status, output) = commands.getstatusoutput('bmc-config --commit --key-pair="User10:Username=%s"' % user)
+ ipmi_user_number = get_ipmi_user_number(user)
+ (status, output) = commands.getstatusoutput('bmc-config --commit --key-pair="%s:Password=%s"' % (ipmi_user_number, password))
def commit_ipmi_settings(config):
(status, output) = commands.getstatusoutput('bmc-config --commit --filename %s' % config)
@@ -147,10 +158,7 @@
time.sleep(120)
# create user/pass
- if args.commission_creds:
- IPMI_MAAS_USER="maas-commission"
- else:
- IPMI_MAAS_USER="maas"
+ IPMI_MAAS_USER="maas"
IPMI_MAAS_PASSWORD=generate_random_password()
# Configure IPMI user/password
=== modified file 'etc/maas/commissioning-user-data'
--- etc/maas/commissioning-user-data 2013-02-06 16:17:19 +0000
+++ etc/maas/commissioning-user-data 2013-02-08 19:54:19 +0000
@@ -256,9 +256,20 @@
res = show_re.search(output)
return res.group()
+def get_ipmi_user_number(user):
+ for i in range(1, 17):
+ ipmi_user_number = "User%s" % i
+ (status, output) = commands.getstatusoutput('bmc-config --checkout --key-pair="%s:Username"' % ipmi_user_number)
+ if user in output:
+ return ipmi_user_number
+ return None
+
def commit_ipmi_user_settings(user, password):
- (status, output) = commands.getstatusoutput('bmc-config --commit --key-pair="User3:Username=%s"' % user)
- (status, output) = commands.getstatusoutput('bmc-config --commit --key-pair="User3:Password=%s"' % password)
+ ipmi_user_number = get_ipmi_user_number(user)
+ if ipmi_user_number is None:
+ (status, output) = commands.getstatusoutput('bmc-config --commit --key-pair="User10:Username=%s"' % user)
+ ipmi_user_number = get_ipmi_user_number(user)
+ (status, output) = commands.getstatusoutput('bmc-config --commit --key-pair="%s:Password=%s"' % (ipmi_user_number, password))
def commit_ipmi_settings(config):
(status, output) = commands.getstatusoutput('bmc-config --commit --filename %s' % config)
Follow ups