ramdisk-functions replace the contents of /etc/modprobe.d/blacklist.conf with "blacklist evbug" only

Bug #1492804 reported by Nisha Agarwal on 2015-09-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
High
Nisha Agarwal

Bug Description

lib/ramdisk-functions replace the contents of /etc/modprobe.d/blacklist.conf with "blacklist evbug" only. The code does following:
echo "blacklist evbug" > "$TMP_MOUNT_PATH/etc/modprobe.d/blacklist.conf"

While it should do "echo "blacklist evbug" >> "$TMP_MOUNT_PATH/etc/modprobe.d/blacklist.conf"" after writing the contents of modprobe.d/blacklist.conf to the image.

Anything written to blacklist.conf by the elements is replaced by "blacklist evbug". This prevents the ramdisk to boot successfully when an element depends on the blacklist.conf.

Fix proposed to branch: master
Review: https://review.openstack.org/220883

Changed in diskimage-builder:
assignee: nobody → Nisha Agarwal (agarwalnisha1980)
status: New → In Progress
Dan Prince (dan-prince) on 2015-09-11
Changed in diskimage-builder:
importance: Undecided → High

Reviewed: https://review.openstack.org/220883
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=d9ce041237cb88b5d278d925b4ef27510c344ecc
Submitter: Jenkins
Branch: master

commit d9ce041237cb88b5d278d925b4ef27510c344ecc
Author: Nisha Agarwal <email address hidden>
Date: Sun Sep 6 22:52:16 2015 -0700

    Prevent overwriting of user modified blacklist.conf

    The ramdisk-functions overwrites user modified
    /etc/modprobe.d/blacklist.conf with a single entry
    "blacklist evbug". Due to this, ramdisk fails to recognise
    the hardware/disks etc for which user has modified
    /etc/modprobe.d/blacklist.conf.
    The commit enables copying all the *.conf files under
    /etc/modprobe.d to the ramdisk. It creates
    a config file /etc/modprobe.d/blacklist-dib-ramdisk.conf
    instead of overwriting /etc/modprobe.d/blacklist.conf.

    Closes bug: #1492804

    Change-Id: Ib88272e4b8f4641c58e7e68bb0c2e4b82efc4fc1

Changed in diskimage-builder:
status: In Progress → Fix Committed
Changed in diskimage-builder:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers