Re: [one-users] Live migrate failed

2011-04-13 Thread Daniel Nilsson
Hi Jeff!

On 12 apr 2011, at 10.25, Jeff wrote:

 Hi, all. I am testing the live migrate function of opennebula. But it 
 seemed that it didn't work on my machine.So I checked the vm log and 
 found this error information :
 
 Tue Apr 12 14:56:07 2011 [LCM][I]: New VM state is MIGRATE
 Tue Apr 12 14:56:07 2011 [VMM][I]: Command execution fail: 'if [ -x 
 /var/tmp/one/vmm/kvm/migrate ]; then /var/tmp/one/vmm/kvm/migrate 
 one-67 cloudlabnc1; else  exit 42; fi'
 Tue Apr 12 14:56:07 2011 [VMM][I]: STDERR follows.
 Tue Apr 12 14:56:07 2011 [VMM][I]: error: Cannot access CA certificate 
 '/etc/pki/CA/cacert.pem': No such file or directory
 Tue Apr 12 14:56:07 2011 [VMM][I]: ExitCode: 1
 Tue Apr 12 14:56:07 2011 [VMM][E]: Error live-migrating VM, error: 
 Cannot access CA certificate '/etc/pki/CA/cacert.pem': No such file or 
 directory
 Tue Apr 12 14:56:08 2011 [LCM][I]: Fail to life migrate VM. Assuming 
 that the VM is still RUNNING (will poll VM).
 Tue Apr 12 14:56:08 2011 [VMM][D]: Monitor Information:
 
 Could anyone please give me any advice ?

Basically you need to setup up some client server certificates on your 
onehosts. Detailed instructions on how to do this can be found here:

http://wiki.libvirt.org/page/TLSSetup

Best regards
Daniel 

 Best Regards
 Jeff
 ___
 Users mailing list
 Users@lists.opennebula.org
 http://lists.opennebula.org/listinfo.cgi/users-opennebula.org



smime.p7s
Description: S/MIME cryptographic signature
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] how to predeploy image

2011-04-13 Thread Carlos Martín Sánchez
Hi Łukasz,

You could use the tm_dummy driver. That tm script returns always 0 and does
nothing else.
But using that tm_driver, you will have to manually move the files for all
VMs, not just some of them.

It would be best if you could modify the driver (tm_clone.sh, look for it in
your lib location) to issue the mkdir and scp commands only if the
destination file is not already present. It should be pretty
straight-forward.

Regards,
Carlos.
--
Carlos Martín, MSc
Project Major Contributor
OpenNebula - The Open Source Toolkit for Cloud Computing
www.OpenNebula.org http://www.opennebula.org/ | cmar...@opennebula.org


