CheckWalArchiveDestination error names barman-cloud-wal-archive instead of barman-cloud-check-wal-archive

オープン 初心者向け
#342 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
backend

調査の方向性

pkg/walarchive/cmd.go の CheckWalArchiveDestination を読み、エラーのフォーマットをその直前のログ行と比較してください。issue では、pkg/archiver/archiver.go 内の関連するコメントと、barman/clients/cloud_check_wal_archive.py の動作も示されています。エラーがチェックコマンドを正しく示し、コメントが説明されているバケットの動作を反映していれば完了です。

索引モデルが issue の本文から書いたものです。

説明

CheckWalArchiveDestination in pkg/walarchive/cmd.go runs barman-cloud-check-wal-archive, but when it fails it returns:

unexpected failure invoking barman-cloud-wal-archive: exit status 4

The fmt.Errorf at line 188 (main 7b420b0, the same in v0.7.0) formats utils.BarmanCloudWalArchive instead of utils.BarmanCloudCheckWalArchive. The log lines just above it use the right name.

With plugin-barman-cloud this is the message CloudNativePG reports when the first-WAL check fails (in my case a 403 on HeadBucket), so it reads as if WAL archiving itself failed, and it points at the wrong command when debugging.

A related comment in pkg/archiver/archiver.go (line 158) says that barman-cloud-check-wal-archive "only lists the objects in the bucket". It also sends HeadBucket and, if the bucket is missing, creates it (barman/clients/cloud_check_wal_archive.py). Not a bug, but it can mislead someone working out the minimal permissions.

Proposed fix: use utils.BarmanCloudCheckWalArchive in that error, and reword the comment. I can send the PR (signed off, branch dev/<this issue>) if you agree.

主要言語
Go
スター
11
フォーク
31
平均マージ
1日 8時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cloudnative-pg/barman-cloud のほかの issue

cloudnative-pg/barman-cloud の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。