Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding docs for addressing the growing bifrost db issue #3366

Merged
merged 1 commit into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 for actors and objects
from the authorization database (called bifrost).

These unused actor authorization IDs
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 object authorization IDs can accumulate while cookbooks are uploading.
During the cookbook upload, Infra Server creates a sandbox atomic transaction to verify that partial cookbook content
is not uploaded to the server. This issue is fixed in Chef Infra Server 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 bug fix for the bifrost database. This bug may create unused authorization IDs in the bifrost database. After upgrading to Chef Infra Server 14.16, the unused authorization IDs must be manually deleted.

To analyze the data that gets deleted and get an estimate of the time needed to delete the data, run:

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

To delete the unused authorization IDs from the bifrost database, run:


```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