2011/4/12 Łukasz Grabowski grabb...@gmail.com

 Hi,

 I am using OpenNebula 1.4 and Haizea 1.0. I want to predeploy an image so
 that the VM could start at the scheduled by haizea time.
 How can I predeploy a VM's image? I would appreciate clarification.

 I had several ideas how to make it work but I didn't succeed.
 1. I tried to copy a prepared image to the default directory
 (/var/lib/one/VM-id/images/) in which it should be stored when a new VM is
 created.
 2. Then I tried to do the same and to create transfer.0.prolog file (after
 reading one of the generated by opennebula) but it didn't work.
 3. I tried even set the source in DISK section in VM template to the copied
 file in the destination.
 However, everytime I can see in VM log, that the image is copied.

 I am enclosing VM log and VM template
 Tue Apr 12 19:46:59 2011 [DiM][I]: New VM state is ACTIVE.
 Tue Apr 12 19:46:59 2011 [LCM][I]: New VM state is PROLOG.
 Tue Apr 12 19:48:44 2011 [TM][I]: tm_clone.sh:
 debian:/var/lib/one/50/images/disk.0 194.29.169.42:
 /var/lib/one//50/images/disk.0
 Tue Apr 12 19:48:44 2011 [TM][I]: tm_clone.sh: DST:
 /var/lib/one//50/images/disk.0
 Tue Apr 12 19:48:44 2011 [TM][I]: tm_clone.sh: Creating directory
 /var/lib/one//50/images
 Tue Apr 12 19:48:44 2011 [TM][I]: tm_clone.sh: Executed ssh 194.29.169.42
 mkdir -p /var/lib/one//50/images.
 Tue Apr 12 19:48:44 2011 [TM][I]: tm_clone.sh: Cloning
 debian:/var/lib/one/50/images/disk.0
 Tue Apr 12 19:48:44 2011 [TM][I]: tm_clone.sh: Executed scp
 debian:/var/lib/one/50/images/disk.0 194.29.169.42:
 /var/lib/one//50/images/disk.0.
 Tue Apr 12 19:48:44 2011 [TM][I]: tm_clone.sh: Executed ssh 194.29.169.42
 chmod a+w /var/lib/one//50/images/disk.0.
 Tue Apr 12 19:48:46 2011 [TM][I]: tm_mkswap.sh: Creating 1024Mb image in
 /var/lib/one//50/images/disk.1
 Tue Apr 12 19:48:46 2011 [TM][I]: tm_mkswap.sh: Executed ssh 194.29.169.42
 mkdir -p /var/lib/one//50/images.
 Tue Apr 12 19:48:46 2011 [TM][I]: tm_mkswap.sh: Executed ssh 194.29.169.42
 dd if=/dev/zero of=/var/lib/one//50/images/disk.1 bs=1 count=1 seek=1024M.
 Tue Apr 12 19:48:46 2011 [TM][I]: tm_mkswap.sh: Initializing swap space
 Tue Apr 12 19:48:46 2011 [TM][I]: tm_mkswap.sh: Executed ssh 194.29.169.42
 /sbin/mkswap /var/lib/one//50/images/disk.1.
 Tue Apr 12 19:48:46 2011 [TM][I]: tm_mkswap.sh: Executed ssh 194.29.169.42
 chmod a+w /var/lib/one//50/images/disk.1.
 Tue Apr 12 19:48:46 2011 [TM][I]: tm_context.sh: Executed mkdir -p
 /var/c8f990f3e542b79b3bb691c6c20a2684/isofiles.
 Tue Apr 12 19:48:46 2011 [TM][I]: tm_context.sh: Executed cp -R
 /var/lib/one/50/context.sh /var/c8f990f3e542b79b3bb691c6c20a2684/isofiles.
 Tue Apr 12 19:48:46 2011 [TM][I]: tm_context.sh: Executed cp -R
 /srv/cloud/vm_contextualization/id_rsa.pub
 /var/c8f990f3e542b79b3bb691c6c20a2684/isofiles.
 Tue Apr 12 19:48:46 2011 [TM][I]: tm_context.sh: Executed cp -R
 /srv/cloud/vm_contextualization/init.sh
 /var/c8f990f3e542b79b3bb691c6c20a2684/isofiles.
 Tue Apr 12 19:48:46 2011 [TM][I]: tm_context.sh: Executed mkisofs -o
 /var/c8f990f3e542b79b3bb691c6c20a2684/disk.2 -J -R
 /var/c8f990f3e542b79b3bb691c6c20a2684/isofiles.
 Tue Apr 12 19:48:46 2011 [TM][I]: tm_context.sh: Executed scp
 /var/c8f990f3e542b79b3bb691c6c20a2684/disk.2 194.29.169.42:
 /var/lib/one//50/images/disk.2.
 Tue Apr 12 19:48:46 2011 [TM][I]: tm_context.sh: Executed rm -rf
 /var/c8f990f3e542b79b3bb691c6c20a2684.
 Tue Apr 12 19:48:46 2011 [LCM][I]: New VM state is BOOT
 Tue Apr 12 19:48:46 2011 [VMM][I]: Generating deployment file:
 /var/lib/one/50/deployment.0
 Tue Apr 12 19:48:52 2011 [LCM][I]: New VM state is RUNNING
 Tue Apr 12 19:48:59 2011 [LCM][I]: New VM state is SHUTDOWN
 Tue Apr 12 19:49:05 2011 [LCM][I]: New VM state is EPILOG
 Tue Apr 12 19:49:07 2011 [TM][I]: tm_delete.sh: Deleting
 /var/lib/one//50/images
 Tue Apr 12 19:49:07 2011 [TM][I]: tm_delete.sh: Executed ssh 194.29.169.42
 rm -rf /var/lib/one//50/images.
 Tue Apr 12 19:49:07 2011 [DiM][I]: New VM state is DONE




 VM template
 ---
 NAME = debian-context

 CPU= 1
 MEMORY = 512

 # --- kernel  boot device ---

 OS = [
   kernel   = /boot/vmlinuz-2.6.32-5-xen-amd64,
   initrd   = /boot/initrd.img-2.6.32-5-xen-amd64,
   root = xvda2 ]

 DISK = [
   source   = /var/lib/one/50/images/disk.0,
   target   = xvda2,
   readonly = no 

Re: [one-users] file template of onevm

2011-04-13 Thread Héctor Sanjuán
I suppose there is an image with name KVM registered in ONE?. It
should show up with oneimage list.

Hector

El 13/04/11 12:32, Marco Mirabile escribió:
 hello
 I have a question about the template file onevm
 
 can you tell me if it is correct?
 in time to create a VMs I have this error
 
 
 oneadmin@mobile:~$ cat kvmHVM 
 REQUIREMENTS = HYPERVISOR=\kvm\
 NAME = KVM
 CPU = 1
 MEMORY = 512
 DISK = [ image = KVM ]
 OS = [ boot = hd ]
 GRAPHICS=[type = vnc,
 listen =127.0.0.1,
 port =5910,
 keymap= es]
 oneadmin@mobile:~$ onevm create kvmHVM 
 Error: [VirtualMachineAllocate] Error trying to CREATE VM Could not
 get disk image for VM.
 oneadmin@mobile:~$ 
 
 
 
 
 ___
 Users mailing list
 Users@lists.opennebula.org
 http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


-- 
Héctor Sanjuan
OpenNebula.org
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


[one-users] Opennebula 2.2 Sunstone problem

2011-04-13 Thread Sebastian Neg
Hi,

I installed Opennebula 2.2 on CentOS 5.5 and i am trying to configure
Sunstone. When i run:
/srv/cloud/one/bin/sunstone-server start
Stale  .lock detected.Erasing it.
sunstone-server started

But i can not access to the url where my Sunstone server is deployed
localhost:4567
Any thoughts as to where I might have gone wrong?

Thanks
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] Problem with ebtables OpenNebula

