[pve-devel] API documentation is buggy
Dietmar Maurer
dietmar at proxmox.com
Wed Feb 1 06:38:02 CET 2017
> Array for create an LXC-Container
>
> (
> [ostemplate] => local:vztmpl/ubuntu-16.10-standard_16.10-1_amd64.tar.gz
> [vmid] => 494
> [hostname] => CT494.myname.mydomain.de
> [storage] => local
> [onboot] => 1
> [description] => backup:0
> [cpulimit] => 1
> [rootfs] => 20
> [memory] => 256
> [swap] => 256
> )
>
> Template are in /vz/template/cache/
> Proxmox 4.4-5/c430a5a5
>
> and get everytime this error and o my got, google search found many times the
> same problem, but erverytime without a resolution
> or a not more exist page or something! So I dont know, how many hundreds hours
> admins has search for the right resolution?!
>
> HTTP/1.1 500 Can't call method "map_method_by_name" on an undefined value at
> /usr/share/perl5/PVE/RESTHandler.pm line 287.
> Cache-Control: max-age=0
> Connection: close
Are you able to reproduce that bug using 'pvesh'?
> Only when pool is not set and the rights for this user are configured for only
> allowed for a special pool!
> The response give not much informations! No example permission not denied
> about pool not set or so!
>
> So, the example in the git-hub has paramenters in the readme.MD
>
> cpus= "2"
> disk="2"
>
> CPUS and DISK are not possible parameter!
What documentation do you refer to (we do not really use github)?
> rootfs in API-DOC http://pve.proxmox.com/pve-docs/api-viewer/ said:
>
> [volume=]<volume> [,asl=1/0].......size=<DiskSize> thats all bullshit!
that correct, but if you want to create a volume you need to pass
a number (seems this is missing in the docs).
> in Forum I read, that the parameter must been only a number and yes,
> with only the number for gigabytes works fine!
>
> then the next:
>
> $pve2->set_debug(true);
>
> brings nothing out - no message and no log-file entries and less infos
> as without activated!
> So a workarround is for the admins only to patch the class, so that get
> back responses, why without an response
> a search for errors is not possible!
You run into a bug. Seems we forgot to include a necessary library ('use XYZ'),
having the side effect that you do not get a detailed error message.
So what version do you run exactly? Did you test with latest version?
> Next the rights in documentation for create lxc containter under LXC
> Post are not complete! The user need more rights:
> PVEVMAdmin / PVEPoolAdmin / PVEDatastoreUser / PVETemplateUser
What you describe above are 'Roles'. The docs refer to specific
priviledges (this is something different).
> With wrong informations, ALL users search HOURS and DAYS, but the
> developers now about what the users need, why they
> make not direct better examples and correct documentations?
I wrote more than 250 pages of documentation in the last year, but
I would be glad to get some help from other people. So thanks
for the bug report. Bug reports are a good start to improve things...
- Dietmar
More information about the pve-devel
mailing list