Several question about Cactus :) plz

Asked by Hugo Kou

Hi guys~
Just finish install 2011.3~bzr1003-0ubuntu0ppa1~natty1 (I think this trunk include Cactus features. Am I right ?)

several question :

1. Is multi "zone" implemented in Cactus? any docs ? I'm very interesting about multi hypervisors !!!!

2. Does VNC console in Dashboard support KVM instance ?

3. What if I do not using glance , the only way to fetch image from nova-objectstore host on compute-node is NFS mount ?

==========nova.conf============
--network_manager=nova.network.manager.FlatDHCPManager
--use_ipv6=false
--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--verbose
--s3_host=192.168.1.1
--rabbit_host=192.168.1.1
--cc_host=192.168.1.1
--ec2_url=http://192.168.1.1:8773/services/Cloud
--fixed_range=192.168.2.0/24
--network_size=256
--routing_source_ip=172.16.4.75
--verbose
--sql_connection=mysql://root:nova@192.168.1.1/nova
--lock_path=/var/lock/nova
--my_ip=192.168.1.1
--flat_network_dhcp_start=192.168.2.4
--flat_interface=eth1
--flat_injected=False
--FAKE_subdomain=ec2
--ca_path=/var/lib/nova/CA
--keys_path=/var/lib/nova/keys
--networks_path=/var/lib/nova/networks
--instances_path=/var/lib/nova/instances
--images_path=/var/lib/nova/images
--buckets_path=/var/lib/nova/buckets
--libvirt_type=kvm
--iscsi_ip_prefix=192.168.1.2
--volume_group=ubuntu2
=============================

thanks

Hugo Kuo

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Vish Ishaya
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Jay Pipes (jaypipes) said :
#1

On Tue, Apr 19, 2011 at 8:54 AM, Hugo Kou
<email address hidden> wrote:
> New question #153430 on OpenStack Compute (nova):
> https://answers.launchpad.net/nova/+question/153430
>
> Hi guys~
> Just finish install 2011.3~bzr1003-0ubuntu0ppa1~natty1 (I think this trunk include Cactus features. Am I right ?)

Yep, that is actually the Diablo release series (2011.3) but it has
all of Cactus in it.

> several question :
>
> 1. Is multi "zone" implemented in Cactus? any docs ? I'm very interesting about multi hypervisors !!!!

Yes, multi-zone work landed in Cactus. You can see some documentation
here: http://nova.openstack.org/devref/zone.html

> 2. Does VNC console in Dashboard support KVM instance ?

Not sure, I'll let someone else answer that one :)

> 3. What if I do not using glance , the only way to fetch image from nova-objectstore host on compute-node is NFS mount ?

Is there a reason you don't want to use Glance? I can assist you in
getting it going (pretty simple, really). Let me know! :)

-jay

Revision history for this message
Vish Ishaya (vishvananda) said :
#2

On Apr 19, 2011, at 5:54 AM, Hugo Kou wrote:

snip

> 2. Does VNC console in Dashboard support KVM instance ?
>

Yes it supports kvm

Revision history for this message
Hugo Kou (tonytkdk) said :
#3

Thanks Jay Pipes, that solved my question.

Revision history for this message
Hugo Kou (tonytkdk) said :
#4

Thanks both jay & Vish

Actually , I wonder to use Glance !!!! :)
but I'm not very clear about glance .....
there's my knowing .....plz correct me
1. Install Glance in somewhere , I plan to put it with nova-objectstore host , I guess it will work.
2. I'm not sure which flags should be set in /etc/nova.conf on all nodes. and glance's configuration..
3. After set Glance in my environment , how could I register image into bucket? Same as now using uec-publish-tarball ?
4. Once I use Glance for image-service , need I keep nova-objectstore service ? I think I can use any other back-end for objectstore .

All your reply solve my doubts.........thanks
I'm sure I can make those features work in my lab :>

Hugo Kuo

Revision history for this message
Jay Pipes (jaypipes) said :
#5

On Tue, Apr 19, 2011 at 12:51 PM, Hugo Kou
<email address hidden> wrote:
> Actually , I wonder to use Glance !!!!  :)
> but I'm not very clear about glance .....
> there's my knowing .....plz correct me
> 1. Install Glance in somewhere , I plan to put it with nova-objectstore host , I guess it will work.

Yep, just install Glance wherever you installed nova-objectstore.

Glance ships with an example configuration file, in its source
directory /etc/glance.conf.sample. Feel free to take a look at the
settable options there.

Glance uses the Filesystem storage backend by default, and by default,
this storage backend writes new images to /var/lib/glance/images. You
should either create that directory and ensure the user running Glance
has write permissions on that directory, or change the
filesystem_store_datadir configuration value to a directory that is
writeable.

