Ask Your Question
0

cloudpipe instance fails to get payload.b64

asked 2011-04-11 10:15:17 -0600

hyunsun-moon gravatar image

Hello, I'm trying to test VPN. I added some scripts to the cloudpipe image's rc.local for fetching user-data from metadata server.(I found the useful scripts from this board).

Here's the script.


echo Downloading payload from userdata wget http://169.254.169.254/latest/user-data -O /tmp/payload.b64 echo Decrypting base64 payload openssl enc -d -base64 -in /tmp/payload.b64 -out /tmp/payload.zip

mkdir -p /tmp/payload echo Unzipping payload file unzip -o /tmp/payload.zip -d /tmp/payload/

if the autorun.sh script exists, run it

if [ -e /tmp/payload/autorun.sh ]; then echo Running autorun.sh cd /tmp/payload sh /tmp/payload/autorun.sh

else echo rc.local : No autorun script to run fi

exit 0


I was able to run vpn instance successfully but during the boot processing, I got the following errors so that the OpenVPN server fails to launch. No more debug messages...

Did I miss something?


Downloading payload from userdata --2011-04-11 09:49:43-- http://169.254.169.254/latest/user-data Connecting to 169.254.169.254:80... connected. HTTP request sent, awaiting response... 500 Internal Server Error 2011-04-11 09:49:43 ERROR 500: Internal Server Error.

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted
0

answered 2011-04-11 16:41:05 -0600

hyunsun-moon gravatar image

Hi Barton, here are the results of curl http://169.254.169.254/latest/meta-data/ local-ipv4 reservation-id local-hostname placement/ ami-launch-index public-hostname mpi/ hostname ami-id public-keys/ instance-action public-ipv4 block-device-mapping/ ami-manifest-path security-groups instance-type instance-id

It's from the normal instance because I don't know how to log in to the cloudpipe server. Frequently the same command (curl http://169.254.169.254/latest/meta-data/ ) occurs the following error!!!


Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/eventlet/wsgi.py", line 336, in handle_one_response result = self.application(self.environ, start_response) File "/usr/lib/pymodules/python2.6/paste/urlmap.py", line 203, in __call__ return app(environ, start_response) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, *self.kwargs) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func return self.func(req, args, *kwargs) File "/root/openstack/nova/nova/api/ec2/__init__.py", line 59, in __call__ rv = req.get_response(self.application) File "/usr/lib/pymodules/python2.6/webob/request.py", line 919, in get_response application, catch_exc_info=False) File "/usr/lib/pymodules/python2.6/webob/request.py", line 887, in call_application app_iter = application(self.environ, start_response) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, *self.kwargs) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func return self.func(req, args, *kwargs) File "/root/openstack/nova/nova/api/ec2/metadatarequesthandler.py", line 74, in __call__ meta_data = cc.get_metadata(remote_address) File "/root/openstack/nova/nova/api/ec2/cloud.py", line 173, in get_metadata 'instance-type': instance_ref['instance_type'], File "/root/openstack/nova/nova/db/sqlalchemy/models.py", line 74, in __getitem__ return getattr(self, key) File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/attributes.py", line 163, in __get__ instance_dict(instance)) File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/attributes.py", line 382, in get value = callable_(passive=passive) File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/strategies.py", line 578, in __call__ (mapperutil.state_str(state), self.key) DetachedInstanceError: Parent instance <instance at="" 0x45dd810=""> is not bound to a Session; lazy load operation of attribute 'instance_type' cannot proceed

edit flag offensive delete link more
0

answered 2011-04-11 16:00:46 -0600

barton-satchwill gravatar image

the autorun.sh script configures the openvpn server, so if there's no autorun script, then we wouldn't expect the vpn server to start. So the root problem is why aren't you getting the autorun.sh script from the payload.zip?

The error message suggests you're connecting to the metadata server, so the network is up.

To get more diagnostic information, you can log into the cloudpipe server, and try executing the rc.local script again, adding some statements to print some diagnostic output.

