Bug #1895

Error during datastore clone with ceph/rbd

Added by Matthew Richardson about 8 years ago. Updated almost 8 years ago.

Status:ClosedStart date:04/11/2013
Priority:NormalDue date:
Assignee:Jaime Melis% Done:

0%

Category:Drivers - Storage
Target version:Release 4.4
Resolution:fixed Pull request:
Affected Versions:OpenNebula 4.0

Description

I have an rbd datastore configured (one-8)

When I try to create a vm pointing at this datastore:

onevm create --name foo --cpu 1 --memory 512 --nic 7 --disk 8

I receive the following errors:

Thu Apr 11 16:35:36 2013 [DiM][I]: New VM state is ACTIVE.
Thu Apr 11 16:35:36 2013 [LCM][I]: New VM state is PROLOG.
Thu Apr 11 16:35:36 2013 [VM][I]: Virtual Machine has no context
Thu Apr 11 16:35:36 2013 [TM][I]: Command execution fail: /var/lib/one/remotes/tm/ceph/clone example.com:one/one-8 example:/var/lib/one//datastores/0/18/disk.0 18 100
Thu Apr 11 16:35:36 2013 [TM][E]: clone: Command "rbd copy one/one-8 one/one-8-18-0" failed: You must specify a subsystem to invoke.
Thu Apr 11 16:35:36 2013 [TM][I]: usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
Thu Apr 11 16:35:36 2013 [TM][I]: [-D [bind_address:]port] [-e escape_char] [-F configfile]
Thu Apr 11 16:35:36 2013 [TM][I]: [-i identity_file] [-L [bind_address:]port:host:hostport]
Thu Apr 11 16:35:36 2013 [TM][I]: [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
Thu Apr 11 16:35:36 2013 [TM][I]: [-R [bind_address:]port:host:hostport] [-S ctl_path]
Thu Apr 11 16:35:36 2013 [TM][I]: [-W host:port] [-w local_tun[:remote_tun]]
Thu Apr 11 16:35:36 2013 [TM][I]: [user@]hostname [command]
Thu Apr 11 16:35:36 2013 [TM][E]: Error cloning one/one-8 to one/one-8-18-0 in
Thu Apr 11 16:35:36 2013 [TM][I]: ExitCode: 255
Thu Apr 11 16:35:36 2013 [TM][E]: Error executing image transfer script: Error cloning one/one-8 to one/one-8-18-0 in
Thu Apr 11 16:35:36 2013 [DiM][I]: New VM state is FAILED

If I log in as the oneadmin user, and manually do the steps as per /var/lib/one/remotes/tm/ceph/clone (having first done 'source /var/lib/one/remotes/scripts_common.sh':

ssh_exec_and_log example.com "rbd copy one-8 foo" "Error cloning..."

then the rbd image is cloned without this error.

I'm not sure what is causing this problem here - the only potential clue is that this error is returned by ssh if you use the '-s' flag with no subsystem option specified.

History

#1 Updated by Carlos Martín about 8 years ago

  • Assignee set to Jaime Melis

#2 Updated by Ruben S. Montero about 8 years ago

  • Target version set to Release 4.0

#3 Updated by Ruben S. Montero about 8 years ago

  • Category set to Drivers - Storage

#4 Updated by Ruben S. Montero about 8 years ago

  • Target version changed from Release 4.0 to Release 4.2

#5 Updated by Matthew Richardson about 8 years ago

Eventually solved this one.

HOST is a mandatory field in a datastore template. If unset, then $CEPH_HOST is unset in the clone command, and as a result ssh_exec_and_log is called as 'ssh sh -s' - which it interprets as a hostname (sh) and the subsystem flag.

Would it be possible to update the script to complain if the XML parsing returns nothing and/or update the documentation for the ceph datastore to highlight which fields are mandatory and which are optional: http://opennebula.org/documentation:rel4.0:ceph_ds

Thanks!

#6 Updated by Jaime Melis almost 8 years ago

  • Target version changed from Release 4.2 to Release 4.4

For the moment the documentation has been updated, but adding that check you speak of to the driver is a very good idea.

Moving to target release 4.4.

#7 Updated by Jaime Melis almost 8 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Fixed by #2262

Also available in: Atom PDF