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

Infinite loop in trying to get started #212

Open
skirsch opened this issue Dec 15, 2024 · 9 comments
Open

Infinite loop in trying to get started #212

skirsch opened this issue Dec 15, 2024 · 9 comments

Comments

@skirsch
Copy link

skirsch commented Dec 15, 2024

root@proxmox:/rpool/ROOT/pve-1# zrep -i rpool/ROOT/pve-1 truenas main/zrep/proxmox/ROOT/pve-1
rpool/ROOT/pve-1 is at least partially configured by zrep
Error: To re-initialize, first use zrep clear rpool/ROOT/pve-1
root@proxmox:/rpool/ROOT/pve-1#
root@proxmox:/rpool/ROOT/pve-1# zrep clear rpool/ROOT/pve-1
WARNING: Removing all zrep configs and snapshots from rpool/ROOT/pve-1
 (for TAG=zrep)
Continuing in 10 seconds
Destroying any zrep-related snapshots from rpool/ROOT/pve-1
Removing zrep-related properties from rpool/ROOT/pve-1
root@proxmox:/rpool/ROOT/pve-1# zrep -i rpool/ROOT/pve-1 truenas main/zrep/proxmox/ROOT/pve-1
rpool/ROOT/pve-1 is at least partially configured by zrep
Error: To re-initialize, first use zrep clear rpool/ROOT/pve-1
root@proxmox:/rpool/ROOT/pve-1#

Groundhog day :)

@ppbrown
Copy link
Member

ppbrown commented Dec 15, 2024

Interesting.
It would be helpful if you could identify what ZFS property it is discovering, that it is triggering that warning.

@skirsch
Copy link
Author

skirsch commented Dec 15, 2024

suggested way to do that?

@skirsch
Copy link
Author

skirsch commented Dec 15, 2024

do you want to add an echo somewhere in the script?

@ppbrown
Copy link
Member

ppbrown commented Dec 15, 2024

two ways to approach this:

a) put "set -x" as the second line in the script, to enable debug mode

or

b) zfs get all rpool/ROOT/pve-1 |grep zrep

@skirsch
Copy link
Author

skirsch commented Dec 15, 2024

rpool/ROOT/pve-1  zrep:dest-host        truenas                 inherited from rpool/ROOT
rpool/ROOT/pve-1  zrep:src-fs           rpool/ROOT              inherited from rpool/ROOT
rpool/ROOT/pve-1  zrep:master           yes                     inherited from rpool/ROOT
rpool/ROOT/pve-1  zrep:savecount        5                       inherited from rpool/ROOT
rpool/ROOT/pve-1  zrep:dest-fs          main/zrep/proxmox/ROOT  inherited from rpool/ROOT
rpool/ROOT/pve-1  zrep:src-host         proxmox                 inherited from rpool/ROOT
root@proxmox:~#

@skirsch
Copy link
Author

skirsch commented Dec 15, 2024

root@proxmox:~# zrep -i rpool/ROOT/pve-1 truenas main/zrep/proxmox/ROOT/pve-1
+ ZREP_VERSION=2.0.2
+ [[ -f /etc/default/zrep ]]
+ SSH=ssh
+ ZREP_PATH=zrep
+ ZREPTAG=zrep
+ ZREP_RENAME_UNSENT=yes
+ PERL_BIN=/usr/perl5/bin
+ ZREP_SAVE_COUNT=5
+ ZREP_DATEFORMAT=%Y/%m/%d-%H:%M:%S
+ ZFSGETLVAL='zfs get -H -o value -s local'
+ ZFSGETVAL='zfs get -H -o value'
+ [[ '' != '' ]]
++ uname -n
+ Z_LOCAL_HOST=proxmox
+ Z_LOCAL_HOST=proxmox
+ [[ -i == \-\R ]]
+ [[ '' == \-\R ]]
+ [[ '' != '' ]]
+ [[ '' != '' ]]
+ [[ '' != '' ]]
+ PROPTYPES=local,received
+ case `id` in
++ id
+ ZREP_RUNDIR=/var/run
+ zrep_checkfile=/var/run/zrep.check.317663
+ zfs
+ Z_HAS_X=0
+ Z_HAS_REC_U=0
+ Z_HAS_REC_O=0
+ Z_HAS_SNAPPROPS=0
+ grep help /var/run/zrep.check.317663
+ Z_HAS_X=1
+ Z_HAS_REC_U=1
+ Z_HAS_REC_O=1
+ Z_HAS_SNAPPROPS=1
+ DEPTHCAP='-d 1'
+ (( !Z_HAS_SNAPPROPS ))
+ rm /var/run/zrep.check.317663
+ Z_LOCK_RETRY=10
+ Z_GLOBAL_LOCKFILE=/var/run/zrep.lock
+ [[ '' == '' ]]
+ export Z_GLOBAL_PID=317663
+ Z_GLOBAL_PID=317663
+ Z_SETHOLD='zfs hold'
+ [[ -i == -[tD] ]]
+ [[ zrep != \z\r\e\p ]]
+ ZREP_INC_FLAG=-I
+ case "$1" in
+ shift
+ '[' rpool/ROOT/pve-1 '!=' '' ']'
+ case $1 in
+ break
+ zrep_init rpool/ROOT/pve-1 truenas main/zrep/proxmox/ROOT/pve-1
+ typeset srcfs=rpool/ROOT/pve-1 desthost=truenas destfs=main/zrep/proxmox/ROOT/pve-1 snap check vol=0
+ typeset mountpoint vflags verbose
+ typeset token
+ [[ '' != \-\f ]]
+ zrep_ssh truenas zfs list main/zrep/proxmox/ROOT/pve-1
+ [[ '' != '' ]]
+ [[ rpool/ROOT/pve-1 == '' ]]
++ zfs get -H -o value zrep:dest-fs rpool/ROOT/pve-1
+ check=main/zrep/proxmox/ROOT
+ [[ main/zrep/proxmox/ROOT != \- ]]
+ echo 'rpool/ROOT/pve-1 is at least partially configured by zrep'
rpool/ROOT/pve-1 is at least partially configured by zrep
++ zfs get -H -o value -s local zrep:master rpool/ROOT/pve-1
+ check=
+ [[ '' != '' ]]
+ [[ '' == '' ]]
+ zrep_errquit 'To re-initialize, first use zrep clear rpool/ROOT/pve-1'
+ _errprint Error: 'To re-initialize, first use zrep clear rpool/ROOT/pve-1'
+ echo Error: To re-initialize, first use zrep clear rpool/ROOT/pve-1
Error: To re-initialize, first use zrep clear rpool/ROOT/pve-1
+ zrep_has_global_lock
++ zrep_global_lock_pid
++ cat /var/run/zrep.lock
+ lockpid=
+ [[ '' == '' ]]
+ return 1
+ exit 1
root@proxmox:~#

@ppbrown
Copy link
Member

ppbrown commented Dec 15, 2024

so it seems like the zrep clear, is leaving behind

zrep:dest-fs

property?

that seems odd.
mayube you arent running it with correct perms or something?

@skirsch
Copy link
Author

skirsch commented Dec 15, 2024

I run as root.

@ppbrown
Copy link
Member

ppbrown commented Dec 15, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants