mstarikov / rbdsr

XenServer demo RBD SR, that automates creating and attaching LVM storage on top of RBD object.
GNU General Public License v2.0
15 stars 7 forks source link

LUN not being discovered #11

Open flowjo-mikej opened 8 years ago

flowjo-mikej commented 8 years ago

First thanks for this plugin!!

Sorry if I am missing something as I am new to Ceph, but there is a problem trying to discover the rbd image. I created an rbd image under the rbd pool... When I scan the target host, the rbd pool is found, but when I select it, no image is found and it's greyed out.

Also, can I use admin node as the target host or should I pick one of my monitors?

flowjo-mikej commented 8 years ago

Just to add on, I can see any pool I I create as the target IQN, but no rbd image or "LUN" shows up.

flowjo-mikej commented 8 years ago

Some more info...

The error message from XenCenter is: The server 'xxx.xxx.xxx.xxx' gave a bad response to the query.

I checked the logs on the admin node when selecting the pool (Target IQN), and just shows the user starting the session and it removing: Jun 29 15:27:28 pierre systemd-logind: New session 185 of user flowceph. Jun 29 15:27:28 pierre systemd: Started Session 185 of user flowceph. Jun 29 15:27:28 pierre systemd: Starting Session 185 of user flowceph. Jun 29 15:27:31 pierre systemd-logind: Removed session 185. Jun 29 15:27:31 pierre systemd-logind: New session 186 of user flowceph. Jun 29 15:27:31 pierre systemd: Started Session 186 of user flowceph. Jun 29 15:27:31 pierre systemd: Starting Session 186 of user flowceph. Jun 29 15:27:34 pierre systemd-logind: Removed session 186. Jun 29 15:27:34 pierre systemd-logind: New session 187 of user flowceph. Jun 29 15:27:34 pierre systemd: Started Session 187 of user flowceph. Jun 29 15:27:34 pierre systemd: Starting Session 187 of user flowceph. Jun 29 15:27:37 pierre systemd-logind: Removed session 187. Jun 29 15:27:38 pierre systemd-logind: New session 188 of user flowceph. Jun 29 15:27:38 pierre systemd: Started Session 188 of user flowceph. Jun 29 15:27:38 pierre systemd: Starting Session 188 of user flowceph. Jun 29 15:27:41 pierre systemd-logind: Removed session 188. Jun 29 15:27:41 pierre systemd-logind: New session 189 of user flowceph. Jun 29 15:27:41 pierre systemd: Started Session 189 of user flowceph. Jun 29 15:27:41 pierre systemd: Starting Session 189 of user flowceph. Jun 29 15:27:44 pierre systemd-logind: Removed session 189.

flowjo-mikej commented 8 years ago

If I try from the command line, I get the following error: There was an SR backend failure. status: Xml.Error(_) stdout: stderr:

I get a different error if I try and use the admin node instead of a monitor: Error code: SR_BACKEND_FAILURE_1 Error parameters: , Error reporting error, unknown key RBD Monitor,

At least that answers my question about using the monitor vs admin node.

mstarikov commented 8 years ago

Hi Mike,

You can use admin node with the following condition:

User that you specify in XenServer "device-config:chapuser=" has to be able to ssh into admin node and run ceph commands.

To give you an example, in the article xenserver with rbd sr I was using docker hosts IP as "device-config:target=" value. Because docker host has ceph-common package installed and it has access to the /etc/ceph and /var/lib/ceph that mon and osd containers utilise, docker host can query and manipulate rbd objects.

So if you have problems logging into admin node, check the user permissions(i.e. ssh shell etc) and if it has access to ceph keys to successfully run ceph/rbd commands.

Regarding grayed out LUN list, please attach or email me SMlog, it might be timing issue(i.e. MAX_TIMEOUT 15 might be to short to obtain rbd list in that pool).

falcon04 commented 8 years ago

Hi Mstarikov, Having same problem Here is SMlog

