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

Đang mở Phù hợp với người mới
#342 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
backend

Hướng nghiên cứu

Đọc CheckWalArchiveDestination trong pkg/walarchive/cmd.go và so sánh cách định dạng lỗi với các dòng log ngay phía trên. Issue cũng đề cập đến một chú thích liên quan trong pkg/archiver/archiver.go và hành vi trong barman/clients/cloud_check_wal_archive.py. Công việc hoàn tất khi lỗi nêu đúng tên lệnh kiểm tra và chú thích phản ánh hành vi bucket được mô tả.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
11
Fork
31
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cloudnative-pg/barman-cloud

Tất cả issue của cloudnative-pg/barman-cloud

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.