> 2. I'm not sure which flags should be set in /etc/nova.conf on all nodes. and glance's configuration..

It depends on what hypervisor you use. For KVM, you will want to set
the following flags in nova.conf:

--glance_host=<ADDRESS>
--glance_port=9292 # Or whatever port you run Glance on (9292 is the
default...)
--image_service=nova.image.glance.GlanceImageService

That should be it. :)

> 3. After set Glance in my environment , how could I register image into bucket? Same as now using uec-publish-tarball ?

Should be the same as before.

> 4. Once I use Glance for image-service , need I keep nova-objectstore service ? I think I can use any other back-end for objectstore .

No, you shouldn't need nova-objectstore anymore, unless you are using
it for more than storing images.

Hope the above helps, lemme know if you have further questions!

-jay

> All your reply solve my doubts.........thanks
> I'm sure I can make those features work in my lab :>
>
> Hugo Kuo
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).
>

Revision history for this message
Hugo Kou (tonytkdk) said :
#6

Thanks Jay .... I success with Glance..!

But I found that I have to keep nova-objectstore service running , or my glance will failed to upload image...

as follow's error
================================

Wed Apr 20 16:17:06 CST 2011: ====== extracting image ======
kernel : ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz
ramdisk: ttylinux-uec-amd64-12.1_2.6.35-22_1-initrd
image : ttylinux-uec-amd64-12.1_2.6.35-22_1.img
Wed Apr 20 16:17:07 CST 2011: ====== bundle/upload kernel ======
Traceback (most recent call last):
  File "/usr/bin/euca-upload-bundle", line 262, in <module>
    main()
  File "/usr/bin/euca-upload-bundle", line 240, in main
    bucket_instance = ensure_bucket(conn, bucket, canned_acl)
  File "/usr/bin/euca-upload-bundle", line 95, in ensure_bucket
    bucket_instance = connection.get_bucket(bucket)
  File "/usr/lib/pymodules/python2.7/boto/s3/connection.py", line 275, in get_bucket
    rs = bucket.get_all_keys(headers, maxkeys=0)
  File "/usr/lib/pymodules/python2.7/boto/s3/bucket.py", line 204, in get_all_keys
    headers=headers, query_args=s)
  File "/usr/lib/pymodules/python2.7/boto/s3/connection.py", line 342, in make_request
    data, host, auth_path, sender)
  File "/usr/lib/pymodules/python2.7/boto/connection.py", line 461, in make_request
    return self._mexe(method, path, data, headers, host, sender)
  File "/usr/lib/pymodules/python2.7/boto/connection.py", line 439, in _mexe
    raise e
socket.error: [Errno 111] Connection refused
failed to upload bundle to test1/ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz.manifest.xml
failed: euca-upload-bundle --bucket test1 --manifest /tmp/uec-publish-image.pkwaIT/ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz.manifest.xml
Checking bucket: test1failed to upload kernel
===========================================

Revision history for this message
Hugo Kou (tonytkdk) said :
#7

There's a issue while I use Glance for image service

Instance can not fetch metadata correctly .

=====TTY IMAGE=====

wget: server returned error: HTTP\/1.1 500 Internal Server Error
cloud-userdata: failed to read instance id
===== cloud-final: system completely up in 42.78 seconds ====
wget: server returned error: HTTP\/1.1 500 Internal Server Error
wget: server returned error: HTTP\/1.1 500 Internal Server Error
wget: server returned error: HTTP\/1.1 500 Internal Server Error
  instance-id:
  public-ipv4:
  local-ipv4 :
=> First-Boot Sequence:
setting shared object cache [running ldconfig] [ OK ]

====UEC IMAGE====
init: cloud-init-local main process (267) terminated with status 1
cloud-init start running: Wed, 20 Apr 2011 09:05:08 +0000. up 4.93 seconds
2011-04-20 09:05:08,876 - DataSourceEc2.py[WARNING]: waiting for metadata service at http:\/\/169.254.169.254\/2009-04-04\/meta-data\/instance-id

2011-04-20 09:05:08,878 - DataSourceEc2.py[WARNING]: 09:05:08 [ 1\/100]: http error [500]

2011-04-20 09:05:09,940 - DataSourceEc2.py[WARNING]: 09:05:09 [ 2\/100]: http error [500]

===============

Is this a bug , need I report it ???

Revision history for this message
Hugo Kou (tonytkdk) said :
#8

Solved ~~~

Just forgot to add a iptable rule to match my topology :<

Thanks for your help .....

Revision history for this message
Vish Ishaya (vishvananda) said :
#9

Yes, you need an s3 objectstore if you want to use euca-upload-bundle or uec-publish-tarball.
nova-objectstore is just an ultra-simple s3 implementation for development.

Vish

