open-port barfs on a port that was just closed

Bug #908198 reported by Mark Mims
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pyjuju
Fix Released
Medium
Jim Baker

Bug Description

With a config-changed hook:

    #!/bin/sh

    . /etc/default/bitlbee

    # Close the old port
    echo "Closing old port $BITLBEE_PORT"
    close-port "$BITLBEE_PORT/tcp"

    PORT=`config-get port`

    echo "Opening new port $PORT"

    cat >/etc/default/bitlbee<<EOF
    BITLBEE_PORT=$PORT
    BITLBEE_OPTS="-F"
    BITLBEE_DISABLED=0
    BITLBEE_UPGRADE_DONT_RESTART=0
    EOF

    /etc/init.d/bitlbee restart

    open-port "$PORT/tcp"

the open-port throws the attached exception if it's opening the same port it just closed.
Net result is no ports open.

Related branches

Revision history for this message
Mark Mims (mark-mims) wrote :
Changed in juju:
status: New → Triaged
importance: Undecided → Medium
milestone: none → florence
Jim Baker (jimbaker)
Changed in juju:
assignee: nobody → Jim Baker (jimbaker)
status: Triaged → In Progress
Jim Baker (jimbaker)
Changed in juju:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.