2011-04-13 Thread Tino Vazquez
Hi,

It is recommended to run OpenNebula as a non-root account, please
install the dependencies as oneadmin.

Regards,

-T

--
Constantino Vázquez Blanco, MSc
OpenNebula Major Contributor
www.OpenNebula.org | @tinova79



On Tue, Apr 12, 2011 at 9:10 PM, Leong Marco leong.chou@usj.edu.mo wrote:
 Tino,
 I have installed rubygems. However, it is able to run in root, not oneadmin.
 Leong Marco
 leong.chou@usj.edu.mo


 On Apr 12, 2011, at 5:22 PM, Tino Vazquez wrote:

 Hi,

 You need to install the rubygems dependency, the process varies
 depending on the linux distro used.

 Regards,

 -Tino

 --
 Constantino Vázquez Blanco, MSc
 OpenNebula Major Contributor
 www.OpenNebula.org | @tinova79



 On Tue, Apr 12, 2011 at 2:17 AM, Leong Marco leong.chou@usj.edu.mo
 wrote:

 [oneadmin@geek ~]$ ruby -dw /usr/lib/one/mads/one_auth_mad.rb

 Exception `LoadError' at /usr/lib/one/mads/one_auth_mad.rb:33 - no such file

 to load -- rubygems

 /usr/lib/one/mads/one_auth_mad.rb:33:in `require': no such file to load --

 rubygems (LoadError)

 from /usr/lib/one/mads/one_auth_mad.rb:33

 here is the output.

 Leong Marco

 leong.chou@usj.edu.mo


 On Apr 11, 2011, at 11:06 PM, Tino Vazquez wrote:

 Ok, please try

 $ ruby -dw $ONE_LOCATION/lib/mads/one_auth_mad.rb

 and send the output

 Regards,

 -Tino

 --

 Constantino Vázquez Blanco, MSc

 OpenNebula Major Contributor

 www.OpenNebula.org | @tinova79



 On Mon, Apr 11, 2011 at 4:59 PM, Leong Marco leong.chou@usj.edu.mo

 wrote:

 Hi,

 It return the shell.

 Best regards.

 Leong Marco

 leong.chou@usj.edu.mo


 On Apr 11, 2011, at 10:54 PM, Tino Vazquez wrote:

 Hi,

 What happens, does it return the shell, or does it wait for input?

 Regards,

 -Tino

 --

 Constantino Vázquez Blanco, MSc

 OpenNebula Major Contributor

 www.OpenNebula.org | @tinova79



 On Mon, Apr 11, 2011 at 4:49 PM, Leong Marco leong.chou@usj.edu.mo

 wrote:

 Hi Tino,

 Thank you for your reply.

 This command doesn't produce any output.

 Leong Marco

 leong.chou@usj.edu.mo


 On Apr 11, 2011, at 10:20 PM, Tino Vazquez wrote:

 Dear Leong,

 Please try the following as oneadmin, and send the output:

 # $ONE_LOCATION/lib/mads/one_auth_mad

 Regards,

 .Tino


 --

 Constantino Vázquez Blanco, MSc

 OpenNebula Major Contributor

 www.OpenNebula.org | @tinova79



 On Mon, Apr 11, 2011 at 3:49 PM, Leong Marco leong.chou@usj.edu.mo

 wrote:

 Dear Tino,

 Yes, I did have this error in the log.

 Mon Apr 11 15:13:09 2011 [MAD][E]: MAD did not answer INIT command

 What is the problem happen here? Thank you for your help !

 Leong Marco

 leong.chou@usj.edu.mo


 On Apr 11, 2011, at 8:55 PM, Tino Vazquez wrote:

 Dear Leong, Marwen,

 If you are experiencing the following in the logs

 Fri Apr  8 11:59:05 2011 [MAD][E]: MAD did not answer INIT command

 it may be due to a missing dependency, we can walk you on finding out which

 one.

 Otherwise, please say so and we will look at other possible causes.

 Regards,

 -Tino

 --

 Constantino Vázquez Blanco | dsa-research.org/tinova

 Virtualization Technology Engineer / Researcher

 OpenNebula Toolkit | opennebula.org



 On Mon, Apr 11, 2011 at 9:13 AM, Leong Marco leong.chou@usj.edu.mo

 wrote:

 Hi,

 I have the same problem as Marwen. With this log message.

 Mon Apr 11 14:50:26 2011 [TM][I]: tm_context.sh: Executed rm -rf

 /var/lib/one/2603e38607a144aef3bef07283d77095.

 Mon Apr 11 14:50:26 2011 [LCM][I]: New VM state is BOOT

 Mon Apr 11 14:50:26 2011 [VMM][I]: Generating deployment file:

 /var/lib/one/165/deployment.1

 Mon Apr 11 14:50:28 2011 [LCM][I]: New VM state is RUNNING

 Mon Apr 11 14:50:28 2011 [HKM][I]: Hook ebtables-start successfully

 executed.

 However, if I do a list to ebtables, it is empty.

 [oneadmin@geek root]$ sudo ebtables --list

 Bridge table: filter

 Bridge chain: INPUT, entries: 0, policy: ACCEPT

 Bridge chain: FORWARD, entries: 0, policy: ACCEPT

 Bridge chain: OUTPUT, entries: 0, policy: ACCEPT

 When I run some ebtables command like this one, it works

 sudo ebtables -A FORWARD -p IPv4 -j ACCEPT

 this does add the rules to the table.

 What can I provide to help you to debug this problem?

 Leong Marco

 leong.chou@usj.edu.mo


 On Apr 7, 2011, at 9:46 PM, marwen marwen wrote:

 Hi Zaina

 Yes I added oneadmin in the sudoers file of the physical host where the VM

 is allocated.

 And when I create the VM I specify the host where the VM will be allocated.

 But the problem is not resolved.

 Do you think that we must add this command in sudoers file of all cluster

 nodes.

 oneadmin    ALL=(ALL) NOPASSWD: /sbin/ebtables *

 Best regards

 Marwen

 From: Zaina AFOULKI zaina.afou...@ensi-bourges.fr

 To: users@lists.opennebula.org

 Subject: Re: [one-users] Problem with ebtables OpenNebula

 Message-ID: 4d9cb10c.6080...@ensi-bourges.fr

 Content-Type: text/plain; charset=ISO-8859-1

 Hi Marwen,

 Did you make sure that oneadmin is added in the /etc/sudoers 

