novarc in nova.zip does not work perfectly as symlink

Bug #766352 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dave Walker
nova (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

with eucalyptus, the .zip file that is download contains a 'eucarc' file that can be symlinked into ~/.eucarc , and will work with euca-describe-images, euca-bundle-vol...

the novarc does not function with euca-bundle-vol:
$ ln -s ./me/novarc ~/.eucarc
$ uec-publish-image --kernel none --ramdisk none amd64 natty-server-uec-amd64.img smoser-debug-4 --verbose
[image ] natty-server-uec-amd64.img => smoser-debug-4/natty-server-uec-amd64.img none/none
failed: euca-bundle-image --destination /tmp/uec-publish-image.W4Du5d --arch x86_64 --image /tmp/uec-publish-image.W4Du5d/.rename.Dqb8sr/natty-server-uec-amd64.img
x86_64
Invalid cert
failed to bundle image natty-server-uec-amd64.img

$ cat ~/.eucarc
NOVA_KEY_DIR=$(pushd $(dirname $BASH_SOURCE)>/dev/null; pwd; popd>/dev/null)
export EC2_ACCESS_KEY="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ:cloud"
export EC2_SECRET_KEY="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ"
export EC2_URL="http://10.55.55.6:8773/services/Cloud"
export S3_URL="http://10.55.55.6:3333"
export EC2_USER_ID=42 # nova does not use user id, but bundling requires it
export EC2_PRIVATE_KEY=${NOVA_KEY_DIR}/pk.pem
export EC2_CERT=${NOVA_KEY_DIR}/cert.pem
export NOVA_CERT=${NOVA_KEY_DIR}/cacert.pem
export EUCALYPTUS_CERT=${NOVA_CERT} # euca-bundle-image seems to require this set
alias ec2-bundle-image="ec2-bundle-image --cert ${EC2_CERT} --privatekey ${EC2_PRIVATE_KEY} --user 42 --ec2cert ${NOVA_CERT}"
alias ec2-upload-bundle="ec2-upload-bundle -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_KEY} --url ${S3_URL} --ec2cert ${NOVA_CERT}"
export NOVA_API_KEY="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ"
export NOVA_USERNAME="smoser"
export NOVA_URL="http://10.55.55.6:8774/v1.0/"

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: nova-common 2011.2-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-8.42-server 2.6.38.2
Uname: Linux 2.6.38-8-server x86_64
Architecture: amd64
Date: Tue Apr 19 14:14:36 2011
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: nova
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

note, the symlink will work for other euca2ools programs (euca-get-console-output, euca-describe-images), but euca-bundle-vol will end up giving a "Invalid Cert" error.

Revision history for this message
Dave Walker (davewalker) wrote :

Currently (from initial commit),
NOVA_KEY_DIR=$(pushd $(dirname $BASH_SOURCE)>/dev/null; pwd; popd>/dev/null)v

I expected:
NOVA_KEY_DIR=$(dirname $(readlink -f ${BASH_SOURCE}))

Not quite sure why pushd/popd is being used.

Changed in nova (Ubuntu):
status: New → Triaged
summary: - novarc in nova.zip does not work perfectly as .eucarc
+ novarc in nova.zip does not work perfectly as symlink
Thierry Carrez (ttx)
Changed in nova:
assignee: nobody → Dave Walker (davewalker)
importance: Undecided → Medium
status: New → In Progress
Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Vish Ishaya (vishvananda) wrote :

So turns out the pushd popd was to make novarc work on a mac/bsd. Also not sure what the -f is for in readlink, but it doesn't work on a mac.

Changed in nova:
status: Fix Committed → Confirmed
Revision history for this message
Dave Walker (davewalker) wrote :

bah! That makes sense..

I wonder if a mac user can confirm of a combination that works when using OSX and novarc file being a symlink?

Revision history for this message
Vish Ishaya (vishvananda) wrote :

found one for bash zsh and mac. linked branch

Changed in nova:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-2
Thierry Carrez (ttx)
Changed in nova (Ubuntu):
status: Triaged → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-2 → 2011.3
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.