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

too long filename #6

Closed
paf1 opened this issue Jan 21, 2016 · 8 comments
Closed

too long filename #6

paf1 opened this issue Jan 21, 2016 · 8 comments

Comments

@paf1
Copy link

paf1 commented Jan 21, 2016

Hello,
next issue with backup script

./backup.py -c config-TUTYSERVIS.cfg
Jan 21 20:28:30: Start backup for: TUTYSERVIS
Jan 21 20:28:53: Snapshot creation started ...
Jan 21 20:29:19: Snapshot created
Jan 21 20:29:21: Clone into VM started ...
Jan 21 20:29:22: !!! Got a RequestError:
status: 400
reason: Bad Request
detail: Cannot add VM. The given name is too long.
Jan 21 20:29:22: All backups done
Jan 21 20:29:22: Backup failured for:
Jan 21 20:29:22: TUTYSERVIS
Jan 21 20:29:22: Some errors occured during the backup, please check the log file

We have two posilbilities to solve this

  1. skip middle part of generated new name ( not recommended - will solve a few names only, we have very long onces up to 16 ( sixteen ) characters )
  2. make shorter time identification (or skip it ) in suffix part of new name

running on
GUI - oVirt Engine Version: 3.5.2.1-1.el7.centos
ovirt-engine-sdk-python-3.5.5.0-1.el7.centos.noarch
python-2.7.5-18.el7_1.1.x86_64

regs. Pavel

@wefixit-AT
Copy link
Owner

Thanks, First let's figure out the maximal allowed name size by oVirt.
Maybe you have some time and can get these information's?

@wefixit-AT
Copy link
Owner

You can use your preferred search engine + read through the oVirt Documentation and oVirt SDK Documentation. Guessing is also a way but very imprecise because someone have coded the name limit anywhere. If its not documented anywhere It must be anywhere in the code, its also OpenSource.

UPDATE: Its also important to know if it is the snapshot-name-length or vm-name-length

@paf1
Copy link
Author

paf1 commented Jan 21, 2016

UPDATED
MaxVmNameLengthNonWindows - Max VM name length for non-Windows OS = 64
MaxVmNameLengthWindows - Max VM name length in Windows = 15

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.2/html/Administration_Guide/Red_Hat_Enterprise_Virtualization_Manager_configuration_options_explanations_limitations_and_best_practices.html

@wefixit-AT
Copy link
Owner

Hopefully its possible to get the type with the oVirt SDK.
I will code this tomorrow.

@paf1
Copy link
Author

paf1 commented Jan 21, 2016

If you dive deeply in code, let me know if exists posibility to set MaxVmNameLengthWindows longer then 16 in any cfg file without impacting current oVirt DB structure, pls.
UPDATE
https://access.redhat.com/solutions/643373

@paf1
Copy link
Author

paf1 commented Jan 21, 2016

SOLUTION
[root@ovirt backup]# engine-config --get=MaxVmNameLengthWindows --cver=general
15
[root@ovirt backup]# engine-config --set MaxVmNameLengthWindows=36 --cver=general
[root@ovirt backup]# engine-config --get=MaxVmNameLengthWindows --cver=general
36

Well , this is fixed now, but would you generate human number format suffix ( 1501212245 eg:? ), pls.,
regs. Pavel

@wefixit-AT
Copy link
Owner

I added a separate config for this, your solution is good but its a workaround and didn't catch or solve the problem ;-). Besides its a little bit strange that for windows vm's only 15 characters are allowed.

For the suffix i will create a separate issue, for documentation purpose.

@GusevVictor
Copy link

Thank a lot for your solutions! It looks like OK!

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

3 participants