[one-users] autscaling

2011-04-13 Thread Zeeshan Ali Shah
Hi ,
What are the ways to auto scaling (Elastic) functionality in ONE ?  I think
we can leverage hooks for this .. any suggestion ?

-- 

-- 
Regards

Zeeshan Ali Shah
System Administrator
PDC-Center for High Performance Computing
KTH-Royal Institute of Technology , Sweden
+46 8 790 9115
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] sunstone auth problem

2011-04-13 Thread Robert Parrott
Sure, here it is:

[oneadmin ~]$ oneuser list -x
USER_POOL
  USER
ID0/ID
NAMEoneadmin/NAME
PASSWORD5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8/PASSWORD
ENABLED1/ENABLED
  /USER
  USER
ID1/ID
NAMEtestuser/NAME
PASSWORD5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8/PASSWORD
ENABLED1/ENABLED
  /USER
/USER_POOL



[oneadmin ~]$ cat /var/log/one/sunstone.log
/usr/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/server.rb:228:
warning: parenthesize argument(s) for future version
/usr/lib/one/sunstone/models/OpenNebulaJSON.rb:35: warning:
parenthesize argument(s) for future version
10.243.18.28 - - [13/Apr/2011 13:45:03] GET /login HTTP/1.1 200 1524 0.0020
10.243.18.28 - - [13/Apr/2011 13:45:03] GET /login HTTP/1.1 200 1524 0.0680
10.243.18.28 - - [13/Apr/2011 13:45:03] GET /js/opennebula.js
HTTP/1.1 304 - 0.0040
10.243.18.28 - - [13/Apr/2011 13:45:03] GET /js/opennebula.js
HTTP/1.1 304 - 0.0094
10.243.18.28 - - [13/Apr/2011 13:45:03] GET /js/login.js HTTP/1.1 304 - 0.0021
10.243.18.28 - - [13/Apr/2011 13:45:03] GET /js/login.js HTTP/1.1 304 - 0.0041
10.243.18.28 - - [13/Apr/2011 13:45:03] GET /css/login.css HTTP/1.1
304 - 0.0020
10.243.18.28 - - [13/Apr/2011 13:45:03] GET /css/login.css HTTP/1.1
304 - 0.0039
10.243.18.28 - - [13/Apr/2011 13:45:03] GET
/vendor/jQuery/jquery-1.4.4.min.js HTTP/1.1 304 - 0.0020
10.243.18.28 - - [13/Apr/2011 13:45:03] GET
/vendor/jQuery/jquery-1.4.4.min.js HTTP/1.1 304 - 0.0740
10.243.18.28 - - [13/Apr/2011 13:45:03] GET /images/login.png
HTTP/1.1 304 - 0.
10.243.18.28 - - [13/Apr/2011 13:45:03] GET /images/login.png
HTTP/1.1 304 - 0.0107
10.243.18.28 - - [13/Apr/2011 13:45:03] GET
/images/opennebula-sunstone-big.png HTTP/1.1 304 - 0.0019
10.243.18.28 - - [13/Apr/2011 13:45:03] GET
/images/opennebula-sunstone-big.png HTTP/1.1 304 - 0.0060
10.243.18.28 - - [13/Apr/2011 13:45:03] GET /images/panel.png
HTTP/1.1 304 - 0.0020
10.243.18.28 - - [13/Apr/2011 13:45:03] GET /images/panel.png
HTTP/1.1 304 - 0.0040
10.243.18.28 - - [13/Apr/2011 13:45:13] POST /login HTTP/1.1 401 - 0.0240
10.243.18.28 - - [13/Apr/2011 13:45:13] POST /login HTTP/1.1 401 - 0.0280
10.243.18.28 - - [13/Apr/2011 13:45:29] POST /login HTTP/1.1 401 - 0.0160
10.243.18.28 - - [13/Apr/2011 13:45:29] POST /login HTTP/1.1 401 - 0.0180


