New storage config and force-resync in the same command

Description

Command like the following ignores new config and performes only resync with the old storage.
pbm config --file=pbm_config.yaml --force-resync

Environment

None

Activity

Show:

Pavel Khripkov April 28, 2023 at 8:51 AM

now I understand the behaviour, but it's not obvious. In fact this is not correct behaviour. If commands cannot be executed in one line, they shouldn't be accepted in one line. Or at least, since new storage causes resync, therefore new storage should be the main instruction, but pbm chooses resync as a main one and igrones the real main one.

andrew.pogrebnoi April 27, 2023 at 5:25 AM
Edited

PBM automatically does resync when a new config is set (whenever storage settings have changed). So there is no need to run --force-resync after the config update.

`pbm config --file` and `pbm config --force-resync` are two independent instructions for the pbm cli so it picks one and ignores the other.

If you want to run `--force-resync` after the config change anyway, use `pbm config --file=...` & `pbm config --force-resync`. Just take into account that if you run it one right after another,  there is gonna be a running resync triggered by the config change, so the second one will be ignored.

Details

Assignee

Reporter

Needs QA

Yes

Affects versions

Priority

Smart Checklist

Created April 26, 2023 at 11:35 AM
Updated September 23, 2024 at 1:11 PM

Flag notifications