Devstack Multi-node deployment fails with nova-docker compute node

Bug #1482157 reported by Ashish Billore
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
devstack
Invalid
Undecided
Ashish Billore

Bug Description

While using Devstack for multi-node deployment with one (or may be more) nodes as docker compute node with nova-docker, the deployment on the compute node fails due to follwing

This error can be traced to following script and following line in the script where it attempts to import a Docker image to Glance and fails:

Script: /opt/stack/nova-docker/contrib/devstack/lib/nova_plugins/hypervisor-docker
Code:

    echo "Checking default image for docker..."
    if ! (glance image-show "$DEFAULT_IMAGE_NAME"); then
        echo "Pulling $DOCKER_IMAGE_NAME..."
        docker pull $DOCKER_IMAGE_NAME
        echo "Saving $DOCKER_IMAGE_NAME to glance..."
        docker save $DOCKER_IMAGE_NAME | glance image-create --is-public=True --container-format=docker --disk-format=raw --name $DEFAULT_IMAGE_NAME ##### ---->>> Fails here, as this line is written with assumption of All-in-One devstack.
    fi

Now, to fix this issue, I added:

   # AB:: Source the Openstack admin creds
    source $TOP_DIR/openrc

    echo "Checking default image for docker..."
    if ! (glance image-show "$DEFAULT_IMAGE_NAME"); then
        echo "Pulling $DOCKER_IMAGE_NAME..."
        docker pull $DOCKER_IMAGE_NAME
        echo "Saving $DOCKER_IMAGE_NAME to glance..."
        docker save $DOCKER_IMAGE_NAME | glance image-create --is-public=True --container-format=docker --disk-format=raw --name $DEFAULT_IMAGE_NAME
    fi

At this point it is able to contact glance on the controller node, however, it again fails here -->

DEBUG glance.api.v1.images [req-c78842d4-2a41-46f3-be9d-bd4409642745 ea4790f8b6e54caaae0891e6bb39ce22 817b472d584d458bbcaffbad4c526ada - - -] User not permitted to perform 'publicize_image' action _enforce /opt/stack/glance/glance/api/v1/images.py:171

So, apparently devstack user cannot create "public" glance images remotely due to reduced permissions. Now to fix this, I updated it further:

   # AB:: Source the Openstack admin creds
    source $TOP_DIR/openrc

    echo "Checking default image for docker..."
    if ! (glance image-show "$DEFAULT_IMAGE_NAME"); then
        echo "Pulling $DOCKER_IMAGE_NAME..."
        docker pull $DOCKER_IMAGE_NAME
        echo "Saving $DOCKER_IMAGE_NAME to glance..."
# make image "private" else glance will be unhappy
        docker save $DOCKER_IMAGE_NAME | glance image-create --is-public=False --container-format=docker --disk-format=raw --name $DEFAULT_IMAGE_NAME
    fi

With these Changes to the script I am able to proceed with multi-node devstack deployment with Docker-compute.

Attaching the modified script, please review and if looks fine, I'll commit it to master.

Revision history for this message
Ashish Billore (ashish.billore) wrote :
Changed in devstack:
assignee: nobody → Ashish Billore (ashish.billore)
Revision history for this message
Sean Dague (sdague) wrote :

This devstack bug was last updated over 180 days ago, as devstack
is a fast moving project and we'd like to get the tracker down to
currently actionable bugs, this is getting marked as Invalid. If the
issue still exists, please feel free to reopen it.

Changed in devstack:
status: New → Invalid
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.