Assertion error after disk discovery
Im trying to run a test migration before committing to this solution but unable to get it to work - please see command and debug below.
root@ansible-ct:~/proxmove-main# proxmove cl-freshnet Freshnet nuc1 local-lvm pve-mail --no-verify-ssl --debug
2022-05-22 07:27:04,771: DEBUG: Parsing config file: ~/.proxmoverc
2022-05-22 07:27:04,772: DEBUG: (api) Connecting to dell-pve.freshnet.local
2022-05-22 07:27:05,139: DEBUG: (api) Connecting to nuc1.freshnet.local
2022-05-22 07:27:05,210: DEBUG: (api) 'Freshnet' nodes: [{'level': '', 'node': 'nuc1', 'disk': 4708163584, 'id': 'node/nuc1', 'maxdisk': 100861726720, 'ssl_fingerprint': xxxxxxxx, 'mem': 2295193600, 'uptime': 7378, 'type': 'node', 'maxcpu': 8, 'maxmem': 67322433536, 'cpu': 0.00581238172479048, 'status': 'online'}, {'uptime': 7238, 'type': 'node', 'maxcpu': 8, 'ssl_fingerprint': xxxxxxxx, 'mem': 2077593600, 'status': 'online', 'cpu': 0.00619684082624544, 'maxmem': 67322548224, 'level': '', 'id': 'node/nuc3', 'disk': 3895869440, 'node': 'nuc3', 'maxdisk': 62297829376}, {'maxdisk': 62297829376, 'id': 'node/nuc2', 'node': 'nuc2', 'disk': 3896066048, 'level': '', 'status': 'online', 'cpu': 0.00721536015653663, 'maxmem': 67322552320, 'maxcpu': 8, 'uptime': 7327, 'type': 'node', 'mem': 2116997120, 'ssl_fingerprint': 'xxxxxxxxx'}]
2022-05-22 07:27:05,210: DEBUG: Sanity checks and preparation
2022-05-22 07:27:05,210: DEBUG: Checking VMs existence on source and destination
2022-05-22 07:27:05,232: DEBUG: Checking for problematic config in 1 VMs to move
2022-05-22 07:27:05,238: DEBUG: (exec) ssh [email protected] /bin/true
[email protected]'s password:
2022-05-22 07:27:27,138: DEBUG: (exec) ssh [email protected] ls -l /dev/pve/vm-103-disk-0
[email protected]'s password:
Traceback (most recent call last):
File "/usr/local/bin/proxmove", line 2374, in <module>
main()
File "/usr/local/bin/proxmove", line 2364, in main
vmmover.prepare()
File "/usr/local/bin/proxmove", line 1866, in prepare
self.prepare_vm_config()
File "/usr/local/bin/proxmove", line 1949, in prepare_vm_config
self.prepare_vm_config_volumes(vm)
File "/usr/local/bin/proxmove", line 1958, in prepare_vm_config_volumes
elif volume.get_size('guest') is None:
File "/usr/local/bin/proxmove", line 1688, in get_size
assert size == size_property, (size, size_property)
AssertionError: (None, 8589934592)
~/.proxmoverc
[pve:cl-freshnet]
api=https://root@pam:[email protected]:8006
[storage:cl-freshnet:local-lvm@dell-pve] ; local disk on node1 only
[email protected]
path=/dev/pve
; Example cluster named "the-new-cluster" with 2 storage devices; both
; storage devices exist on the respective nodes only.
[pve:Freshnet]
api=https://root@pam:[email protected]:8006
[storage:Freshnet:local-lvm@nuc1]
[email protected]
path=/dev/pve
From the source the command
ssh [email protected] ls -l /dev/pve/vm-103-disk-0
produces...
lrwxrwxrwx 1 root root 8 May 14 17:37 /dev/pve/vm-103-disk-0 -> ../dm-16
Any help would be appreciated - thanks :)
Apparently you're ending up here: https://github.com/ossobv/proxmove/blob/6935ecffa702e7b88e2989a9acd50f813b411071/proxmove#L913-L927
And then here: https://github.com/ossobv/proxmove/blob/6935ecffa702e7b88e2989a9acd50f813b411071/proxmove#L895-L909
Which should be:
2022-05-22 07:27:27,138: DEBUG: (exec) ssh [email protected] ls -l /dev/pve/vm-103-disk-0
Which results in:
lrwxrwxrwx 1 root root 8 May 14 17:37 /dev/pve/vm-103-disk-0 -> ../dm-16
Which gets split and should become 8:
>>> data = b'lrwxrwxrwx 1 root root 8 May 14 17:37 /dev/pve/vm-103-disk-0 -> ../dm-16'
>>> int(data.split()[4].decode('ascii', 'replace'))
8
Which is useless, because we don't want the size of the symlink... but it shouldn't be None :thinking:
For your dm-16, we'd probably need something like this instead of ls -l:
$ lsblk -bdno SIZE /dev/disk/by-id/dm-name-nvme0n1p3_crypt
511058116608
But, this should likely not be done by the ProxmoxStoragePlain class at all...
What does your vm config look like, and then specifically the configuration for the vm-103-disk-0 disk?
I cannot explain why:
- it would do an
ls -lin the first place, asimage_location.endswith('raw')should be False; - so I'd expect a
return Noneimmediately (No support yet for other formats.); - and when the
ls -lis done, I would've expected8and notNone; or a warning, which I don't see.
Did you change some code by any chance?
No change to the code at all (wouldn’t know what to do there 😝 ).
I had to migrate the machine the other day by the backup restore method and its now sitting on a ceph cluster.
The original machine was a standard issue Proxmox Mail iso install on local-lvm storage.
Sorry I cant drag any more info up on that one.
Well. Then it looks like you're either in the need for this: https://github.com/ossobv/proxmove/issues/33 or this: https://github.com/ossobv/proxmove/issues/27 which are both marked as Wontfix, as I use neither.
I'm sorry. I don't have any quick fixes for you.
No worries, I appreciate you looking. -------- Original message --------From: Walter Doekes @.> Date: 25/5/22 20:08 (GMT+10:00) To: ossobv/proxmove @.> Cc: cfresh @.>, Author @.> Subject: Re: [ossobv/proxmove] Assertion error after disk discovery (Issue #44) Well. Then it looks like you're either in the need for this: #33 or this: #27 which are both marked as Wontfix, as I use neither. I'm sorry. I don't have any quick fixes for you.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>