~smoser/ubuntu/wily/maas/lp1474417

« back to all changes in this revision

Viewing changes to src/provisioningserver/power/templates/ipmi.template

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2013-04-23 14:02:33 UTC
  • Revision ID: package-import@ubuntu.com-20130423140233-358whmd81xc0xms0
Tags: 1.3+bzr1461+dfsg-0ubuntu3
* debian/patches:
  - 99-fix-ipmi-stat-lp1086160.patch: Drop. The following patch removes
    the need for this fix. (LP: #1171988)
  - 99-fix-ipmi-lp1171418.patch: Do not check current node state when
    executing an ipmi command, which ensures that nodes are always
    turned on/off regardless of their power state. This fixes corner
    cases found when running automated tests. (LP: #1171418)
  - 99-fix-comissioning-lp1131418.patch: Fixes the commissioning process,
    allowing nodes to successfully commission, when tag's with no
    definition have been created. This issue will only appear when these
    special tags are created. (LP: #1131418)
  - 99-import-raring-images-lp1182642.patch: Enables the import of raring
    images by default (LP: #1182642)
  - 99-fix-new-image-install-lp1182646.patch: Fixes the installation of
    new ephemeral images, that fail due to not being able to overwrite
    a symlink. (LP: #1182646)

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
    driver_option=""
46
46
    if [ -n "$power_driver" ]
47
47
        then
48
 
          driver_option="--driver-type=$power_driver"
 
48
          driver_option="--driver-type=${power_driver}"
49
49
    fi
50
50
 
51
51
    echo workaround |\
55
55
}
56
56
 
57
57
 
58
 
# Get the given system's power state: 'on' or 'off'.
59
 
get_power_state() {
60
 
    ipmi_state=$(issue_ipmi_command --stat)
61
 
    formulate_power_state ${ipmi_state}
62
 
}
63
 
 
64
 
 
65
 
if [ "$(get_power_state)" != "${power_change}" ]
66
 
then
67
 
    power_command=$(formulate_power_command ${power_change})
68
 
    issue_ipmi_command ${power_command}
69
 
fi
 
58
# This script deliberately does not check the current power state
 
59
# before issuing the requested power command. See bug 1171418 for an
 
60
# explanation.
 
61
power_command=$(formulate_power_command ${power_change})
 
62
issue_ipmi_command ${power_command}