On Wed, Apr 13, 2011 at 10:29 AM, Daniel Molina dmol...@opennebula.org wrote:
 Would you mind to send us the output of oneuser list -x and the
 sunstone.log file inside the ONE var directory.

 On 13 April 2011 16:16, Robert Parrott parr...@seas.harvard.edu wrote:
 Both sunserver and oned are running as the oneadmin user, and the command

 oneuser list

 works and lists the users. The sha1 hash matches that of the hashed
 password in the sunstone server code.

 So it seems like it's on the the oned end of things.

 On Wed, Apr 13, 2011 at 4:03 AM, Daniel Molina dmol...@opennebula.org 
 wrote:
 Hi,

 Did you start the service as oneadmin?
 if you run oneuser list, are all the users listed with their passowrds?

 Hope this helps.

 On 13 April 2011 05:44, Robert Parrott parr...@seas.harvard.edu wrote:
 Hi,

 Trying to test out OpenNebula with sunstone, and am unable to
 authorize through sunstone. A little debugging shows that calling the
 UserPool method for the user returns an empty password hash.

 I see in the logs that oned reports that a method is executed:

   Tue Apr 12 23:41:25 2011 [ReM][D]: UserPoolInfo method invoked

 but the call returns nil in the sunstone code.

 I can otherwise authenticate from the command ,ine using the typical
 ~/.one/one_auth file.

 Any thoughts about what to look for to resolve this?


 Thanks,
 rob



 --
 Robert E. Parrott, Ph.D. (Phys. '06)
 Director, Academic and Research Computing
 Harvard University Sch. of Eng. and App. Sci.
 Maxwell-Dworkin  211,
 33 Oxford St.
 Cambridge, MA 02138
 (617)-496-1520
 ___
 Users mailing list
 Users@lists.opennebula.org
 http://lists.opennebula.org/listinfo.cgi/users-opennebula.org




 --
 Daniel Molina, Cloud Technology Engineer/Researcher
 Major Contributor
 OpenNebula - The Open Source Toolkit for Cloud Computing
 www.OpenNebula.org | dmol...@opennebula.org




 --
 Robert E. Parrott, Ph.D. (Phys. '06)
 Director, Academic and Research Computing
 Harvard University Sch. of Eng. and App. Sci.
 Maxwell-Dworkin  211,
 33 Oxford St.
 Cambridge, MA 02138
 (617)-496-1520




 --
 Daniel Molina, Cloud Technology Engineer/Researcher
 Major Contributor
 OpenNebula - The Open Source Toolkit for Cloud Computing
 www.OpenNebula.org | dmol...@opennebula.org




-- 
Robert E. Parrott, Ph.D. (Phys. '06)
Director, Academic and Research Computing
Harvard University Sch. of Eng. and App. Sci.
Maxwell-Dworkin  211,
33 Oxford St.
Cambridge, MA 02138
(617)-496-1520
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] sunstone auth problem

2011-04-13 Thread Robert Parrott
I've added some debugging to the sunstone, and see the following behavior.

1) In the build-session method of the sunstone-server.rb, the username
and password are properly passwd into the server, and the SHA1 hash
calculated is what is expected.

2) In the SunstoneServer.authorize() method in the file
SunstoneServer.rb, the username and  sha1 hash are passed into the
method properly, but the query to the UserPool object,

   user_pass = user_pool[USER[NAME=\#{user}\]/PASSWORD]

returns nil.

Thus it is the communication with the oned where the problem lies.

3) In the oned.log file, I see that the method UserPoolInfo method is
executed as soon as there is a login attempt from sunstone:

== /var/log/one/oned.log ==
Wed Apr 13 14:11:06 2011 [ReM][D]: UserPoolInfo method invoked



I've wiped the installation and reinstalled afresh, but with the same
error. The system is a CentOS 5.5 installation, ruby v1.8.5.


Thanks,
rob
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] sunstone auth problem