On Apr 20, 2011, at 1:20 AM, Hugo Kou wrote:

> Question #153430 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/153430
>
> Status: Answered => Solved
>
> Hugo Kou confirmed that the question is solved:
> Thanks Jay .... I success with Glance..!
>
> But I found that I have to keep nova-objectstore service running , or my
> glance will failed to upload image...
>
> as follow's error
> ================================
>
> Wed Apr 20 16:17:06 CST 2011: ====== extracting image ======
> kernel : ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz
> ramdisk: ttylinux-uec-amd64-12.1_2.6.35-22_1-initrd
> image : ttylinux-uec-amd64-12.1_2.6.35-22_1.img
> Wed Apr 20 16:17:07 CST 2011: ====== bundle/upload kernel ======
> Traceback (most recent call last):
> File "/usr/bin/euca-upload-bundle", line 262, in <module>
> main()
> File "/usr/bin/euca-upload-bundle", line 240, in main
> bucket_instance = ensure_bucket(conn, bucket, canned_acl)
> File "/usr/bin/euca-upload-bundle", line 95, in ensure_bucket
> bucket_instance = connection.get_bucket(bucket)
> File "/usr/lib/pymodules/python2.7/boto/s3/connection.py", line 275, in get_bucket
> rs = bucket.get_all_keys(headers, maxkeys=0)
> File "/usr/lib/pymodules/python2.7/boto/s3/bucket.py", line 204, in get_all_keys
> headers=headers, query_args=s)
> File "/usr/lib/pymodules/python2.7/boto/s3/connection.py", line 342, in make_request
> data, host, auth_path, sender)
> File "/usr/lib/pymodules/python2.7/boto/connection.py", line 461, in make_request
> return self._mexe(method, path, data, headers, host, sender)
> File "/usr/lib/pymodules/python2.7/boto/connection.py", line 439, in _mexe
> raise e
> socket.error: [Errno 111] Connection refused
> failed to upload bundle to test1/ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz.manifest.xml
> failed: euca-upload-bundle --bucket test1 --manifest /tmp/uec-publish-image.pkwaIT/ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz.manifest.xml
> Checking bucket: test1failed to upload kernel
> ===========================================
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
Hugo Kou (tonytkdk) said :
#10

Thanks Vish for you answer

So that means if upload image through glance CLI tool as the link , nova-objectstore is no need to alive anymore :)
http://glance.openstack.org/glance.html

A little additional question :

What if I want to resize image , is same way as eucalyptus? or any other approaches ?
There's my method before on Eucalyptus
=============
tar -zxvf old.tar.gz
dd if=/dev/zero of=new.img bs=1G count=10
dd if=old.img of=new.img conv=notrunc
losetup -a #ensure loop0 is free for using
losetup /dev/loop0 new.img
e2fsck -f /dev/loop0
resize2fs /dev/loop0
cp new.img old.img ; rm new.img
tar -zcv -f newname.tar.gz
uec-publish-tarball newname.tar.gz <bucket> x_64
=============

Thanks

HugoKuo

Revision history for this message
Hugo Kou (tonytkdk) said :
#11

I try to follow the Glance CLI tool to upload a tty-image.

#glance add "ttytest" is_public=true < ~/<ttylinux-uec-amd64_image_name.tar.gz

It's been uploaded success and show in "#glance index" list

but how to start up an instance with this image?

I try to euca-run-instance ,it's in running status , but without any information by euca-get-console-output.......

Revision history for this message
Best Vish Ishaya (vishvananda) said :
#12

you have to unpack and register the kernel and ramdisk separately and add some metadata for this to work.

Let me suggest two alternate approaches:

start nova-objectstore
. novarc
uec-publish-tarball ~/<ttylinux-uec-amd64_image_name.tar.gz

OR

mkdir images
cd images
wget http://images.ansolabs.com/tty.tgz
tar -zxvf tty.tgz
nova-manage image convert /path/to/images

Vish

On Apr 20, 2011, at 11:26 AM, Hugo Kou wrote:

> Question #153430 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/153430
>
> Hugo Kou gave more information on the question:
> I try to follow the Glance CLI tool to upload a tty-image.
>
> #glance add "ttytest" is_public=true < ~/<ttylinux-uec-
> amd64_image_name.tar.gz
>
> It's been uploaded success and show in "#glance index" list
>
> but how to start up an instance with this image?
>
> I try to euca-run-instance ,it's in running status , but without any
> information by euca-get-console-output.......
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
Hugo Kou (tonytkdk) said :
#13

Dear Vish

everything Works fine.........:>

I always first approach , but I like to try something different :)

Thanks got to close this Q&A ticket

Hugo Kuo

Revision history for this message
Hugo Kou (tonytkdk) said :
#14

Thanks Vish Ishaya, that solved my question.