[Users] [URGENT] hacking the DB

This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5U5vHVe2c4gErPcwPMiguIxge1AAH6cqN Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, I'm about to hack engine db to remove a gluster volume and I'd like someone to advise me on this. The environment is in production, I've backed up the db and I'm planning to remove every entry I can find of the volume (host members, cluster, etc) but I found that there's no clusters table (and I need to remove a cluster that no longer exists after a force remove of the DC but somehow the volume still is attached to it). I'll try IRC also to see if someone can give me a hand. Regards, --5U5vHVe2c4gErPcwPMiguIxge1AAH6cqN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJS64asAAoJEC5KDDg2+NMM9oIH/3i/XzV0VPnCS0TgrxiPY1Ik AxK7MRt6hWCC1ZERZfJ0pURfd3MIzd4u08+Wy5NQaH2PWNGn4bTd8FxidaxqjJuU a8JR6EuL5H91DDzoj4kaXxwg2kIKcjMT7CNnLnrR5AT7cYhB3ArqOE9qzqXXKY0j G7ZtPg7+4H2qYbmALo6GnH9/Bd1RXDhNE2v2LPf/0/7xvkSW//e4YDm3Cf1P0sxs gCz30sAvBvdplqRHWmHHMqD1CKpj+JVbwWujqmTh3PBqGasRgmqcXeY4Hr41VsZX r9OJYtQodW7f+Qq2qMn46OlOLCTD69ONwqBs1h7pG5PTRp9thU+ZOQcAGd4GjUY= =PjE8 -----END PGP SIGNATURE----- --5U5vHVe2c4gErPcwPMiguIxge1AAH6cqN--

This is a multi-part message in MIME format. --------------090000020507010902040907 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 01/31/2014 04:49 PM, Juan Pablo Lorier wrote:
Hi,
I'm about to hack engine db to remove a gluster volume and I'd like someone to advise me on this. The environment is in production, I've backed up the db and I'm planning to remove every entry I can find of the volume (host members, cluster, etc) but I found that there's no clusters table (and I need to remove a cluster that no longer exists after a force remove of the DC but somehow the volume still is attached to it).
delete from gluster_volume_bricks where volume_id = ".."; delete from gluster_volume_options where volume_id = ".."; delete from gluster_volume_transport_types where volume_id=".."; delete from gluster_volume_access_protocols where volume_id=".."; delete from gluster_volumes where id=".."; The above would delete all gluster volume information stored in the db. Cluster information is stored in vds_groups table. You should have been able to remove the host using "Force" option. Didn't that work for you. I would be interested to see the logs if it did not. thanks sahina
I'll try IRC also to see if someone can give me a hand. Regards,
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
--------------090000020507010902040907 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <br> <div class="moz-cite-prefix">On 01/31/2014 04:49 PM, Juan Pablo Lorier wrote:<br> </div> <blockquote cite="mid:52EB86AB.7020908@gmail.com" type="cite"> <pre wrap="">Hi, I'm about to hack engine db to remove a gluster volume and I'd like someone to advise me on this. The environment is in production, I've backed up the db and I'm planning to remove every entry I can find of the volume (host members, cluster, etc) but I found that there's no clusters table (and I need to remove a cluster that no longer exists after a force remove of the DC but somehow the volume still is attached to it).</pre> </blockquote> <br> delete from gluster_volume_bricks where volume_id = "..";<br> delete from gluster_volume_options where volume_id = "..";<br> delete from gluster_volume_transport_types where volume_id="..";<br> delete from gluster_volume_access_protocols where volume_id="..";<br> delete from gluster_volumes where id="..";<br> <br> The above would delete all gluster volume information stored in the db.<br> <br> Cluster information is stored in vds_groups table.<br> <br> You should have been able to remove the host using "Force" option. Didn't that work for you. I would be interested to see the logs if it did not.<br> <br> thanks<br> sahina<br> <blockquote cite="mid:52EB86AB.7020908@gmail.com" type="cite"> <pre wrap=""> I'll try IRC also to see if someone can give me a hand. Regards, </pre> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <pre wrap="">_______________________________________________ Users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Users@ovirt.org">Users@ovirt.org</a> <a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt.org/mailman/listinfo/users</a> </pre> </blockquote> <br> </body> </html> --------------090000020507010902040907--

