Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archive rsyncd on host1 and local_rsync on host2 write to the same HD (mounted on host2) #847

Open
jayhohoho2019 opened this issue Jul 11, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@jayhohoho2019
Copy link

Describe the bug

After upgrading to v0.5, local_rsync and rsyncd from two hosts are rsync'ing to the same HD somehow, even though there are multiple HDs with enough free space, and the two hosts have plotman archive index set at different values.
To Reproduce

Steps to reproduce the behavior, e.g.:

  1. Set up config with '...'
  2. Run other programs '....'
  3. Run Plotman with '....'
  4. See error

Expected behavior

System setup:

  • OS: Ubuntu Server 20.04.2
  • Method of archiving: host1 rsyncd to host2, with index 6; host2 local_rsync, with index 4

Config

full configuration
# paste your complete configuration file contents here.

Additional context & screenshots

@jayhohoho2019 jayhohoho2019 added the bug Something isn't working label Jul 11, 2021
@altendky
Copy link
Collaborator

6 and 4 are weird numbers vs. 1 and 0. But, note that the index: parameter belongs directly in archiving: not archiving: env:. But, since you didn't share your config as requested in the template, I just have to guess at this being the problem.

@jayhohoho2019
Copy link
Author

jayhohoho2019 commented Jul 12, 2021

Configs from both machines copied below. So it looks like the index is in the right place. Note I never noticed this issue prior to the upgrade to v0.5. As to the index values, I thought as long as they are different that's Ok. Could you confirm? My eventual setup will have multiple plotters (6 at least) using rsyncd mode to a file server which is running local_rsync. Each will have a unique index. This setup is supposed to be supported, correct?

archiving:
  index: 4
  target: local_rsync
  env:
    command: rsync
    site_root: /mnt/farm
archiving:
  index: 6
  target: rsyncd
  env:
    site_root: /mnt/farm
   ...

@altendky
Copy link
Collaborator

It looks like it presently just saturates based on the length of the list of drives with available space.

index = min(arch_cfg.index, len(available) - 1)

So if you have three archive drives with free space and indexes four and six, both will end up archiving the the third drive. I think perhaps that should change to a modulus or something, maybe. But even then if you pick two arbitrary numbers they might end up referencing the same disk.

How many free disks do you have? Starting with screenshots and full configuration files can help avoid the need for back and forth on questions like this.

@jayhohoho2019
Copy link
Author

I see. My free disk count changes over time when some are filled, and eventually unmounted and moved (and replaced by new free disks). When this issue happened, there were only 2 HDs that had free space under site_root. So it looks like both ended up getting an index value of 1.

@jayhohoho2019
Copy link
Author

I'll change the index values to 0 and 1 for now. That makes sense. When number of plotters goes up I'll increment the index accordingly.

@altendky
Copy link
Collaborator

If I switch it to modulus rather than limit then you would be able to just use 0, 1, 2, 3, ... indexes and still get the best spread possible since the actual disks used would be 0, 1, 0, 1, ... instead of the present 0, 1, 1, 1, ....

See the change to modulus in #855.

@jayhohoho2019
Copy link
Author

jayhohoho2019 commented Jul 12, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants