Addition of LXD images breaks setting of KVM image in conf file

Bug #1680857 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-cert-server
Fix Released
Critical
Jeff Lane 

Bug Description

Currently, this is the regex that sets the KVM image in the conf file on deployment:

filename_line=$(egrep "$DISTRIB_CODENAME-server-cloudimg-$arch.*img" /tmp/index.html | head -n 1);
if [ ! -z "$filename_line" ] ; then
    filename=$(echo $filename_line | grep -Po '(?<=href=")[^"]*(?=")');
else
    filename_line=$(egrep "server-cloudimg-$arch.*img" /tmp/index.html | head -n 1);
    filename=$(echo $filename_line | grep -Po '(?<=href=")[^"]*(?=")');
fi

However, that glob is too loose and now grabs the LXD images instead.

Need to modify this to grab the correct image for KVM
Need to modify this to also set the LXD image as well.

Related branches

Jeff Lane  (bladernr)
Changed in maas-cert-server:
status: In Progress → Fix Committed
Rod Smith (rodsmith)
Changed in maas-cert-server:
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.