Re: [one-users] [OVS] Problem with OpenVSwitch and some questions about Ceph

2013-03-31 Thread Jon
Hello Jamie,

Thanks for getting back to me, I apologize for the delayed response but
I've been in the middle of a move.

 I'll separate each topic in different messages, so we can continue
separate sub-threads per topic
Thanks for that.  I didn't want to spam the list with three separate
replies, this works.

 Could you do the following right after the VM has been started?
sudo ovs-ofctl dump-ports ovsbr0 vnet1

sure, I wrapped that in a loop for easy copy paste, then I started this,
then attempted to create a new VM.

All I get is an error ovs-ofctl: ovsbr0: couldn't find port `vnet1'
repeatedly.

 root@loki:~# perl -e 'while(1){ `ovs-ofctl dump-ports ovsbr0 vnet1`;
sleep(3)}'
 ovs-ofctl: ovsbr0: couldn't find port `vnet1'
 ovs-ofctl: ovsbr0: couldn't find port `vnet1'
 ...
 ovs-ofctl: ovsbr0: couldn't find port `vnet1'

Here's the log from the transaction,

 Fri Mar 29 11:16:46 2013 [DiM][I]: New VM state is ACTIVE.
 Fri Mar 29 11:16:46 2013 [LCM][I]: New VM state is PROLOG.
 Fri Mar 29 11:16:46 2013 [VM][I]: Virtual Machine has no context
 Fri Mar 29 11:18:14 2013 [LCM][E]: monitor_done_action, VM in a wrong
state
 Fri Mar 29 11:23:20 2013 [LCM][E]: monitor_done_action, VM in a wrong
state
 Fri Mar 29 11:28:29 2013 [LCM][E]: monitor_done_action, VM in a wrong
state
 Fri Mar 29 11:29:06 2013 [TM][I]: clone: Cloning
/var/lib/one/datastores/1/68204b0b2e950587e337ebc7cbe4243e in
loki:/var/lib/one//datastores/0/35/disk.0
 Fri Mar 29 11:29:06 2013 [TM][I]: ExitCode: 0
 Fri Mar 29 11:29:06 2013 [LCM][I]: New VM state is BOOT
 Fri Mar 29 11:29:06 2013 [VMM][I]: Generating deployment file:
/var/lib/one/vms/35/deployment.0
 Fri Mar 29 11:29:09 2013 [VMM][I]: ExitCode: 0
 Fri Mar 29 11:29:09 2013 [VMM][I]: Successfully execute network driver
operation: pre.
 Fri Mar 29 11:29:12 2013 [VMM][I]: ExitCode: 0
 Fri Mar 29 11:29:12 2013 [VMM][I]: Successfully execute virtualization
driver operation: deploy.
 Fri Mar 29 11:29:12 2013 [VMM][I]: Command execution fail:
/var/tmp/one/vnm/ovswitch/post

Re: [one-users] [OVS] Problem with OpenVSwitch and some questions about Ceph

2013-03-28 Thread Jaime Melis
Hi Jon,

thanks for your feedback! it really helps us. I'll separate each topic in
different messages, so we can continue separate sub-threads per topic

1) OVS

So, it's normal that you got this error:
 [TemplateInstantiate] Error allocating a new virtual machine. Cannot get
IP/MAC lease from virtual network 0.
if no LEASES where defined. An empty network is similar to a network where
all the leases are taken, so this is expected behaviour.

However, the other error message is a bit more worrying. It looks like
there is a bug. The bit of code that's failing is this one [1], the port
method. Apparently the dump-ports command is failing. Could you do the
following right after the VM has been started?

sudo ovs-ofctl dump-ports ovsbr0 vnet1

and see what happens?