This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EnH4WVI8j3jdpIrw2R3swDSqAbxkfFgmT Content-Type: multipart/alternative; boundary="------------070802080601040009010105" This is a multi-part message in MIME format. --------------070802080601040009010105 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Sahina!! The hosts are there as the volume. What is gone is the DC and mostly everything else. I'll send you the logs, but due to the lack of time, they are going to be the raw logs for several days as the force was last week. Regards, On 31/01/14 09:35, Sahina Bose wrote:
On 01/31/2014 04:49 PM, Juan Pablo Lorier wrote:
Hi,
I'm about to hack engine db to remove a gluster volume and I'd like someone to advise me on this. The environment is in production, I've backed up the db and I'm planning to remove every entry I can find of the volume (host members, cluster, etc) but I found that there's no clusters table (and I need to remove a cluster that no longer exists after a force remove of the DC but somehow the volume still is attache=
d
to it).
delete from gluster_volume_bricks where volume_id =3D ".."; delete from gluster_volume_options where volume_id =3D ".."; delete from gluster_volume_transport_types where volume_id=3D".."; delete from gluster_volume_access_protocols where volume_id=3D".."; delete from gluster_volumes where id=3D"..";
The above would delete all gluster volume information stored in the db.=
Cluster information is stored in vds_groups table.
You should have been able to remove the host using "Force" option. Didn't that work for you. I would be interested to see the logs if it did not.
thanks sahina
I'll try IRC also to see if someone can give me a hand. Regards,
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
--------------070802080601040009010105 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <html> <head> <meta content=3D"text/html; charset=3DISO-8859-1" http-equiv=3D"Content-Type"> </head> <body text=3D"#000000" bgcolor=3D"#FFFFFF"> Thanks Sahina!!<br> <br> The hosts are there as the volume. What is gone is the DC and mostly everything else. I'll send you the logs, but due to the lack of time, they are going to be the raw logs for several days as the force was last week.<br> Regards,<br> <br> <div class=3D"moz-cite-prefix">On 31/01/14 09:35, Sahina Bose wrote:<= br> </div> <blockquote cite=3D"mid:52EB8A81.8030105@redhat.com" type=3D"cite"> <meta content=3D"text/html; charset=3DISO-8859-1" http-equiv=3D"Content-Type"> <br> <div class=3D"moz-cite-prefix">On 01/31/2014 04:49 PM, Juan Pablo Lorier wrote:<br> </div> <blockquote cite=3D"mid:52EB86AB.7020908@gmail.com" type=3D"cite"> <pre wrap=3D"">Hi, I'm about to hack engine db to remove a gluster volume and I'd like someone to advise me on this. The environment is in production, I've backed up the db and I'm planning to remove every entry I can find of the volume (host members, cluster, etc) but I found that there's no clusters table (and I need to remove a cluster that no longer exists after a force remove of the DC but somehow the volume still is attached to it).</pre> </blockquote> <br> delete from gluster_volume_bricks where volume_id =3D "..";<br> delete from gluster_volume_options where volume_id =3D "..";<br> delete from gluster_volume_transport_types where volume_id=3D"..";<= br> delete from gluster_volume_access_protocols where volume_id=3D"..";= <br> delete from gluster_volumes where id=3D"..";<br> <br> The above would delete all gluster volume information stored in the db.<br> <br> Cluster information is stored in vds_groups table.<br> <br> You should have been able to remove the host using "Force" option. Didn't that work for you. I would be interested to see the logs if it did not.<br> <br> thanks<br> sahina<br> <blockquote cite=3D"mid:52EB86AB.7020908@gmail.com" type=3D"cite"> <pre wrap=3D"">I'll try IRC also to see if someone can give me a = hand. Regards, </pre> <br> <fieldset class=3D"mimeAttachmentHeader"></fieldset> <br> <pre wrap=3D"">_______________________________________________ Users mailing list <a moz-do-not-send=3D"true" class=3D"moz-txt-link-abbreviated" href=3D"ma= ilto:Users@ovirt.org">Users@ovirt.org</a> <a moz-do-not-send=3D"true" class=3D"moz-txt-link-freetext" href=3D"http:= //lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt.org/mailman/= listinfo/users</a> </pre> </blockquote> <br> </blockquote> <br> </body> </html> --------------070802080601040009010105-- --EnH4WVI8j3jdpIrw2R3swDSqAbxkfFgmT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJS644DAAoJEC5KDDg2+NMM0RwH/0H70FT3HIcKpsxRuE2mmiHm rpmQj8vYItZ1FUOm7uEHhjudAp2LGHNEcJ/WY5KM3e3P4Cax7xBW9Zaq3yeKX37r Zg7CUZglD+WjUTH6nVkqiBRgGRSQ40sEA/8SB9YRlXz29BnsRkpcjF3CkJ3QO5wO fHk9gPeGmSbXHmn3P4Zl6NvkNkLyRl0qJUlhWibHCa7KWHUk+i5bc8P6Cmt5lHAY O4Ff5KsUgXnZ+TsAMh919zp/mJOn7CfP+Fa4lx4aI2Z4H6QolG3XMmv918VNr9tQ emKIKniTfvtOfkWbMA+rcbIVv2PVEsEuu62pvBxl+c5MKythSdrHY0huzlWzcXI= =sohr -----END PGP SIGNATURE----- --EnH4WVI8j3jdpIrw2R3swDSqAbxkfFgmT--

