chef / chef/chef-server

Error during reindexing with Infra Server 14.8

Open
#2,740 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Triage: Try Reproducing Type: Chore
Dominant language
Erlang
Stars
303
Forks
211
Avg merge
1d 8h
Merged PRs (30d)
5

Description

Chef Server Version

14.8

Platform Details

Ubuntu 20.04

Error

During the chef-server-ctl upgrade command there's an error changing directories in the partybus migration. It seems to work just fine anyways so maybe we don't even need to do this:

[Infra Server Upgrade] - Latest PostgreSQL Database Migration Available: 1.36
[Infra Server Upgrade] - Database PostgreSQL Database Migrations to Run: [#<Partybus::MigrationFile:0x000055969b8fbce0 @path="/opt/opscode/embedded/upgrades/001/036_reindex_postgres13.rb", @major=1, @minor=36>]
[Infra Server Upgrade] - Current PostgreSQL Database Migration Version: 1.35
[Infra Server Upgrade] - Starting PostgreSQL Database Migration 1.36
[Infra Server Upgrade] - 	Stopping Services ["nginx", "opscode-erchef"]
ok: down: nginx: 19s, normally up
down: nginx: 20s, normally up; run: log: (pid 1281555) 1611319s
down: nginx: 20s, normally up; run: log: (pid 1281555) 1611319s
ok: down: opscode-erchef: 64s, normally up
down: opscode-erchef: 65s, normally up; run: log: (pid 1281501) 1611326s
down: opscode-erchef: 65s, normally up; run: log: (pid 1281501) 1611326s
[Infra Server Upgrade] - Sleeping for 10 seconds while services stop...
[Infra Server Upgrade] - 	Starting Services ["postgresql"]
run: postgresql: (pid 1705228) 31s; run: log: (pid 1417409) 1119202s
[Infra Server Upgrade] - Sleeping for 15 seconds while services comes online...
[Infra Server Upgrade] - Reindexing postgreSQL...
[Infra Server Upgrade] - 	Running Command: sudo -H -u  opscode-pgsql bash -c '/opt/opscode/embedded/bin/reindexdb --all' with options {}
[DEPRECATED] `Bundler.clean_system` has been deprecated in favor of `Bundler.unbundled_system`. If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system` (called at /opt/opscode/embedded/service/partybus/lib/partybus/command_runner.rb:10)
could not change directory to "/opt/opscode/embedded/service/partybus": Permission denied
reindexdb: reindexing database "bifrost"
reindexdb: reindexing database "oc_id"
reindexdb: reindexing database "opscode-pgsql"
reindexdb: reindexing database "opscode_chef"
reindexdb: reindexing database "postgres"
reindexdb: reindexing database "template1"
[Infra Server Upgrade] - Finished PostgreSQL Database Migration 1.36 in 62.6 seconds
Chef Infra Server Upgraded!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the partybus migration at /opt/opscode/embedded/upgrades/001/036_reindex_postgres13.rb and command_runner.rb:10, then reproduce the chef-server-ctl upgrade and reindexdb command shown in the report. Determine whether the permission warning affects reindexing; done means the upgrade behavior is corrected or the warning is confirmed harmless and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.