Aug 16 11:33:41 xen1 SM: [14242] RBD info of the image is {"name":"RBDcephbeta01","size":107374182400,"objects":25600,"order":22,"object_size":4194304,"block_name_prefix":"rbd_data.eed0238e1f29","format":2,"features":["layering","exclusive-lock","object-map","fast-diff","deep-flatten"],"flags":[]} Aug 16 11:33:49 xen1 SM: [14242] LUNprint: waiting for path: Aug 16 11:34:04 xen1 SM: [14242] ['ls', '/var/lib/rbd/rbd', '-1', '--color=never'] Aug 16 11:34:04 xen1 SM: [14242] pread SUCCESS Aug 16 11:34:04 xen1 SM: [14242] Raising exception [107, The SCSIid parameter is missing or incorrect] Aug 16 11:34:04 xen1 SM: [14242] *\ LVHD over iSCSI: EXCEPTION <class 'SR.SROSError'>, The SCSIid parameter is missing or incorrect Aug 16 11:34:04 xen1 SM: [14242] File "/opt/xensource/sm/SRCommand.py", line 350, in run Aug 16 11:34:04 xen1 SM: [14242] sr = driver(cmd, cmd.sr_uuid) Aug 16 11:34:04 xen1 SM: [14242] File "/opt/xensource/sm/SR.py", line 147, in init Aug 16 11:34:04 xen1 SM: [14242] self.load(sr_uuid) Aug 16 11:34:04 xen1 SM: [14242] File "/opt/xensource/sm/LVMoISCSISR", line 183, in load Aug 16 11:34:04 xen1 SM: [14242] raise xs_errors.XenError('ConfigSCSIid') Aug 16 11:34:04 xen1 SM: [14242] File "/opt/xensource/sm/xs_errors.py", line 52, in init** Aug 16 11:34:04 xen1 SM: [14242] raise SR.SROSError(errorcode, errormessage) Aug 16 11:34:04 xen1 SM: [14242] @mstarikov

mstarikov commented 8 years ago

Hi Falcon04,

This error can be part of normal operation(i.e. it will throw this error when discovering pool name via XenCenter). Could you please specify where the process fails(i.e. discover pool? discover rbd block? or formating SR? or do you creating sr from command line?) and please email me full SMlog when trying to create SR if it fails.

Regarding this particular ticket, the problem is caused by the change of tunables in the latest version or CEPH. since XS is kernel 3.10, you need to run "ceph osd crush tunables legacy" to switch back to pre-bobtail tunables(see ceph documentation for details).

falcon04 commented 8 years ago

I created rbd pool and created image RBDcephbeta01from command line. Failing at rbd image name. rbd image field is rayed out. I do see it in SMlog RBDcephbeta01.

From: Mark Starikov [mailto:notifications@github.com] Sent: Thursday, August 18, 2016 2:11 AM To: mstarikov/rbdsr rbdsr@noreply.github.com Cc: Jagruti Patel jpatel@eqtc.com; Comment comment@noreply.github.com Subject: Re: [mstarikov/rbdsr] LUN not being discovered (#11)

Hi Falcon04,

This error can be part of normal operation(i.e. it will throw this error when discovering pool name via XenCenter). Could you please specify where the process fails(i.e. discover pool? discover rbd block? or formating SR? or do you creating sr from command line?) and please email me full SMlog when trying to create SR if it fails.

Regarding this particular ticket, the problem is caused by the change of tunables in the latest version or CEPH. since XS is kernel 10, you need to run "ceph osd crush tunables legacy" to switch back to pre-bobtail tunables(see ceph documentationhttp://docs.ceph.com/docs/master/rados/operations/crush-map/#which-client-versions-support-crush-tunables3 for details).

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/mstarikov/rbdsr/issues/11#issuecomment-240642217, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AUFoRBYkhvvAzujXnhjYAAa0D51KXnnIks5qhAWSgaJpZM4JBjpi.