This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8G5pNcxcMVOgGKxrIa8rhoI0HPAmd3bXT Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi again, I'm now in the process of deleting the removed cluster from the hosts. I can't just delete it from vds_groups as is a external key to vds_static, and it looks like vds_static has the hosts definition. Can I safely update the vds_group_id to ' ' in the hosts to "detach" them from the cluster? Regards, On 31/01/14 09:35, Sahina Bose wrote:
delete from gluster_volume_bricks where volume_id =3D "
--8G5pNcxcMVOgGKxrIa8rhoI0HPAmd3bXT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJS65S4AAoJEC5KDDg2+NMMFGsH/AkCT/MA5/UMgxvxVMxfZ83T vEd45QNCo02kmupQ3td+d9q7M1zlbf17V7tVsj0l8Pffy+DaSd1sheOsGF106EwB gXxmylJOXSu5ouTPYy8I5bOe4u1HL5dsgzJW6USuDuB9MYgLRejy43EYpXThC5uR vryjcG3XENzaIcIcmu36MHuutUouTl0qZVlRItI/1dRlMnhCA4A3FdgjF8/0diaR G860MAoAaiexMV5yv3RMK5vS8upSdfvbDINKPEYaUekOdGeGsTrShUTIBWZoz208 7D0qUd7Z5lklJtusFNSG9tUM5D9coC/oU5CMUTfEM+m8ZziEus8dEmqwaGlyzwU= =L4aX -----END PGP SIGNATURE----- --8G5pNcxcMVOgGKxrIa8rhoI0HPAmd3bXT--

On 01/31/2014 05:49 PM, Juan Pablo Lorier wrote:
Hi again,
I'm now in the process of deleting the removed cluster from the hosts. I can't just delete it from vds_groups as is a external key to vds_static, and it looks like vds_static has the hosts definition. Can I safely update the vds_group_id to ' ' in the hosts to "detach" them from the cluster? Regards,
I think it would be safer to remove the host and then remove the cluster. You would have to remove the host entry from vds_static as well as vds_dynamic.
On 31/01/14 09:35, Sahina Bose wrote:
delete from gluster_volume_bricks where volume_id = "

This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --nANwCoX7ooC1chHpEmkG6j6uKFFLvA46X Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It also has a foreign key at vds_statistics, Thanks for everything, I'll keep you updated on this matter. Regards, On 31/01/14 11:30, Sahina Bose wrote:
On 01/31/2014 05:49 PM, Juan Pablo Lorier wrote:
Hi again,
I'm now in the process of deleting the removed cluster from the hosts.=
I
can't just delete it from vds_groups as is a external key to vds_stati= c, and it looks like vds_static has the hosts definition. Can I safely update the vds_group_id to ' ' in the hosts to "detach" them from the cluster? Regards,
I think it would be safer to remove the host and then remove the cluste= r. You would have to remove the host entry from vds_static as well as vds_dynamic.
On 31/01/14 09:35, Sahina Bose wrote:
delete from gluster_volume_bricks where volume_id =3D "
--nANwCoX7ooC1chHpEmkG6j6uKFFLvA46X Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJS67DHAAoJEC5KDDg2+NMM9/gH/jrqOoIywzDs0+lpPEI1z609 VdFgfl7MO+UIwsrr4T1/GI7qBjkIptxH2DydX5LKAkghDYXoT+kYVhEWLAPc2ZRz aVMOjKuDGxYws1GArdT5/1KKYCjlNQpkNZbONxa/2gZvEhw9D1WDFrtXkUEuYCh9 61lEoKWq8o0HXRAuVSTsSY/wvMemtNlu2OWyKRzx/VJ4C38oUQjNcw9W+AGPS/wh q8dO7l+hDsM+87Lf6QV/k96eMM0jIeKZklYuMeSE24GffMhZA/2lHHUm3FPdTLhF 1ytj/QEpcWUusf4SvZ+NaOhhfKNCs8E8DIe5zM+WCoX5qSCCI6KGoMaVMiIML1A= =tg5Y -----END PGP SIGNATURE----- --nANwCoX7ooC1chHpEmkG6j6uKFFLvA46X--

----- Original Message -----
From: "Juan Pablo Lorier" <jplorier@gmail.com> To: "Sahina Bose" <sabose@redhat.com>, "users" <users@ovirt.org> Sent: Friday, January 31, 2014 4:18:47 PM Subject: Re: [Users] [URGENT] hacking the DB
It also has a foreign key at vds_statistics, Thanks for everything, I'll keep you updated on this matter. Regards,
Hi Juan First of all let me recommend to backup your DB before playing with it. My second comment is that this should not occur in the first place so if you removed something and have leftovers that you been forced to delete manually it is certainly a bug and I will appreciate if you can open one , describe the scenario and attach the relevant logs Thanks Eli
On 31/01/14 11:30, Sahina Bose wrote:
On 01/31/2014 05:49 PM, Juan Pablo Lorier wrote:
Hi again,
I'm now in the process of deleting the removed cluster from the hosts. I can't just delete it from vds_groups as is a external key to vds_static, and it looks like vds_static has the hosts definition. Can I safely update the vds_group_id to ' ' in the hosts to "detach" them from the cluster? Regards,
I think it would be safer to remove the host and then remove the cluster. You would have to remove the host entry from vds_static as well as vds_dynamic.
On 31/01/14 09:35, Sahina Bose wrote:
delete from gluster_volume_bricks where volume_id = "
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
participants (3)
-
Eli Mesika
-
Juan Pablo Lorier
-
Sahina Bose