Skip to content

Commit

Permalink
adding docs for addressing the growing bifrost db issue
Browse files Browse the repository at this point in the history
Signed-off-by: Vinay Satish <vinay.satish@progress.com>
  • Loading branch information
vinay-satish committed Jun 14, 2022
1 parent 84b5c28 commit 3593dff
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
17 changes: 11 additions & 6 deletions docs-chef-io/content/server/ctl_chef_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -659,13 +659,18 @@ chef-server-ctl show-service-credentials

### cleanup-bifrost

The `cleanup-bifrost` subcommand removes unused authorization objects
from the authorization database (called bifrost). These unused objects
can accumulate on long-running Chef Infra Servers as a result of failed object
creation requests. For most users, the unused authorization objects do
The `cleanup-bifrost` subcommand removes unused authorization ids of the actors and the objects
from the authorization database (called bifrost).

These unused authorization ids of actors
can accumulate on long-running Chef Infra Servers as a result of failed actor
creation requests. For most users, the unused authorization actors do
not substantially affect the performance of Chef Infra Server; however
in certain situations it can be helpful to clean them up. This command
is primarily intended for use by Chef support.
in certain situations it can be helpful to clean them up.

The unused authorization ids of objects can get accumulated during the upload of the cookbooks.
During the cookbook upload we create a sandbox atomic transaction where it make sures that partial cookbook content
is not uploaded to the server. This issue is fixed with the release 14.16.

**Syntax**

Expand Down
17 changes: 17 additions & 0 deletions docs-chef-io/content/server/upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,23 @@ Set the `postgresql['pg_upgrade_timeout']` attribute in [chef-server.rb]({{< rel

{{</note >}}

#### Upgrading to 14.16

Chef Infra Server 14.16 includes a fix for the growing bifrost database. Due to this bug there would be unused authorization ids created in the bifrost database. After upgrading to 14.16 , the unused authorization ids needs to be deleted.

Use the following command to analyze the data that gets deleted. This also gives the rough estimate of the time need to delete the data.

```bash
chef-server-ctl cleanup-bifrost --estimate-only
```

Use the following command to delete the unused authorization ids from the bifrost database


```bash
chef-server-ctl cleanup-bifrost
```

##### Database Preparation

1. Run `VACUUM FULL` on the PostgreSQL database if you don't have automatic vacuuming set up. This process will reduce the size of the database by deleting unnecessary data and speeds up the migration. The `VACUUM FULL` operation takes around 1 to 2 minutes per gigabyte of data depending on the complexity of the data, and requires free disk space at least as large as the size of your database.
Expand Down

0 comments on commit 3593dff

Please sign in to comment.