Hi, We have a cluster where the user continuously spawn and delete servers which makes the db even in compressed state 1.1GB. I'm sure it has a huge amount of trash because this is a cicd environment and the prod just uses 75MB. How is it possible to cleanup the db on a safe way, what should be the steps? Best regards, Istvan ________________________________ This message is confidential and is for the sole use of the intended recipient(s). It may also be privileged or otherwise protected by copyright or other legal rules. If you have received it by mistake please let us know by reply email and delete it from your system. It is prohibited to copy this message or disclose its content to anyone. Any confidentiality or privilege is not waived or lost by any mistaken delivery or unauthorized disclosure of the message. All messages sent to and from Agoda may be monitored to ensure compliance with company policies, to protect the company's interests and to remove potential malware. Electronic messages may be intercepted, amended, lost or deleted, or contain viruses.
Hey, You may have a look at OSArchiver (OpenStack DB archiver) which is a tool we use at OVHCloud to archive our OpenStack databases. We open sourced it last year but this is not an official OpenStack tool. https://github.com/ovh/osarchiver -- PS Szabo, Istvan (Agoda) <Istvan.Szabo@agoda.com> wrote on mer. [2020-août-26 06:57:33 +0000]:
Hi,
We have a cluster where the user continuously spawn and delete servers which makes the db even in compressed state 1.1GB. I’m sure it has a huge amount of trash because this is a cicd environment and the prod just uses 75MB. How is it possible to cleanup the db on a safe way, what should be the steps?
Best regards, Istvan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This message is confidential and is for the sole use of the intended recipient (s). It may also be privileged or otherwise protected by copyright or other legal rules. If you have received it by mistake please let us know by reply email and delete it from your system. It is prohibited to copy this message or disclose its content to anyone. Any confidentiality or privilege is not waived or lost by any mistaken delivery or unauthorized disclosure of the message. All messages sent to and from Agoda may be monitored to ensure compliance with company policies, to protect the company's interests and to remove potential malware. Electronic messages may be intercepted, amended, lost or deleted, or contain viruses.
-- Pierre-Samuel Le Stang
On Wed, Aug 26, 2020 at 06:57, "Szabo, Istvan (Agoda)" <Istvan.Szabo@agoda.com> wrote:
Hi,
We have a cluster where the user continuously spawn and delete servers which makes the db even in compressed state 1.1GB. I’m sure it has a huge amount of trash because this is a cicd environment and the prod just uses 75MB. How is it possible to cleanup the db on a safe way, what should be the steps?
From Nova perspective you can get rid of the data of the already deleted instances via the following two commands: nova-manage db archive_deleted_rows nova-manage db purge Cheers, gibi [1]https://docs.openstack.org/nova/latest/cli/nova-manage.html
Best regards, Istvan
This message is confidential and is for the sole use of the intended recipient(s). It may also be privileged or otherwise protected by copyright or other legal rules. If you have received it by mistake please let us know by reply email and delete it from your system. It is prohibited to copy this message or disclose its content to anyone. Any confidentiality or privilege is not waived or lost by any mistaken delivery or unauthorized disclosure of the message. All messages sent to and from Agoda may be monitored to ensure compliance with company policies, to protect the company's interests and to remove potential malware. Electronic messages may be intercepted, amended, lost or deleted, or contain viruses.
Thank you guys, can do this online or need any outage? -----Original Message----- From: Balázs Gibizer <balazs.gibizer@est.tech> Sent: Wednesday, August 26, 2020 7:15 PM To: Szabo, Istvan (Agoda) <Istvan.Szabo@agoda.com> Cc: openstack-discuss@lists.openstack.org Subject: Re: DB Prune Email received from outside the company. If in doubt don't click links nor open attachments! ________________________________ On Wed, Aug 26, 2020 at 06:57, "Szabo, Istvan (Agoda)" <Istvan.Szabo@agoda.com> wrote:
Hi,
We have a cluster where the user continuously spawn and delete servers which makes the db even in compressed state 1.1GB. I’m sure it has a huge amount of trash because this is a cicd environment and the prod just uses 75MB. How is it possible to cleanup the db on a safe way, what should be the steps?
From Nova perspective you can get rid of the data of the already deleted instances via the following two commands: nova-manage db archive_deleted_rows nova-manage db purge Cheers, gibi [1]https://docs.openstack.org/nova/latest/cli/nova-manage.html
Best regards, Istvan
This message is confidential and is for the sole use of the intended recipient(s). It may also be privileged or otherwise protected by copyright or other legal rules. If you have received it by mistake please let us know by reply email and delete it from your system. It is prohibited to copy this message or disclose its content to anyone. Any confidentiality or privilege is not waived or lost by any mistaken delivery or unauthorized disclosure of the message. All messages sent to and from Agoda may be monitored to ensure compliance with company policies, to protect the company's interests and to remove potential malware. Electronic messages may be intercepted, amended, lost or deleted, or contain viruses.
________________________________ This message is confidential and is for the sole use of the intended recipient(s). It may also be privileged or otherwise protected by copyright or other legal rules. If you have received it by mistake please let us know by reply email and delete it from your system. It is prohibited to copy this message or disclose its content to anyone. Any confidentiality or privilege is not waived or lost by any mistaken delivery or unauthorized disclosure of the message. All messages sent to and from Agoda may be monitored to ensure compliance with company policies, to protect the company's interests and to remove potential malware. Electronic messages may be intercepted, amended, lost or deleted, or contain viruses.
On Thu, Aug 27, 2020 at 03:45, "Szabo, Istvan (Agoda)" <Istvan.Szabo@agoda.com> wrote:
Thank you guys, can do this online or need any outage?
I think it is safe to run these commands while the nova services are up. However if you have a lot of data to move and then delete that can cause extra DB load. Cheers, gibi
-----Original Message----- From: Balázs Gibizer <balazs.gibizer@est.tech> Sent: Wednesday, August 26, 2020 7:15 PM To: Szabo, Istvan (Agoda) <Istvan.Szabo@agoda.com> Cc: openstack-discuss@lists.openstack.org Subject: Re: DB Prune
Email received from outside the company. If in doubt don't click links nor open attachments! ________________________________
On Wed, Aug 26, 2020 at 06:57, "Szabo, Istvan (Agoda)" <Istvan.Szabo@agoda.com> wrote:
Hi,
We have a cluster where the user continuously spawn and delete servers which makes the db even in compressed state 1.1GB. I’m sure it has a huge amount of trash because this is a cicd environment and the prod just uses 75MB. How is it possible to cleanup the db on a safe way, what should be the steps?
From Nova perspective you can get rid of the data of the already deleted instances via the following two commands:
nova-manage db archive_deleted_rows nova-manage db purge
Cheers, gibi
[1]https://docs.openstack.org/nova/latest/cli/nova-manage.html
Best regards, Istvan
This message is confidential and is for the sole use of the intended recipient(s). It may also be privileged or otherwise protected by copyright or other legal rules. If you have received it by mistake please let us know by reply email and delete it from your system. It is prohibited to copy this message or disclose its content to anyone. Any confidentiality or privilege is not waived or lost by any mistaken delivery or unauthorized disclosure of the message. All messages sent to and from Agoda may be monitored to ensure compliance with company policies, to protect the company's interests and to remove potential malware. Electronic messages may be intercepted, amended, lost or deleted, or contain viruses.
________________________________ This message is confidential and is for the sole use of the intended recipient(s). It may also be privileged or otherwise protected by copyright or other legal rules. If you have received it by mistake please let us know by reply email and delete it from your system. It is prohibited to copy this message or disclose its content to anyone. Any confidentiality or privilege is not waived or lost by any mistaken delivery or unauthorized disclosure of the message. All messages sent to and from Agoda may be monitored to ensure compliance with company policies, to protect the company's interests and to remove potential malware. Electronic messages may be intercepted, amended, lost or deleted, or contain viruses.
participants (3)
-
Balázs Gibizer
-
Pierre-Samuel LE STANG
-
Szabo, Istvan (Agoda)