diff -Nru maas-1.5+bzr1977/debian/changelog maas-1.5+bzr1977/debian/changelog --- maas-1.5+bzr1977/debian/changelog 2014-03-04 23:55:29.000000000 +0000 +++ maas-1.5+bzr1977/debian/changelog 2014-03-10 19:51:09.000000000 +0000 @@ -1,3 +1,15 @@ +maas (1.5+bzr1977-0ubuntu4) trusty; urgency=medium + + * debian/maas-region-controller-min.templates: Set installation note + to false by default. + * Check rabbitmqctl is present before running commands: + - debian/maas-region-controller-min.maas-region-celery.upstart. + - debian/maas-region-controller-min.maas-txlongpoll.upstart. + * debian/patches/04-maas-ipmi-fixes.patch: Update to include more + fixes for BMC's in corner cases. + + -- Andres Rodriguez Mon, 10 Mar 2014 15:49:32 -0400 + maas (1.5+bzr1977-0ubuntu3) trusty; urgency=medium * debian/patches/04-maas-ipmi-fixes.patch: Fix IPMI detection in trusty, diff -Nru maas-1.5+bzr1977/debian/maas-region-controller-min.maas-region-celery.upstart maas-1.5+bzr1977/debian/maas-region-controller-min.maas-region-celery.upstart --- maas-1.5+bzr1977/debian/maas-region-controller-min.maas-region-celery.upstart 2014-02-19 21:43:19.000000000 +0000 +++ maas-1.5+bzr1977/debian/maas-region-controller-min.maas-region-celery.upstart 2014-03-10 19:48:52.000000000 +0000 @@ -16,7 +16,7 @@ env DJANGO_SETTINGS_MODULE="maas.settings" pre-start script - if ! /usr/sbin/rabbitmqctl list_user_permissions $workers_user 1>/dev/null 2>&1; then + if -f /usr/sbin/rabbitmqctl && ! /usr/sbin/rabbitmqctl list_user_permissions $workers_user 1>/dev/null 2>&1; then workers_pass=`grep "maas_workers" /etc/maas/maas_local_celeryconfig.py | cut -d':' -f3 | cut -d'@' -f1` /usr/sbin/rabbitmqctl add_user "$workers_user" "$workers_pass" /usr/sbin/rabbitmqctl add_vhost "$workers_vhost" diff -Nru maas-1.5+bzr1977/debian/maas-region-controller-min.maas-txlongpoll.upstart maas-1.5+bzr1977/debian/maas-region-controller-min.maas-txlongpoll.upstart --- maas-1.5+bzr1977/debian/maas-region-controller-min.maas-txlongpoll.upstart 2014-02-19 21:43:19.000000000 +0000 +++ maas-1.5+bzr1977/debian/maas-region-controller-min.maas-txlongpoll.upstart 2014-03-10 19:49:06.000000000 +0000 @@ -15,7 +15,7 @@ env longpoll_vhost="/maas_longpoll" pre-start script - if ! /usr/sbin/rabbitmqctl list_user_permissions $longpoll_user 1>/dev/null 2>&1; then + if -f /usr/sbin/rabbitmqctl && ! /usr/sbin/rabbitmqctl list_user_permissions $longpoll_user 1>/dev/null 2>&1; then longpoll_pass=`/bin/grep "password" /etc/maas/txlongpoll.yaml | cut -d'"' -f2` /usr/sbin/rabbitmqctl add_user "$longpoll_user" "$longpoll_pass" /usr/sbin/rabbitmqctl add_vhost "$longpoll_vhost" diff -Nru maas-1.5+bzr1977/debian/maas-region-controller-min.templates maas-1.5+bzr1977/debian/maas-region-controller-min.templates --- maas-1.5+bzr1977/debian/maas-region-controller-min.templates 2014-02-19 21:43:19.000000000 +0000 +++ maas-1.5+bzr1977/debian/maas-region-controller-min.templates 2014-03-10 19:49:25.000000000 +0000 @@ -1,6 +1,6 @@ Template: maas/installation-note Type: note -Default: true +Default: false _Description: Ubuntu MAAS Server The Ubuntu MAAS Server has been installed in your system. You can access the MAAS Web interface here: diff -Nru maas-1.5+bzr1977/debian/patches/04-maas-ipmi-fixes.patch maas-1.5+bzr1977/debian/patches/04-maas-ipmi-fixes.patch --- maas-1.5+bzr1977/debian/patches/04-maas-ipmi-fixes.patch 2014-03-04 23:54:02.000000000 +0000 +++ maas-1.5+bzr1977/debian/patches/04-maas-ipmi-fixes.patch 2014-03-10 19:48:24.000000000 +0000 @@ -1,19 +1,21 @@ Index: maas-1.5+bzr1977/etc/maas/templates/commissioning-user-data/snippets/maas_ipmi_autodetect.py =================================================================== ---- maas-1.5+bzr1977.orig/etc/maas/templates/commissioning-user-data/snippets/maas_ipmi_autodetect.py 2014-02-19 16:42:56.000000000 -0500 -+++ maas-1.5+bzr1977/etc/maas/templates/commissioning-user-data/snippets/maas_ipmi_autodetect.py 2014-03-04 18:53:43.987160596 -0500 -@@ -38,6 +38,10 @@ +--- maas-1.5+bzr1977.orig/etc/maas/templates/commissioning-user-data/snippets/maas_ipmi_autodetect.py 2014-03-10 15:47:19.019122442 -0400 ++++ maas-1.5+bzr1977/etc/maas/templates/commissioning-user-data/snippets/maas_ipmi_autodetect.py 2014-03-10 15:48:22.695124073 -0400 +@@ -37,6 +37,12 @@ + import subprocess import time - ++from collections import OrderedDict ++ ++ +class IPMIError(Exception): + """An error related to IPMI.""" + -+ + def run_command(command_args): """Run a command. Return output if successful or raise exception if not.""" - output = subprocess.check_output(command_args, stderr=subprocess.STDOUT) -@@ -65,7 +69,12 @@ +@@ -65,7 +71,12 @@ def bmc_user_get(user_number, parameter): """Get a user parameter via bmc-config commit.""" key = format_user_key(user_number, parameter) @@ -27,7 +29,7 @@ def bmc_user_set(user_number, parameter, value): -@@ -74,6 +83,63 @@ +@@ -74,6 +85,63 @@ bmc_set(key, value) @@ -91,7 +93,7 @@ def is_ipmi_dhcp(): output = bmc_get('Lan_Conf:IP_Address_Source') show_re = re.compile('IP_Address_Source\s+Use_DHCP') -@@ -91,35 +157,45 @@ +@@ -91,35 +159,68 @@ return res.group() @@ -155,6 +157,29 @@ + bmc_user_set(ipmi_user_number, key, value) + + verify_ipmi_user_settings(ipmi_user_number, user_settings) ++ ++ ++def make_ipmi_user_settings(username, password): ++ """Factory for IPMI user settings.""" ++ # Some BMCs care about the order these settings are applied in, ++ # particulary what's done prior to the user being enabled. This ++ # behavior was seen on Dell Poweredge R240 systems, but may affect ++ # others too. Don't change the order of these without lots of ++ # testing. ++ user_settings = OrderedDict(( ++ ('Username', username), ++ ('Password', password), ++ ('Enable_User', 'Yes'), ++ ('Lan_Enable_IPMI_Msgs', 'Yes'), ++ ('Lan_Privilege_Limit', 'Administrator'), ++ )) ++ return user_settings ++ ++ ++def configure_ipmi_user(username, password): ++ """Create or configure an IPMI user for remote use.""" ++ user_settings = make_ipmi_user_settings(username, password) ++ apply_ipmi_user_settings(user_settings) def commit_ipmi_settings(config): @@ -163,7 +188,7 @@ def get_maas_power_settings(user, password, ipaddress, version): -@@ -142,22 +218,10 @@ +@@ -142,22 +243,10 @@ return ''.join([random.choice(letters) for _ in range(length)]) @@ -189,7 +214,7 @@ def main(): -@@ -183,13 +247,21 @@ +@@ -183,13 +272,11 @@ set_ipmi_network_source("Use_DHCP") # allow IPMI 120 seconds to obtain an IP address time.sleep(120) @@ -198,22 +223,13 @@ IPMI_MAAS_USER = "maas" IPMI_MAAS_PASSWORD = generate_random_password() - # Configure IPMI user/password +- # Configure IPMI user/password - commit_ipmi_user_settings(IPMI_MAAS_USER, IPMI_MAAS_PASSWORD) -+ -+ user_settings = { -+ 'Username': IPMI_MAAS_USER, -+ 'Password': IPMI_MAAS_PASSWORD, -+ 'Enable_User': 'Yes', -+ 'Lan_Enable_IPMI_Msgs': 'Yes', -+ 'Lan_Privilege_Limit': 'Administrator' -+ } -+ -+ apply_ipmi_user_settings(user_settings) ++ configure_ipmi_user(IPMI_MAAS_USER, IPMI_MAAS_PASSWORD) # Commit other IPMI settings if args.configdir: -@@ -211,9 +283,10 @@ +@@ -211,9 +298,10 @@ # has been detected exit(1)