[cobbler] Ether-wake Power Template

Eric N. Jones eric.jones at transware.net
Tue Aug 12 20:59:59 UTC 2014


I had a working power management for magic packets up until the most recent update pushed through the EPEL repo to version 2.6.3. Now when I try to remotely power on a machine, I get a message like this:

# cobbler system poweron --name=cf238
task started: 2014-08-12_151242_power
task started (id=Power management (on), time=Tue Aug 12 15:12:42 2014)
failed to execute power task on cf238
*** TASK COMPLETE ***

Unfortunately, this doesn't give me any information about what might be failing and there is no additional information in the logs in /var/log/cobbler.  My power template looks like this (/etc/cobbler/power/fence_ether_wake.template):

fence_ether_wake "$power_address"

And the fence script in /usr/sbin/fence_ether_wake:

#!/bin/bash
#
# Fence script for executing ether-wake for remote power management
# usage: ether-wake -i <ifname> [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55
#
#       This program generates and transmits a Wake-On-LAN (WOL)
#       "Magic Packet", used for restarting machines that have been
#       soft-powered-down (ACPI D3-warm state).
#       It currently generates the standard AMD Magic Packet format, with
#       an optional password appended.
#
#       The single required parameter is the Ethernet MAC (station) address
#       of the machine to wake or a host ID with known NSS 'ethers' entry.
#       The MAC address may be found with the 'arp' program while the target
#       machine is awake.
#
#       Options:
#               -b      Send wake-up packet to the broadcast address.
#               -D      Increase the debug level.
#               -i ifname       Use interface.
#               -p <pw>         Append the four or six byte password PW to the packet.
#                                       A password is only required for a few adapter types.
#                                       The password may be specified in ethernet hex format
#                                       or dotted decimal (Internet address)
#               -p 00:22:44:66:88:aa
#               -p 192.168.1.1
#

while read line; do
  if [ `echo $line | gawk -F"=" {'print $1'}` == "ipaddr" ]; then
    power_address=`echo $line | gawk -F"=" {'print $2'}`
  fi
done

interface="bond1"

# Starting remote computer
ether-wake -i $interface "$power_address"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/cobbler/attachments/20140812/c516b759/attachment.html>


More information about the cobbler mailing list