vsphere: juju ignores local images and download from the internet

Bug #2049205 reported by Erlon R. Cruz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Medium
Nicolas Vinuesa

Bug Description

While trying to bootstrap a vsphere cloud controller, I hit a problem where Juju does not pick up the images and binaries pointed in the image metadata folder. Regardless of what I put into the metadata folder, or what parameters are used, Juju always downloads and boots Ubuntu.

Juju version:
2.9.46-ubuntu-amd64

Steps to reproduce:

juju add-cloud
# Enter a name for your vsphere cloud: vsphere
# Enter the vCenter address or URL: 10.230.65.170
# Enter datacenter name: segmaas

juju add-credential vsphere
# Enter user: <email address hidden>
# Enter password:
# Enter vmfolder (optional): vmfolder01
DATA_STORE="SharedImages"
ENDPOINT="10.230.xx.xxx"
STREAM="released"
METADATA_DIR="vsphere7-simplestreams-$STREAM"
JUJUD_BIN_FOLDER="/home/ubuntu/internal_git/juju/_build/linux_amd64/bin"
DC="10.230.xx.xxx"
REGION="DC1"

rm -rf $METADATA_DIR
mkdir -p $HOME/$METADATA_DIR/tools/$STREAM
cp $JUJUD_BIN_FOLDER/jujud $HOME/$METADATA_DIR/tools/$STREAM
pushd $HOME/$METADATA_DIR/tools/$STREAM
tar czf juju-`./jujud version`.tgz ./jujud
popd

## juju 2.9 procedure
juju metadata generate-agents -d $METADATA_DIR --stream $STREAM

juju metadata generate-image -r $REGION -u $ENDPOINT \
    -d $HOME/$METADATA_DIR/ \
    -i "cloud-images/ubuntu-20.04-server-cloudimg-amd64.ova" \
    -s focal --storage $DATA_STORE --stream $STREAM

juju metadata generate-image -r $REGION -u $ENDPOINT \
    -d $HOME/$METADATA_DIR/ \
    -i "cloud-images/centos-7-atomicapp-dev-1-1.x86_64.vsphere.ova" \
    -s centos7 --storage $DATA_STORE --stream $STREAM

juju --debug bootstrap vcenter7 --metadata-source $HOME/vsphere7-simplestreams-$STREAM --config datastore=$DATA_STORE --config primary-network="VM Network" --bootstrap-constraints "zones=$DC" --bootstrap-series focal --show-log

The results for this commands can be seen here[1]. See that, juju complains about a missing image-downloads field, but image-ids is what Juju should really be searching for since this is a local image. Also if I change that to image-downloads, it doesn't work as well[2].

   [1] https://gist.github.com/sombrafam/ddf3a234946175c4fdab8ea887b3e140
   [2] after changing image-ids for image-downloads: https://gist.github.com/sombrafam/537b702a5faae890d59ab51f7d3078a4
   [3] metadata index: https://gist.github.com/sombrafam/d9a3317096d09d4380560d3882c2d2f9

Changed in juju:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Nicolas Vinuesa (nvinuesa)
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.