<div dir="ltr"><div dir="ltr">Hi Gorka,<div>Thank you for helping me find the issue, the ceph was set up for pool replication whereas it should be set up for image replication. After setting up image replication i am able to create volume without any issue and the replication functionality is working fine.</div><div><br></div><div>With regards</div><div>Swogat Pradhan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 25, 2021 at 6:36 PM Gorka Eguileor <<a href="mailto:geguileo@redhat.com">geguileo@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 25/06, Swogat Pradhan wrote:<br>
> Hi Rajat,<br>
> I was using the 1st link as a reference. As per the 2nd link The rbd<br>
> mirroring in ceph is configured properly, we've tested by creating an image<br>
> in ceph itself the mirroring is functioning properly. The problem we are<br>
<br>
Hi,<br>
<br>
If I remember correctly there are 2 types of mirroring, per-pool and<br>
per-image.<br>
<br>
When you say it's mirroring properly, do you mean you have enabled pool<br>
level replication? As in, any image created in that pool will be<br>
automatically replicated?<br>
<br>
If that's the case, then you have to change it, because Cinder<br>
replication works on a per image basis.<br>
<br>
<br>
> facing is in cinder, apparently there is a bug<br>
> <a href="https://bugs.launchpad.net/cinder/+bug/1898728" rel="noreferrer" target="_blank">https://bugs.launchpad.net/cinder/+bug/1898728</a> which states that cinder<br>
<br>
<br>
> retype (to replication enabled volume type) does not enable replication and<br>
> when we are creating a volume directly in cinder using replication enabled<br>
> volume type, the volume is getting created in ceph but in cinder the volume<br>
> stays in error state (as a result we are unable to use it in instances<br>
> primary disk)<br>
<br>
Those are 2 different cases, creating a new volume is different from<br>
retyping.<br>
<br>
The bug you mention describes that the problem on retype happens because<br>
the new type is a dictionary and not a Volume instance, so the<br>
extra_specs attribute doesn't exist.<br>
<br>
In your case I would say the issue is related to how the pool is<br>
configured in the Ceph cluster.<br>
<br>
Cheers,<br>
Gorka.<br>
<br>
><br>
> On Fri, Jun 25, 2021 at 9:57 AM Rajat Dhasmana <<a href="mailto:rdhasman@redhat.com" target="_blank">rdhasman@redhat.com</a>> wrote:<br>
><br>
> > Hi,<br>
> ><br>
> > On Thu, Jun 24, 2021 at 6:11 PM Swogat Pradhan <<a href="mailto:swogatpradhan22@gmail.com" target="_blank">swogatpradhan22@gmail.com</a>><br>
> > wrote:<br>
> ><br>
> >> Hi,<br>
> >> I am trying to configure cinder replication with ceph as backend and i<br>
> >> followed this URL to configure the cinder replication:<br>
> >> <a href="https://netapp.io/2016/10/14/cinder-replication-netapp-perfect-cheesecake-recipe/" rel="noreferrer" target="_blank">https://netapp.io/2016/10/14/cinder-replication-netapp-perfect-cheesecake-recipe/</a><br>
> >> and<br>
> >> <a href="http://www.sebastien-han.fr/blog/2017/06/19/OpenStack-Cinder-configure-replication-api-with-ceph/" rel="noreferrer" target="_blank">http://www.sebastien-han.fr/blog/2017/06/19/OpenStack-Cinder-configure-replication-api-with-ceph/</a><br>
> >><br>
> >><br>
> > The first link is specific to netapp driver so I'm not sure how it helps<br>
> > with ceph replication. For the second link, did you configure two ceph<br>
> > clusters properly and set the needed values with replication_device<br>
> > parameter?<br>
> ><br>
> ><br>
> >> i created a Volume type - REPL, with replication enabled <is> True and<br>
> >> colume backend name parameter.<br>
> >><br>
> >> But when i am trying to create a volume using the created volume type the<br>
> >> volume is getting created in ceph but in cinder the status is showing<br>
> >> error. and when checked log getting the following error:<br>
> >><br>
> >> 2021-06-24 17:59:39.556 28472 ERROR cinder.volume.drivers.rbd<br>
> >> [req-6e6b901e-f2dd-43a4-a089-6c734b279e17 d576181b6a444541b8ec7f37d750a4c1<br>
> >> a9ac2eba50d84d64ac44b179bbcc9183 - default default] Error creating rbd<br>
> >> image volume-361f35c4-a589-4653-b404-fb93d2f598cf.:<br>
> >> cinder.exception.ReplicationError: Volume<br>
> >> 361f35c4-a589-4653-b404-fb93d2f598cf replication error: Failed to enable<br>
> >> image replication<br>
> >><br>
> >><br>
> > Any operation could be failing in this method[1] on rbd side to raise the<br>
> > above error. I suggest it's better to check if you've setup replication<br>
> > correctly.<br>
> ><br>
> > [1]<br>
> > <a href="https://github.com/openstack/cinder/blob/stable/victoria/cinder/volume/drivers/rbd.py#L802" rel="noreferrer" target="_blank">https://github.com/openstack/cinder/blob/stable/victoria/cinder/volume/drivers/rbd.py#L802</a><br>
> ><br>
> ><br>
> >> I tried to create a volume using volume type- default and then<br>
> >> later changed the volume type using command 'cinder retype' to the created<br>
> >> volume type and it changed without any issue.<br>
> >><br>
> >> I am using openstack victoria .<br>
> >><br>
> >> With regards,<br>
> >> Swogat Pradhan<br>
> >><br>
> ><br>
<br>
</blockquote></div></div>