Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
20 - The Last Stand
-
1
Description
The effect of this is that setting useVirtualPath: true still has no actual effect (despite K8S-3264).
If we set useVirtualPath to true, CAO passes the following as command-line arguments to the operator-backup script:
spec:
|
containers:
|
- args:
|
...
|
- --s3-force-path-style
|
- "false" |
Unfortunately, in the operator-backup script, this --s3-force-path-style option gets parsed as the string "false" rather than as a boolean.
This means that later on when we do this check:
if self.context.args.s3_force_path_style: |
args.append("--s3-force-path-style") |
The string "false" when treated as a boolean evaluates as True (as it's a non-empty string), so we always end up sending the --s3-force-path-style flag to cbbackupmgr.
The --s3-force-path-style flag is visible in the backup logs stored in the backup archive:
2024-07-12T10:38:29.999+00:00 (Cmd) cbbackupmgr version 7.6.0-2176 Hostname: bk-virtual-path-true-full-mlglx OS: linux Version: 5.10.104-linuxkit Arch: arm64 vCPU: 6 Memory: 16763322368 (15.61GiB)2024-07-12T10:38:29.999+00:00 (Cmd) config --archive s3://backups/archive --repo cb-example-2024-07-12T10_38_29 --obj-staging-dir /data/staging --s3-force-path-style --obj-endpoint http://minio-s3-srv.minio-dev:9000 |
The underlying issue is demonstrable with the attached python script.
% ./python_arg_false.py --s3-force-path-style false |
|
Argument Type: <class 'str'> Value: false |
args.s3_force_path_style evaluates to True
|
Attachments
Issue Links
- relates to
-
K8S-3264 useVirtualPath=true in CouchbaseBackup resource not being respected
- Closed