2011-04-13 Thread Robert Parrott
Hi Folks,

A little more investigation, and I've confirmed that the issue is with
the sunstone code or with some sort of XML parsing issues,

I can call the to_xml method on the user_pool object (again in
SunstoneServer.authorize() method of file SunstoneServer.rb), and I
see the proper XML output, the same as if I execute oneuser list -x
on the command line. So the data is there in sunstone.

However, the query on the XML returns nil when in fact the user is
there. I.e. in the sunstone source referred to above, the line

  user_pass = user_pool[USER[NAME=\#{user}\]/PASSWORD]

returns nil whether or not the data is correct and present. So it
seems that the XPath query, or the XML query library is broken.

Here's an example of a session, with tons of debugging thrown in:

user = testuser
sha1_pass = 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8
user_pool.info = nil
user_pass = nil
user_pool = #OpenNebula::UserPool:0x2b6281b765d8
UserPool methods =
mapmethodsinstance_evalany?to_setsortdupmininstance_variablesinclude?instance_of?to_yaml_propertiesextenddclonepretty_inspecteql?namefind_alleachpretty_print_cycleto_jsonhashidsingleton_methodseach_elementinjecttaintsort_byinstance_variable_getfrozen?has_elements?pretty_printmaxkind_of?methodselectto_adisplayto_xmltypeinitialize_xmlprotected_methodsto_strpartitionpretty_print_inspectgrepinstance_variable_settextis_a?respond_to?to_srejectattrobject_idclassprivate_methods==tainted?__id__===member?to_hashuntaintnil?template_strfindeach_with_indextaguriinspectsendcollectall?pretty_print_instance_variablesinfo=~clonetaguri=retrieve_elementsentriespublic_methods__send__freezeequal?template_like_strdetectfactoryzip[]to_yamlto_yaml_style
user_pool as XML = USER_POOL
  USER
ID0/ID
NAMEoneadmin/NAME
PASSWORD5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8/PASSWORD
ENABLED1/ENABLED
  /USER
  USER
ID1/ID
NAMEtestuser/NAME
PASSWORD5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8/PASSWORD
ENABLED1/ENABLED
  /USER
/USER_POOL
USER object static string =
0oneadmin5baa61e4c9b93f3f0682250b6cf8331b7ee68fd811testuser5baa61e4c9b93f3f0682250b6cf8331b7ee68fd81
USER/NAME  = oneadmintestuser
USER/PASSWORD  =
5baa61e4c9b93f3f0682250b6cf8331b7ee68fd85baa61e4c9b93f3f0682250b6cf8331b7ee68fd8
USER/ID = 01
USER[NAME=testuser] = nil

Assuming that the query is correct, I guess there's an issue in a
parser library. Further input is greatly appreciated.

Rob





On Wed, Apr 13, 2011 at 2:21 PM, Robert Parrott
parr...@seas.harvard.edu wrote:
 I've added some debugging to the sunstone, and see the following behavior.

 1) In the build-session method of the sunstone-server.rb, the username
 and password are properly passwd into the server, and the SHA1 hash
 calculated is what is expected.

 2) In the SunstoneServer.authorize() method in the file
 SunstoneServer.rb, the username and  sha1 hash are passed into the
 method properly, but the query to the UserPool object,

   user_pass = user_pool[USER[NAME=\#{user}\]/PASSWORD]

 returns nil.

 Thus it is the communication with the oned where the problem lies.

 3) In the oned.log file, I see that the method UserPoolInfo method is
 executed as soon as there is a login attempt from sunstone:

 == /var/log/one/oned.log ==
 Wed Apr 13 14:11:06 2011 [ReM][D]: UserPoolInfo method invoked



 I've wiped the installation and reinstalled afresh, but with the same
 error. The system is a CentOS 5.5 installation, ruby v1.8.5.


 Thanks,
 rob




-- 
Robert E. Parrott, Ph.D. (Phys. '06)
Director, Academic and Research Computing
Harvard University Sch. of Eng. and App. Sci.
Maxwell-Dworkin  211,
33 Oxford St.
Cambridge, MA 02138
(617)-496-1520
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org