are you able to 'curl http://169.254.169.254/latest/user-data' (http://169.254.169.254/latest/user-da...)

are you starting the cloudpipe server with 'nova-manage vpn run <project>'?

have you inspected the logfiles in /var/log/nova for the timeperiod of your test?

edit flag offensive delete link more
0

answered 2011-04-11 16:41:40 -0600

hyunsun-moon gravatar image

Hi Barton, here are the results of curl http://169.254.169.254/latest/meta-data/ local-ipv4 reservation-id local-hostname placement/ ami-launch-index public-hostname mpi/ hostname ami-id public-keys/ instance-action public-ipv4 block-device-mapping/ ami-manifest-path security-groups instance-type instance-id

It's from the normal instance because I don't know how to log in to the cloudpipe server. Frequently the same command (curl http://169.254.169.254/latest/meta-data/ ) occurs the following error!!!


Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/eventlet/wsgi.py", line 336, in handle_one_response result = self.application(self.environ, start_response) File "/usr/lib/pymodules/python2.6/paste/urlmap.py", line 203, in __call__ return app(environ, start_response) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, *self.kwargs) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func return self.func(req, args, *kwargs) File "/root/openstack/nova/nova/api/ec2/__init__.py", line 59, in __call__ rv = req.get_response(self.application) File "/usr/lib/pymodules/python2.6/webob/request.py", line 919, in get_response application, catch_exc_info=False) File "/usr/lib/pymodules/python2.6/webob/request.py", line 887, in call_application app_iter = application(self.environ, start_response) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, *self.kwargs) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func return self.func(req, args, *kwargs) File "/root/openstack/nova/nova/api/ec2/metadatarequesthandler.py", line 74, in __call__ meta_data = cc.get_metadata(remote_address) File "/root/openstack/nova/nova/api/ec2/cloud.py", line 173, in get_metadata 'instance-type': instance_ref['instance_type'], File "/root/openstack/nova/nova/db/sqlalchemy/models.py", line 74, in __getitem__ return getattr(self, key) File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/attributes.py", line 163, in __get__ instance_dict(instance)) File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/attributes.py", line 382, in get value = callable_(passive=passive) File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/strategies.py", line 578, in __call__ (mapperutil.state_str(state), self.key) DetachedInstanceError: Parent instance <instance at="" 0x45dd810=""> is not bound to a Session; lazy load operation of attribute 'instance_type' cannot proceed

edit flag offensive delete link more
0

answered 2011-04-11 16:41:47 -0600

hyunsun-moon gravatar image

Hi Barton, here are the results of curl http://169.254.169.254/latest/meta-data/ local-ipv4 reservation-id local-hostname placement/ ami-launch-index public-hostname mpi/ hostname ami-id public-keys/ instance-action public-ipv4 block-device-mapping/ ami-manifest-path security-groups instance-type instance-id

It's from the normal instance because I don't know how to log in to the cloudpipe server. Frequently the same command (curl http://169.254.169.254/latest/meta-data/ ) occurs the following error!!!


Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/eventlet/wsgi.py", line 336, in handle_one_response result = self.application(self.environ, start_response) File "/usr/lib/pymodules/python2.6/paste/urlmap.py", line 203, in __call__ return app(environ, start_response) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, *self.kwargs) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func return self.func(req, args, *kwargs) File "/root/openstack/nova/nova/api/ec2/__init__.py", line 59, in __call__ rv = req.get_response(self.application) File "/usr/lib/pymodules/python2.6/webob/request.py", line 919, in get_response application, catch_exc_info=False) File "/usr/lib/pymodules/python2.6/webob/request.py", line 887, in call_application app_iter = application(self.environ, start_response) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, *self.kwargs) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func return self.func(req, args, *kwargs) File "/root/openstack/nova/nova/api/ec2/metadatarequesthandler.py", line 74, in __call__ meta_data = cc.get_metadata(remote_address) File "/root/openstack/nova/nova/api/ec2/cloud.py", line 173, in get_metadata 'instance-type': instance_ref['instance_type'], File "/root/openstack/nova/nova/db/sqlalchemy/models.py", line 74, in __getitem__ return getattr(self, key) File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/attributes.py", line 163, in __get__ instance_dict(instance)) File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/attributes.py", line 382, in get value = callable_(passive=passive) File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/strategies.py", line 578, in __call__ (mapperutil.state_str(state), self.key) DetachedInstanceError: Parent instance <instance at="" 0x45dd810=""> is not bound to a Session; lazy load operation of attribute 'instance_type' cannot proceed

edit flag offensive delete link more
0

answered 2011-04-11 16:49:56 -0600

hyunsun-moon gravatar image

oh, it was already in bug report, Bug #757293.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-04-11 10:15:17 -0600

Seen: 40 times

Last updated: Apr 11 '11