cloudnative-pg / cloudnative-pg/plugin-barman-cloud

Invalid value: "object": BackupSpec is immutable once set

Đang mở
#610 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Go
Star
192
Fork
75
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
18

Mô tả

Hi, Team !

I'm doing migrations from Barman Native to Barman Plugin (0.7.0) using the same set of commands.

I have two setups:
1) CNPG 1.26.1
2) CNPG 1.27.0

My configs are:

```
tee $cluster_name.yaml.NATIVE << EOF
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: $cluster_name
namespace: $oname-system
spec:
instances: 3
imageName: $cnpg_image_name
storage:
size: 1Gi
backup:
retentionPolicy: "1d"
barmanObjectStore:
destinationPath: s3://cluster-backups/
endpointURL: http://minio-service:9000
s3Credentials:
accessKeyId:
name: minio-creds
key: ACCESS_KEY_ID
secretAccessKey:
name: minio-creds
key: ACCESS_SECRET_KEY
wal:
compression: gzip
EOF
```

```
tee barman-backup.yaml.NATIVE << EOF
apiVersion: postgresql.cnpg.io/v1
kind: Backup
metadata:
name: barman-backup
namespace: $oname-system
spec:
cluster:
name: $cluster_name
target: prefer-standby
EOF
```

```
tee minio-store.yaml << EOF
apiVersion: barmancloud.cnpg.io/v1
kind: ObjectStore
metadata:
name: minio-store
namespace: $oname-system
spec:
configuration:
destinationPath: s3://cluster-backups/
endpointURL: http://minio-service:9000
s3Credentials:
accessKeyId:
name: minio-creds
key: ACCESS_KEY_ID
secretAccessKey:
name: minio-creds
key: ACCESS_SECRET_KEY
wal:
compression: gzip
retentionPolicy: "1d"
EOF
```

```
tee $cluster_name.yaml.PLUGIN << EOF
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: $cluster_name
namespace: $oname-system
spec:
instances: 3
imagePullPolicy: Always
imageName: $cnpg_image_name
storage:
size: 1Gi
plugins:
- name: barman-cloud.cloudnative-pg.io
isWALArchiver: true
parameters:
barmanObjectName: minio-store
EOF
```

```
tee barman-backup.yaml.PLUGIN << EOF
apiVersion: postgresql.cnpg.io/v1
kind: Backup
metadata:
name: barman-backup
namespace: $oname-system
spec:
cluster:
name: $cluster_name
method: plugin
pluginConfiguration:
name: barman-cloud.cloudnative-pg.io
target: prefer-standby
EOF
```

The set of commands is:
a) `kubectl apply --server-side -f $oname-$cnpg_full_version.yaml`
b) `kubectl apply -f minio.yaml`
c) `kubectl apply -f $cluster_name.yaml.NATIVE`
d) `kubectl apply -f barman-backup.yaml.NATIVE`
e) `kubectl apply -f cert-manager.yaml`
f) `kubectl apply -f manifest.yaml`
g) `kubectl apply -f minio-store.yaml`
h) `kubectl apply -f $cluster_name.yaml.PLUGIN`
i) `kubectl apply -f barman-backup.yaml.PLUGIN`

This set of commands works fine for the setup 1) (CNPG 1.26.1).
However for the setup 2) (CNPG 1.27.0) I have the following message for the step i)

```
[alexey@wsl2 ~]$ kubectl apply -f barman-backup.yaml.PLUGIN
The Backup "barman-backup" is invalid: spec: Invalid value: "object": BackupSpec is immutable once set
```

What's wrong with it ?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với các manifest của CNPG 1.26.1 và 1.27.0, đặc biệt là barman-backup.yaml.NATIVE và barman-backup.yaml.PLUGIN, rồi tái hiện step i bằng kubectl apply. Theo dõi nơi tính bất biến của BackupSpec được xác thực và so sánh chuỗi di chuyển native-to-plugin. Được xem là hoàn tất khi chuỗi lệnh được ghi lại áp dụng thành công trên CNPG 1.27.0 hoặc khi tính không tương thích và cấu hình bắt buộc được ghi lại rõ ràng.

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

Đánh giá

Công nghệ
kubernetes, postgresql
Lĩnh vực
databases, devops
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

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.