On Thu, Mar 28, 2013 at 1:06 PM, Jon three1...@gmail.com wrote:

 Hello All,

 I've just installed OpenNebula 3.9.80 and I have to say this is
 amazing.  Everything works so smoothly.

 Anyway, down to business.

 OpenVSwitch:

 I've installed and configured OpenVSwitch and am able to manually add
 the OVS config using libvirt, then launch a VM,

   interface type='bridge'
 source bridge='ovsbr0'/
 virtualport type='openvswitch'
 /virtualport
 model type='virtio'/
 address type='pci' domain='0x' bus='0x00' slot='0x05'
 function='0x0'/
   /interface

 Which creates the device in ovs:

   system@ovsbr0:
   lookups: hit:1346333 missed:46007 lost:0
   flows: 8
   port 0: ovsbr0 (internal)
   port 1: eth0
   port 2: br0 (internal)
   port 7: vnet0


 However, when I attempt to create a virtual network without assigning
 an IP and instantiate the template I get the error:

  [TemplateInstantiate] Error allocating a new virtual machine. Cannot
 get IP/MAC lease from virtual network 0.

 The template of the virtual network is:

  oneadmin@loki:~$ onevnet show testnet1
   VIRTUAL NETWORK 0 INFORMATION
   ID : 0
   NAME   : testnet1
   USER   : oneadmin
   GROUP  : oneadmin
   CLUSTER: -
   TYPE   : FIXED
   BRIDGE : ovsbr0
   VLAN   : No
   USED LEASES: 0
 
   PERMISSIONS
   OWNER  : um-
   GROUP  : ---
   OTHER  : ---
 
   VIRTUAL NETWORK TEMPLATE
 
 
   VIRTUAL MACHINES
 

 If I add an IP to the vnet, I get the following template and error
 logs (full vm log attached, I think I've identified the relevant
 line):

  Thu Mar 28 10:34:05 2013 [VMM][E]: post: Command sudo
 /usr/bin/ovs-ofctl add-flow ovsbr0
 in_port=,dl_src=02:00:44:47:83:43,priority=4,actions=normal failed.

   oneadmin@loki:~$ onevnet show testnet1
   VIRTUAL NETWORK 0 INFORMATION
   ID : 0
   NAME   : testnet1
   USER   : oneadmin
   GROUP  : oneadmin
   CLUSTER: -
   TYPE   : FIXED
   BRIDGE : ovsbr0
   VLAN   : No
   USED LEASES: 1
 
   PERMISSIONS
   OWNER  : um-
   GROUP  : ---
   OTHER  : ---
 
   VIRTUAL NETWORK TEMPLATE
 
 
   USED LEASES
   LEASE=[ MAC=02:00:44:47:83:43, IP=192.168.0.2,
 IP6_LINK=fe80::400:44ff:fe47:8343, USED=1, VID=7 ]
 
   VIRTUAL MACHINES
 
   ID USER GROUPNAMESTAT UCPUUMEM HOST
   TIME
7 oneadmin oneadmin template-4-7fail0  0K
  0d 00h00

   root@loki:~# cat /var/log/openvswitch/ovs-vswitchd.log
   Mar 28 10:34:04|00081|bridge|INFO|created port vnet1 on bridge ovsbr0
   Mar 28 10:34:07|00082|netdev_linux|WARN|ethtool command ETHTOOL_GSET
 on network device vnet1 failed: No such device
   Mar 28 10:34:07|00083|netdev_linux|INFO|ioctl(SIOCGIFHWADDR) on vnet1
 device failed: No such device
   Mar 28 10:34:07|00084|netdev|WARN|failed to get flags for network
 device vnet1: No such device
   Mar 28 10:34:07|00085|netdev|WARN|failed to retrieve MTU for network
 device vnet1: No such device
   Mar 28 10:34:07|00086|netdev|WARN|failed to get flags for network
 device vnet1: No such device
   Mar 28 10:34:07|00087|bridge|INFO|destroyed port vnet1 on bridge ovsbr0

 I attempted to run the command but I never set a password for the
 oneadmin user, but I don't think it's a permissions / sudo access
 problem.

 Not really sure where to look next.  Any ideas are appreciated.

 CEPH:

 I'm trying to use a Ceph datastore with a RBD instead of a cephFS
 (it's an option).
 When I try to create a Ceph datastore with a RBD type, I get a state
 of Error,
 but I'm not sure where to look for relevant logs, oned.log didn't seem
 to have anything,
 or maybe I'm just grepping for the wrong string.

 As a work around, I have been creating the directory, creating the rbd
 then manually mounting it,
 this seems to work in my test environment, but doesn't seem very
 scalable, how are others using CEPH?

 Documentation:

 I've noticed some errors in the documentation, namely the location of
 the install scripts,

 The docs state they are in: