Polluted /tmp

Bug #1467938 reported by Ante Karamatić
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron-gateway (Juju Charms Collection)
Fix Released
Medium
Edward Hope-Morley
neutron-openvswitch (Juju Charms Collection)
Fix Released
Medium
Edward Hope-Morley

Bug Description

# cat /etc/init/os-charm-phy-nic-mtu.conf
description "Enabling Quantum external networking port"

start on runlevel [2345]

task

script
    devs=""
    mtu=""
    tmpfile=`mktemp`
    echo $devs > $tmpfile
    if [ -n "$mtu" ]; then
        while read -r dev; do
            [ -n "$dev" ] || continue
            rc=0
            # Try all devices before exiting with error
            ip link set $dev mtu $mtu || rc=$?
        done < $tmpfile
        rm $tmpfile
        [ $rc = 0 ] || exit $rc
    fi

that 'rm $tmpfile' will not get executed if mtu is "", which is default. Therefore one might end up with:

# ls -d /tmp/*
/tmp/tmp.8ngdiIzhoH /tmp/tmp.EZ8CYzPhJF /tmp/tmp.HJqViHHebh /tmp/tmp.T5IOEub64m /tmp/tmp.eC7wNcFgsP /tmp/tmp.oVoNeaDjxJ /tmp/tmp.tdZfCfNWBx /tmp/tmp.wi3ozzDhiW
/tmp/tmp.38ffc9CrI1 /tmp/tmp.AsTp6tCc6D /tmp/tmp.FLvTiBQzpc /tmp/tmp.M4RtpZyt1r /tmp/tmp.THZlVesrwc /tmp/tmp.igXSQZtyoY /tmp/tmp.reFNekHHzm /tmp/tmp.uUQkr44fup /tmp/tmp.yG1auwfmgU
/tmp/tmp.5TwWEYRhjj /tmp/tmp.BOvAnfIPXl /tmp/tmp.FeVP8RTavo /tmp/tmp.SteJ5gukJp /tmp/tmp.cTwB3DsBda /tmp/tmp.o1P9l3M6uv /tmp/tmp.rqSqzySsFw /tmp/tmp.wPtbr8I38O

Tags: openstack cpec
Ante Karamatić (ivoks)
tags: added: cpec
no longer affects: quantum-gateway (Juju Charms Collection)
Changed in neutron-gateway (Juju Charms Collection):
importance: Undecided → Medium
Changed in neutron-openvswitch (Juju Charms Collection):
importance: Undecided → Medium
Changed in neutron-gateway (Juju Charms Collection):
milestone: none → 15.07
Changed in neutron-openvswitch (Juju Charms Collection):
milestone: none → 15.07
Changed in neutron-gateway (Juju Charms Collection):
status: New → In Progress
Changed in neutron-openvswitch (Juju Charms Collection):
status: New → In Progress
Changed in neutron-gateway (Juju Charms Collection):
assignee: nobody → Edward Hope-Morley (hopem)
Changed in neutron-openvswitch (Juju Charms Collection):
assignee: nobody → Edward Hope-Morley (hopem)
tags: added: openstack
Changed in neutron-openvswitch (Juju Charms Collection):
status: In Progress → Fix Committed
Changed in neutron-gateway (Juju Charms Collection):
status: In Progress → Fix Committed
James Page (james-page)
Changed in neutron-openvswitch (Juju Charms Collection):
status: Fix Committed → Fix Released
Changed in neutron-gateway (Juju Charms Collection):
status: Fix Committed → 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.